Anywhere you can run Node or Bun, use the SDK directly. Anywhere you can't, run the HTTP server and call it over HTTP.
React Native, Expo, or any native client via the HTTP server.
SSR frameworks, SPAs, or anything that runs server-side Node.
Electron, Tauri, or any desktop runtime with a Node backend.
Single-file scripts to full interactive TUIs and download managers.
APIs, Discord/Telegram bots, scheduled jobs, or media servers.
Every provider exposes search → fetchContentUnits → resolveStream
. Swap the provider, the three calls don't change.
$ npm install anime-sdk import { HttpClient, MegaPlayProvider } from 'anime-sdk';
const provider = new MegaPlayProvider(
new HttpClient({ timeoutMs: 10_000 })
);
const shows = await provider.search('Frieren');
const units = await provider.fetchContentUnits(shows[0].id);
const result = await provider.resolveStream(units[0].id);
if (result.type === 'video') console.log(result.streams[0].sourceUrl);
if (result.type === 'manga') console.log(result.pages.imageUrls);
Want sub/dub? Pass 'sub' | 'dub' | 'raw' to resolveStream
. Need a different source? Swap the provider; same three calls.
anime-sdk ships with a ready-to-run HTTP server. Routes for search, episodes, streams, and track metadata; an optional stream + subtitle proxy; bring-your-own cache with a two-method get/set interface; bearer-token auth. Point any client at it, ship.
import { startServer, AllmangaProvider, HttpClient } from 'anime-sdk';
const store = new Map();
startServer({
providers: [new AllmangaProvider(new HttpClient())],
port: 3000,
proxy: true,
cache: { get: (k) => store.get(k), set: (k, v) => store.set(k, v) },
});
// → http://localhost:3000 # search shows or manga
curl 'localhost:3000/search?q=Frieren&provider=mangadex'
# content: episodes or chapters
curl 'localhost:3000/content?mediaId=...&provider=mangadex'
# resolve: streams or image pages
curl 'localhost:3000/stream?unitId=...&provider=mangadex' Any client that speaks HTTP: React Native, Swift, Kotlin, Flutter, Python, you name it.
startServer({
providers: [new AllmangaProvider(new HttpClient())],
port: 3000,
auth: { token: process.env.API_TOKEN },
});
// Clients send:
// Authorization: Bearer <token> Skip auth entirely if it's local. The SDK works standalone too. No server required.
Most stream CDNs require a Referer header browsers can't send freely. Set proxy: true and every URL in the response becomes a plain proxied URL your player can use directly. No header
wrangling.
startServer({
providers: [new GogoanimeProvider(new HttpClient())],
port: 3000,
proxy: true, // ← that's it
});
A /proxy endpoint becomes active
and every sourceUrl in /stream responses is rewritten to go through it.
// without proxy
{
sourceUrl: "https://cdn.example.com/ep1.m3u8",
headers: { Referer: "https://provider.com/watch/..." }
}
// with proxy
{
sourceUrl: "http://localhost:3000/proxy?url=...&h=..."
}
Required headers are base64-encoded into the URL. Your frontend uses sourceUrl as-is. No header forwarding needed.
// just pass sourceUrl straight to hls.js
const hls = new Hls();
hls.loadSource(sourceUrl);
hls.attachMedia(videoEl);
// no xhrSetup. no custom headers.
// segment + key URLs rewrite automatically. HLS manifest rewriting is recursive: segment URLs, key URLs, and sub-playlist URLs all go through the proxy. The header chain propagates automatically.
9 live-tested sources. Each one verified by a real ffmpeg frame capture on every run.
Clean REST API at api.animeparadise.moe. Episodes carry a signed streamLink token; final stream served by stream.animeparadise.moe as a multi-quality HLS master, with external VTT subtitle tracks.
AllAnime GraphQL endpoint. Source URLs XOR-obfuscated then AES-CTR-decrypted; falls back through mp4upload and wixmp shares.
Scrapes episode pages on anineko.to. Resolves vibeplayer embeds to a direct HLS manifest with proxy-aware chunk URI rewriting.
Combines anikototv.to search with anikotoapi.site metadata. Resolves megaplay.buzz embeds to HLS streams with multi-language subtitle tracks.
A universal resolver that uses AniList GraphQL for search and megaplay.buzz for direct mapping. Useful for shows not yet indexed by site-specific providers.
Reads a Blogger token from player data, calls Google batchexecute, and decodes the response to a googlevideo.com stream URL.
Official JSON API at api.mangadex.org. High-quality manga metadata, cover art, and high-resolution page resolution for all chapters.
Scrapes weebcentral.com. Extracts high-quality chapter image pages with Referer protection and automatic proxy routing.
Scrapes mangapill.com. Reliable extraction of chapter page lists and direct image sources for titles not found elsewhere.
Add a provider in ~100 lines. Extend BaseProvider, implement three methods and write a test.