Miruro's pipe endpoint (/api/secure/pipe) is now protected by Cloudflare.
- Do NOT host on Vercel — Vercel uses datacenter IPs that are hard-blocked by Cloudflare's WAF. Requests to the pipe will always return
403. - Do NOT host on Render free tier, Railway, or similar PaaS — same problem; shared datacenter IPs get blocked.
- ✅ Host on a VPS (DigitalOcean, Hetzner, Linode, Vultr, etc.) with a clean non-datacenter IP, or run locally on your own machine.
The API uses curl_cffi with Chrome TLS fingerprinting and proper same-origin headers to bypass Cloudflare's bot detection. This works from residential and most VPS IPs, but not from known datacenter ranges.
Miruro's frontend communicates with its backend through a secure/pipe tunnel that base64-encodes, gzip-compresses, and encrypts every request. This project bypasses all of that and gives you simple, direct REST endpoints to:
- Search & filter anime with full AniList metadata
- Get complete anime info — characters, staff, relations, recommendations, trailer, stats, and all metadata in one request
- Browse collections — trending, popular, upcoming, recent, schedule, and spotlight — all paginated
- List episodes with decoded episode IDs from multiple providers
- Get M3U8 streaming URLs for any episode
- Autocomplete search suggestions for dropdown UIs
No headless browsers, no Selenium — just lightweight async HTTP requests.
git clone https://github.com/walterwhite-69/Miruro-API.git
cd Miruro-API
pip install -r requirements.txt
uvicorn api:app --host 0.0.0.0 --port 8000Then open http://localhost:8000/ for interactive API docs.
Windows users: If you see a
RuntimeWarningaboutProactor event loop, that's a harmlesscurl_cffiwarning — the API works fine.
| Endpoint | Description | Params |
|---|---|---|
GET /search?query={name} |
Full-text anime search with rich metadata (20+ fields per result) | query (required), page=1, per_page=20 |
GET /suggestions?query={name} |
Lightweight autocomplete for dropdowns — returns id, title, poster, format, status, year. Max 8 results. | query (required) |
GET /filter |
Advanced browse/filter by any combination of genre, tag, year, season, format, status, sort | All optional — see below |
| Param | Values |
|---|---|
genre |
Action, Romance, Comedy, Drama, Fantasy, Sci-Fi, etc. |
tag |
Isekai, Time Skip, Reincarnation, etc. |
year |
2025, 2024, etc. |
season |
WINTER · SPRING · SUMMER · FALL |
format |
TV · MOVIE · OVA · ONA · SPECIAL |
status |
RELEASING · FINISHED · NOT_YET_RELEASED · CANCELLED |
sort |
SCORE_DESC · POPULARITY_DESC · TRENDING_DESC · START_DATE_DESC |
page / per_page |
Pagination (defaults: 1 / 20, max per_page: 50) |
| Endpoint | Description |
|---|---|
GET /trending |
Currently trending anime |
GET /popular |
Most popular anime of all time |
GET /upcoming |
Most anticipated upcoming anime |
GET /recent |
Currently airing / this season's anime |
GET /spotlight |
Curated "What's Hot" list (trending + popular) |
GET /schedule |
Airing schedule for the next week |
All collection endpoints accept page and per_page query params and return:
{
"page": 1,
"perPage": 20,
"total": 5000,
"hasNextPage": true,
"results": [ ... ]
}Each anime in results includes 20+ fields: title (romaji/english/native), coverImage, bannerImage, format, season, seasonYear, episodes, duration, status, averageScore, meanScore, popularity, favourites, genres, source, countryOfOrigin, studios, nextAiringEpisode, startDate, endDate, and more.
| Endpoint | Description |
|---|---|
GET /info/{anilist_id} |
Complete anime page — everything in one request |
GET /anime/{id}/characters |
Paginated character list with voice actors |
GET /anime/{id}/relations |
All related media (sequels, prequels, side stories, spin-offs) |
GET /anime/{id}/recommendations |
Community recommendations sorted by rating |
Everything you need to build a full anime detail page:
- Core: id, idMal, title (romaji/english/native), description, coverImage, bannerImage
- Metadata: format, season, seasonYear, episodes, duration, status, source, countryOfOrigin
- Scores: averageScore, meanScore, popularity, favourites, trending
- Taxonomy: genres, tags (with rank & spoiler flag), synonyms, hashtag
- People: characters (25, with voice actors), staff (25, with roles)
- Related: relations (sequels/prequels/etc.), recommendations (10, with ratings)
- Media: trailer (YouTube/Dailymotion), streamingEpisodes, externalLinks
- Stats: scoreDistribution, statusDistribution
- Studios: name, isAnimationStudio, siteUrl
- Dates: startDate, endDate, nextAiringEpisode
- Links: siteUrl, externalLinks (MAL, official site, etc.)
To get a video stream, follow these 3 steps in order:
Returns all episodes from multiple providers (kiwi, arc, zoro, hop, etc.) organized by audio type.
{
"mappings": { "anilistId": 178005, "malId": 56885, "kitsuId": "..." },
"providers": {
"kiwi": {
"episodes": {
"sub": [
{
"id": "watch/kiwi/178005/sub/animepahe-1",
"number": 1,
"title": "Episode Title",
"image": "https://...",
"airDate": "2026-01-04",
"duration": 1420,
"description": "...",
"filler": false
}
],
"dub": [ ... ]
}
},
"arc": { ... },
"zoro": { ... }
}
}Just take the direct id from the Step 1 response and use it as the URL. No manual parameters or complex IDs needed!
Endpoint: GET /{id}
Example: GET /watch/kiwi/178005/sub/animepahe-1
{
"streams": [
{ "url": "https://.../master.m3u8", "type": "hls", "quality": "1080p" }
],
"subtitles": [
{ "file": "https://...", "label": "English", "kind": "captions" }
],
"intro": { "start": 0, "end": 90 },
"outro": { "start": 1300, "end": 1420 }
}Tip
This endpoint automatically handles decryption, provider selection, and category matching. It returns the direct M3U8/HLS streaming URL and intro/outro timestamps.
Fallback / Detailed Option
If you need manual control, you can use the traditional endpoint: `GET /sources?episodeId=...&provider=...&anilistId=...&category=...`Feed streams[0].url into any HLS player (Video.js, hls.js, VLC, mpv). Subtitles are either hard-subbed (baked into the video for kiwi/pahe) or provided in the subtitles array (VTT links for zoro/arc). Use intro/outro timestamps for skip buttons.
The pipe endpoint at miruro.tv/api/secure/pipe is behind Cloudflare. The API bypasses it by:
- Using
curl_cffiwithchrome110impersonation — this replicates Chrome's exact TLS fingerprint (JA3/JA4) at the socket level, making the request look indistinguishable from a real browser - Sending the correct same-origin headers:
sec-fetch-site: same-origin,sec-fetch-mode: cors,sec-fetch-dest: empty, fullsec-ch-uastack, matchingRefererandOrigin
This approach works from residential IPs and most VPS providers. Cloudflare's hard block only applies to known datacenter/CDN IP ranges (Vercel, Render, AWS Lambda, Cloudflare Workers, etc.).
This project is for educational purposes and API integrity research only. The author takes absolutely zero responsibility for network usage. Code contains zero skiddable artifacts.
Author: Walter | GitHub: walterwhite-69
