A curated collection of high-quality anime roleplay GIFs, organized by action category and ready to use in bots, apps, or anything else.
| Stat | Value |
|---|---|
| Total categories | 61 |
| Total GIFs | 682 |
| Hosted on | GitHub Raw CDN |
| Index file | index.json |
https://raw.githubusercontent.com/itsfizys/roleplay-gifs/main/{category}/{n}.gif
Replace {category} with any category name and {n} with a number from 1 to the category's count.
The index.json file at the root of this repo contains all category names and their GIF counts. Fetch it once and use it to resolve valid ranges without hardcoding anything.
{
"base_url": "https://raw.githubusercontent.com/itsfizys/roleplay-gifs/main",
"total_categories": 61,
"total_gifs": 682,
"categories": {
"hug": 17,
"slap": 16,
...
}
}async function randomGif(category) {
const index = await fetch(
"https://raw.githubusercontent.com/itsfizys/roleplay-gifs/main/index.json"
).then((r) => r.json());
const count = index.categories[category];
if (!count) throw new Error(`Unknown category: ${category}`);
const n = Math.floor(Math.random() * count) + 1;
return `${index.base_url}/${category}/${n}.gif`;
}
// Example
const url = await randomGif("hug");
console.log(url);
// https://raw.githubusercontent.com/itsfizys/roleplay-gifs/main/hug/7.gifimport httpx
import random
def random_gif(category: str) -> str:
index = httpx.get(
"https://raw.githubusercontent.com/itsfizys/roleplay-gifs/main/index.json"
).json()
count = index["categories"].get(category)
if not count:
raise ValueError(f"Unknown category: {category}")
n = random.randint(1, count)
return f"{index['base_url']}/{category}/{n}.gif"
# Example
print(random_gif("pat"))
# https://raw.githubusercontent.com/itsfizys/roleplay-gifs/main/pat/3.gifIf you already know the category and want a specific GIF, you can construct the URL directly:
https://raw.githubusercontent.com/itsfizys/roleplay-gifs/main/hug/1.gif
https://raw.githubusercontent.com/itsfizys/roleplay-gifs/main/slap/4.gif
https://raw.githubusercontent.com/itsfizys/roleplay-gifs/main/cry/11.gif
An npm wrapper is also available if you prefer installing via a package manager.
npm install gifcdnimport { random, get, list, categories } from "gifcdn";
await random("hug"); // → full URL to a random hug GIF
await get("slap", 3); // → .../slap/3.gif
await list("cry"); // → array of all 22 cry GIF URLs
await categories(); // → ["airkiss", "angrystare", ...]The package ships with TypeScript types and zero dependencies — it's a thin wrapper around the same raw CDN URLs above.
All categories listed alphabetically with their GIF count, URL pattern, and a preview.



























































