Skip to content

mdtahseen7/Allanime-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Allanime API

A fast, lightweight Node.js API to search anime, get episode lists, and stream videos — powered by Allanime.

Deployment Options

Option 1: Cloudflare Workers (Free, Serverless)

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 deploy

Limits: 100K requests/day, 10ms CPU time per request


Option 2: Vercel (Free, Best Streaming Support)

Full video proxy support — works with all video sources including fast4speed. Note: 100GB bandwidth limit/month.

npm install -g vercel
vercel --prod

Or deploy via GitHub: vercel.com/new


Option 3: VPS Server (Unlimited Bandwidth)

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

Then configure nginx with your domain + Let's Encrypt SSL.


Option 4: Local / Node.js Server

Run locally on your machine.

npm install
npm start

Server runs on http://localhost:5678. Set PORT in .env to change.


Endpoints

GET /search?query=<query>

Search for anime titles.

Example:

GET /search?query=one piece

Response:

[
  {
    "id": "ReooPAxPMsHM4KPMY",
    "title": "One Piece",
    "episodes_sub": 1159,
    "episodes_dub": 1149
  }
]

GET /anime/<id>

Get details for a specific anime.

Example:

GET /anime/ReooPAxPMsHM4KPMY

GET /episodes/<id>?mode=<sub|dub>

Get the list of available episode numbers.

Example:

GET /episodes/ReooPAxPMsHM4KPMY?mode=sub

GET /episode_info?show_id=<id>&ep_no=<num>

Get metadata for a specific episode, including thumbnails, title, and description.


GET /episode_url?show_id=<id>&ep_no=<num>&mode=<sub|dub>&quality=<best|worst|1080p>

Get the direct video URL for an episode.


GET /play?show_id=<id>&ep_no=<num>&mode=<sub|dub>&quality=<best|worst|1080p>

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

POST /thumbnails

Get thumbnails for multiple anime in one request.

Body:

{
  "ids": ["ReooPAxPMsHM4KPMY", "2NxpL4ikTQvnri9Cm"]
}

Parameters

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)

Deployment Comparison

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

License

MIT

About

Allanime-Api with inbuilt streaming support and direct downloads. Deploy to vercel or any VPS if u want every endpoint working, cf is having 403 issues or wait until fix is found.

Topics

Resources

License

Stars

Watchers

Forks

Contributors