kuramanime-api
v1.0.0
Published
REST API for scraping anime data from Kuramanime — portal streaming anime sub Indo
Maintainers
Readme
Kuramanime API
REST API untuk scraping data anime dari Kuramanime — portal streaming anime sub Indo.
# Coba langsung via curl — no install!
curl https://musician-optics-mental-carey.trycloudflare.com/api/anime?page=1🎬 Demo
https://github.com/user-attachments/assets/files/kuramanime-api/docs/demo.mp4
▶️ Tonton demo — 26 detik showcase semua endpoint live via curl.
⚡ Quick Start
Opsi 1: NPM Global Install
npm install -g kuramanime-api
kuramanime-api
# → http://localhost:3000Opsi 2: Self-host (clone repo)
git clone https://github.com/mocasus/kuramanime-api.git
cd kuramanime-api
npm install
npm start
# → http://localhost:3000Opsi 3: Vercel Deploy 🚀
1-click deploy — gratis, auto-scale, langsung dapat endpoint publik. Set env BROWSER_FARM_URL + BROWSER_FARM_KEY.
Opsi 4: Pakai cURL (no install, langsung coba)
# List anime terbaru
curl "https://musician-optics-mental-carey.trycloudflare.com/api/anime?page=1"
# Search anime
curl "https://musician-optics-mental-carey.trycloudflare.com/api/search?q=naruto"
# Detail anime
curl "https://musician-optics-mental-carey.trycloudflare.com/api/anime/fuguushoku-kanteishi-ga-jitsu-wa-saikyou-datta"
# Episode + server streaming
curl "https://musician-optics-mental-carey.trycloudflare.com/api/anime/fuguushoku-kanteishi-ga-jitsu-wa-saikyou-datta/1"
# Cek status source
curl "https://musician-optics-mental-carey.trycloudflare.com/api/status"Demo URL:
musician-optics-mental-carey.trycloudflare.com(Cloudflare Tunnel — uptime tidak dijamin. Untuk production, self-host!)
Opsi 5: Docker
docker compose up -dEndpoints API
| Method | Endpoint | Deskripsi |
|--------|----------|-----------|
| GET | /api/anime?page=1 | List anime terbaru (5/page) |
| GET | /api/anime/:slug | Detail anime + daftar episode |
| GET | /api/anime/:slug/:episode | Server streaming + video URL |
| GET | /api/search?q=judul | Search anime (min 2 karakter) |
| GET | /api/status | Cek status source (alive/down) |
| GET | /api/sources | List semua URL source aktif |
| GET | /api/health | Server health check |
| POST | /api/sources/check | Trigger manual source update |
| POST | /api/cache/clear | Clear semua cache |
Contoh Response
{
"success": true,
"page": 1,
"count": 5,
"data": [{
"id": 5000,
"slug": "super-no-ura-de-yani-suu-futari",
"title": "Super no Ura de Yani Suu Futari",
"image": "https://r2.nyomo.my.id/images/...",
"quality": "Loading...",
"score": "8.06"
}]
}{
"success": true,
"query": "one",
"count": 18,
"data": [{
"id": 4508,
"slug": "omae-gotoki-ga-maou-ni-kateru-to-omouna...",
"title": "Omae Gotoki ga Maou ni Kateru to Omouna...",
"altTitles": "Winter 2026 • TV • HD"
}]
}{
"success": true,
"data": {
"id": 3380,
"title": "Fuguushoku \"Kanteishi\" ga Jitsu wa Saikyou Datta",
"synopsis": "Di dunia fantasi...",
"genres": ["Action", "Adventure", "Fantasy"],
"score": "6.34",
"metadata": {
"tipe": "TV",
"episode": "12",
"studio": "Okuruto Noboru"
},
"episodes": [
{ "number": 1, "url": "..." }
]
}
}{
"success": true,
"data": {
"episode": 1,
"servers": [
{ "id": "kuramadrive", "label": "Kuramadrive s1" },
{ "id": "mega", "label": "MEGA" }
],
"selectedServer": "kuramadrive"
}
}Fitur
- 9 REST Endpoints — list, detail, episode, search, status, sources, health, source check, cache clear
- Auto-fallback — source utama timeout/403 → auto coba alternatif (v17, v18, v19...)
- Auto-update Source — tiap 6 jam cek + rotate URL source secara otomatis
- Quicksearch — pakai AJAX endpoint untuk hasil search instan & akurat
- SQLite Cache — cache response per endpoint (30m–2h TTL)
- Rate Limiting — 60 req/menit general, 20 search, 30 episode
- Browser Farm — ekstrak streaming URL via headless Playwright
- Docker Ready — Dockerfile + docker-compose.yml
Konfigurasi
Copy .env.example → .env:
| Variable | Default | Deskripsi |
|----------|---------|-----------|
| PORT | 3000 | Port server |
| CACHE_TTL_ANIME_LIST | 1800 | Cache TTL list (detik) |
| CACHE_TTL_ANIME_DETAIL | 3600 | Cache TTL detail |
| CACHE_TTL_EPISODE | 7200 | Cache TTL episode |
| BROWSER_FARM_URL | - | URL Browser Farm service |
| BROWSER_FARM_KEY | - | API key Browser Farm |
| SOURCE_AUTO_UPDATE_INTERVAL | 6 | Interval cek source (jam) |
Auto-Fallback & Auto-Update
Sistem otomatis:
- Coba URL utama → alternatif → derived URLs (v17, v18, v19...)
- Tiap 6 jam: cek health semua URL
- Primary down → rotate ke alternatif yang hidup
- Update
data/sources.jsonotomatis - Semua log ke SQLite
Manual trigger: POST /api/sources/check
Cache Strategy
| Endpoint | TTL | |----------|-----| | Anime list | 30 menit | | Anime detail | 1 jam | | Episode stream | 2 jam | | Source status | 5 menit | | Search | 30 menit |
Clear: POST /api/cache/clear
Struktur Project
kuramanime-api/
├── src/
│ ├── index.js # Express app + middleware
│ ├── config/
│ │ ├── index.js # Env config
│ │ └── sources.js # URL source manager
│ ├── routes/
│ │ ├── anime.js # Anime endpoints
│ │ └── status.js # Status, sources, cache
│ ├── scrapers/
│ │ ├── cheerio.js # Static scraper (list, detail, search)
│ │ └── browser.js # Browser scraper (streaming URL)
│ ├── services/
│ │ ├── browserFarm.js # Browser Farm REST client
│ │ └── sourceUpdater.js # Auto source rotate
│ └── db/
│ └── index.js # SQLite (cache + source log)
├── data/
│ └── sources.json # URL source (runtime)
├── Dockerfile
├── docker-compose.yml
└── README.mdStreaming Servers
| Server ID | Deskripsi |
|-----------|-----------|
| kuramadrive | Default (normal, iklan banner) |
| filelions | FileLions (kencang, iklan popup) |
| filemoon | FileMoon (kencang, iklan popup) |
| mega | MEGA (kencang, iklan banner) |
| streamwish | StreamWish (kencang, iklan popup) |
| vidguard | VidGuard (kencang, iklan popup) |
Tech Stack
- Node.js 20+ + Express — REST framework
- Cheerio — HTML parsing (list, detail, search)
- Browser Farm (Playwright) — dynamic JS scraping
- better-sqlite3 — SQLite database
- express-rate-limit — rate limiting
License
MIT © 2026 mmoaa
