An unofficial, self-hostable REST API for allmanga.to — search anime, browse episodes, and get direct 1080p MP4 stream URLs with zero cookies needed.
AnimeKai is shutting down. And honestly, it won't be the last.
Every time a popular anime site dies, every app, bot, and project built on top of it dies too. Kai going down hit a lot of people. So instead of waiting for the next thing to get taken down, I built something you can run yourself — backed by a source that has been stable for years.
This scrapes allmanga.to (AllAnime), which has a clean internal GraphQL API under the hood. It is not scraping HTML that breaks every redesign. It is talking directly to their data layer. Much more reliable.
Run it yourself. Host it yourself. No rate limits from me, no middleman, no praying someone else's server stays up.
- Search anime by title with sorting, type and translation filters
- Homepage feed — latest updates + trending, just like the site
- Full anime info — description, genres, studios, scores, seasons, episode counts
- Direct 1080p MP4 stream URLs — no cookies, no captcha, no embeds needed
- All embed servers decoded — GogoAnime, StreamSB, Doodstream, Streamtape, Mp4Upload, Filemoon, MyCloud and more
- AES-256-CBC decryption for GogoAnime/VidStreaming
- CORS enabled — plug it straight into any frontend
- Beautiful built-in docs page at
/plus full Swagger UI at/docs
Requirements: Python 3.10+
git clone https://github.com/walterwhite-69/AllManga.to-API
cd AllManga.to-API
python -m venv .venv
source .venv/bin/activate
pip install fastapi "uvicorn[standard]" "httpx[http2]" beautifulsoup4 lxml pycryptodome
uvicorn main:app --host 0.0.0.0 --port 8000 --reloadOpen http://localhost:8000 and you will see the docs page with live Try it buttons.
Homepage feed — recent and trending anime in one call.
| Param | Default | Options |
|---|---|---|
translationType |
sub |
sub dub raw |
countryOrigin |
JP |
JP CN KR |
page |
1 |
any number |
curl "http://localhost:8000/anime/home?translationType=sub&countryOrigin=JP"Search by title. Supports sorting, type filter, translation type, country.
| Param | Required | Notes |
|---|---|---|
q |
yes | Search query |
sortBy |
Latest_Update Trending Name_ASC Name_DESC |
|
type |
TV Movie OVA ONA Special |
|
translationType |
sub dub raw |
|
countryOrigin |
JP CN KR |
|
limit |
Default 26, max 100 | |
page |
Default 1 |
curl "http://localhost:8000/anime/search?q=one+piece&sortBy=Trending&limit=5"Example response
{
"results": [
{
"_id": "ReooPAxPMsHM4KPMY",
"name": "1P",
"englishName": "One Piece",
"thumbnail": "https://cdn.myanimelist.net/images/anime/1810/139965.jpg",
"score": 8.73,
"type": "TV",
"status": "Releasing",
"genres": ["Action", "Adventure", "Comedy"],
"availableEpisodes": { "sub": 1161, "dub": 1161, "raw": 0 },
"season": { "quarter": "Fall", "year": 1999 }
}
],
"page": 1,
"limit": 5,
"hasNextPage": true
}Full details for a show — description, genres, tags, studios, aired dates, episode counts.
curl "http://localhost:8000/anime/info/ReooPAxPMsHM4KPMY"Episode list with direct CDN MP4 links. This is the one you actually want. Set includeStreams=true and you get playable 1080p URLs for sub and dub — no cookies, no captcha, no embed pages.
| Param | Default | Notes |
|---|---|---|
episodeStart |
1 |
Starting episode number |
episodeEnd |
9999 |
Ending episode number |
includeStreams |
false |
Set to true to get direct MP4 URLs |
curl "http://localhost:8000/anime/episodes/ReooPAxPMsHM4KPMY?includeStreams=true&episodeStart=1&episodeEnd=3"Example stream object
{
"server": "allanime-cdn",
"translationType": "sub",
"url": "https://allanimenews.com/data2/media9/videos/.../sub/1_xxxx.mp4",
"quality": "1080p",
"sizeMB": 500.9,
"durationSec": 1539.1,
"type": "mp4",
"headers": {
"Referer": "https://allanimenews.com/",
"Origin": "https://allanimenews.com"
}
}Pass the Referer header when playing. VLC, MPV, and most HTTP clients support this. You cannot paste the URL raw into a browser address bar — that is a browser security restriction, not an API limitation.
All embed server URLs for an episode, decoded from AllAnime's XOR encoding. Set extractStreams=true to also pull actual video URLs from each embed page.
Most people will not need this. The CDN streams from /anime/episodes are cleaner — direct MP4, no ads, known file size. This endpoint is only useful as a fallback for anime not hosted on the AllAnime CDN. It also requires your browser cookies from allmanga.to to bypass their captcha check.
| Param | Required | Notes |
|---|---|---|
showId |
yes | Show ID |
episode |
yes | Episode number e.g. "1" |
translationType |
sub dub raw |
|
extractStreams |
Also extract m3u8/mp4 from each embed | |
X-Cookie (header) |
yes | Your allmanga.to browser cookies |
How to get cookies
- Open allmanga.to in your browser and pass any Cloudflare challenge
- Open DevTools then Application then Cookies and copy all the values
- Paste them as the
X-Cookieheader value
curl -H "X-Cookie: <your cookies>" \
"http://localhost:8000/anime/sources?showId=ReooPAxPMsHM4KPMY&episode=1&translationType=sub"Extract playable video URLs from any embed page URL. Pass an embed link, get back m3u8 or mp4 URLs.
| Param | Notes |
|---|---|
url |
Full embed URL |
server |
Optional hint: gogoanime streamsb doodstream streamtape mp4upload filemoon mycloud |
curl "http://localhost:8000/anime/stream?url=https://dood.wf/e/XXXXX&server=doodstream"1. Search
GET /anime/search?q=attack+on+titan
grab the "_id" from the result you want
2. Get episodes with streams
GET /anime/episodes/{id}?includeStreams=true
each episode has a "streams" array
3. Play
take any "url" from the streams array
pass Referer: https://allanimenews.com/
done. 1080p MP4, sub or dub.
| Server | Method |
|---|---|
| AllAnime CDN | Direct MP4 — no cookies needed |
| GogoAnime / VidStreaming | AES-256-CBC decryption |
| StreamSB / SBPlay | Multi-host API extraction |
| Doodstream / Dood | pass_md5 token extraction |
| Streamtape | JS innerHTML link parsing |
| Mp4Upload | Source URL scan |
| Filemoon / MoonPlayer | Packed JS + m3u8 scan |
| MyCloud / VizCloud | HLS m3u8 extraction |
FROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install fastapi "uvicorn[standard]" "httpx[http2]" beautifulsoup4 lxml pycryptodome
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]docker build -t allanime-api .
docker run -p 8000:8000 allanime-apiAllManga.to-API/
└── main.py # Everything. One file. ~640 lines.
No routers. No separate scrapers folder. No 12 config files. Just main.py.
Q: Why allmanga.to? AllAnime has a real internal GraphQL API that has been stable for years. Most sites scrape raw HTML which breaks every time they redesign. This is far more reliable.
Q: Will this break when sites get taken down? This does not depend on Kai or any site that went down. allmanga.to is an independent source. If they ever change their API I will update the code.
Q: The MP4 URL does not play in my browser
You need to send Referer: https://allanimenews.com/ with the request. Browsers do not let you set Referer manually in the address bar — use VLC, MPV, or proxy it through your own backend.
Q: Getting CAPTCHA_REQUIRED on /anime/sources
Use /anime/episodes?includeStreams=true instead. Direct CDN streams, zero cookies needed. /anime/sources is just a fallback for edge cases.
Q: Can I use this in my project? MIT licensed. Go for it.
Open an issue and I will look at it.
github.com/walterwhite-69/AllManga.to-API/issues
Include which endpoint you hit, what you expected vs what happened, and the full error message.
For personal and educational use only. Does not host, store, or redistribute any video content. All streams are sourced directly from third-party servers. Use responsibly.
Built because Kai went down and I was tired of waiting for someone else to fix it