npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kuramanime-api

v1.0.0

Published

REST API for scraping anime data from Kuramanime — portal streaming anime sub Indo

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:3000

Opsi 2: Self-host (clone repo)

git clone https://github.com/mocasus/kuramanime-api.git
cd kuramanime-api
npm install
npm start
# → http://localhost:3000

Opsi 3: Vercel Deploy 🚀

Deploy with Vercel

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 -d

Endpoints 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:

  1. Coba URL utama → alternatif → derived URLs (v17, v18, v19...)
  2. Tiap 6 jam: cek health semua URL
  3. Primary down → rotate ke alternatif yang hidup
  4. Update data/sources.json otomatis
  5. 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.md

Streaming 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