A fast, lightweight Node.js API to search anime, get episode lists, and stream videos — powered by Allanime.
Deploy to Cloudflare's edge network. Note: Some video sources (fast4speed) may return 403 when proxied through CF — these will redirect to direct URL instead.
cd worker
npm install
npx wrangler deployLimits: 100K requests/day, 10ms CPU time per request
Full video proxy support — works with all video sources including fast4speed. Note: 100GB bandwidth limit/month.
npm install -g vercel
vercel --prodOr deploy via GitHub: vercel.com/new
Deploy on your own VPS with nginx + SSL for unlimited bandwidth. Perfect for self-hosting with no restrictions.
git clone https://github.com/mdtahseen7/Allanime-api.git
cd Allanime-api
npm install
pm2 start src/index.js --name anime-apiThen configure nginx with your domain + Let's Encrypt SSL.
Run locally on your machine.
npm install
npm startServer runs on http://localhost:5678. Set PORT in .env to change.
Search for anime titles.
Example:
GET /search?query=one piece
Response:
[
{
"id": "ReooPAxPMsHM4KPMY",
"title": "One Piece",
"episodes_sub": 1159,
"episodes_dub": 1149
}
]Get details for a specific anime.
Example:
GET /anime/ReooPAxPMsHM4KPMY
Get the list of available episode numbers.
Example:
GET /episodes/ReooPAxPMsHM4KPMY?mode=sub
Get metadata for a specific episode, including thumbnails, title, and description.
Get the direct video URL for an episode.
Stream the video directly in your browser or any video player. This proxies the video through the API with required headers.
Example:
/play?show_id=ReooPAxPMsHM4KPMY&ep_no=1
GET /download?show_id=<id>&ep_no=<num>&mode=<sub|dub>&quality=<best|worst|1080p>&season=<S1>&title=<custom>
Download the video file directly to your device.
Auto-generated filename:
Anime_Title_S1E01_1080p.mp4
Get thumbnails for multiple anime in one request.
Body:
{
"ids": ["ReooPAxPMsHM4KPMY", "2NxpL4ikTQvnri9Cm"]
}| Parameter | Values | Default | Description |
|---|---|---|---|
mode |
sub, dub |
sub |
Subbed or dubbed version |
quality |
best, worst, 1080p, 720p, 480p |
best |
Video quality |
season |
S1, S2, etc. |
S1 |
Season number (for download) |
title |
any string | - | Custom filename (download) |
| Platform | Video Streaming | Notes |
|---|---|---|
| Vercel | Full support | 100GB/mo bandwidth limit |
| VPS Server | Full support | Unlimited bandwidth, self-hosted |
| Cloudflare Workers | Partial | fast4speed sources blocked (403), others work |
| Local | Full support | Development only |
MIT