kaizoku-core
v0.1.7
Published
The core TypeScript engine powering [kaizoku.site](https://kaizoku.site). It contains modular, tree-shakeable scrapers for popular anime providers, video extractors, AniList integration, and metadata mapping.
Readme
@kaizoku-core
The core TypeScript engine powering kaizoku.site. It contains modular, tree-shakeable scrapers for popular anime providers, video extractors, AniList integration, and metadata mapping.
Features
- 9+ Anime Providers: Anikoto, Anizone, AnimeOnsen, AnimeUnity, Gojo, AnimeGG, AniDB, AnimeSaturn, and AnimePahe.
- AniList Meta API: Search, fetch details, get popular/trending titles directly from AniList.
- AniZip Mapping: Seamless AniList-to-Provider mapping with TVDB metadata enrichment (descriptions, screencaps, air dates, episode length).
- AniSkip Skip-Times: Automatic integration with AniSkip API to fetch and inject intro/outro skip times into video streams.
- Auto Proxying: Built-in Anikuro proxy.
Providers
| Provider | Status | Notes | |---|---|---| | AniKoto | ✅ Active | Large library, consistent,recommended | | AnimePahe | ❌ Not Working | Recently switched from DDoS-Guard to Cloudflare JS Challenge — may need updates | | AniNeko | ✅ Active | Solid source for a wide range of titles, dub + sub | | AllManga | ✅ Active | Great coverage, sub + dub | | AnimeGG | ✅ Active | works ,solid source ,dub+sub | | AniZone | ✅ Active | Solid Source in my opinion ,audio(dub or sub ) is embed in the m3u8 file | | AniDB | ✅ Active | Language-aware, AniDB ID backed,you need a proxy configured and deployed on workers or it wount work | |AnimeOnsen|✅ Active | solid source ,mostly uses dash instead of m3u8 | |AnimeUnity|✅ Active | solid source ,but mostly has italian based hard sub or mostly dubed in italian,mostly focus on italian marker| |Gojo|✅ Active| multiprovider ,also known as animetsu , also scrapes other websites so multiple servers and pretty solid| |MegaPlay|✅ Active|large library mostly reuploaded hianimevideos ,uses anilist id |
Installation
npm install kaizoku-core
# or
pnpm add kaizoku-core
# or
yarn add kaizoku-coreQuick Start
1. Configuration
Set up global settings such as custom proxy options: not a must
import { configure } from 'kaizoku-core';
configure({
proxy: {
enabled: true,
generateSourceProxies: true // automatically appends anikuro proxy links
}
});2. Querying AniList
Get trending anime, popular items this season, or details:
import { anilist } from 'kaizoku-core';
// Get trending anime (paginated)
const trending = await anilist.getTrending(1, 10);
// Get detailed metadata
const details = await anilist.getAnimeDetail(166240);3. Fetching Episodes by Provider (with AniZip Enrichment)
Map an AniList ID directly to a provider and retrieve fully enriched episode data:
import { anilist } from 'kaizoku-core';
// Map AniList ID to 'anizone' and get AniZip enriched episodes
const episodes = await anilist.fetchEpisodesByProvider('166240', 'anikoto');
console.log(episodes[0]);
/*
{
id: "...",// the id of the episode used in fetchsources or fetchepisodesource functions for the provider
number: 1,
title: "...",
image: "...",
airDate: "...",
duration: 1500, // Enriched in seconds
description: "...",
providerName: "anizone"
hasdub:"",
hassub:"",
}
*/4. Fetching Episode Streams (with AniSkip)
Retrieve video stream URLs for a provider's episode. The response is automatically normalized to a unified VideoStream interface:
import { animekoto } from 'kaizoku-core'; // or from index/exports
// Fetch sources and apply AniSkip skip times
const malId = 55701;
const episodeNumber = 1;
const stream = await animekoto.fetchSources('episode-id', 'sub', 'vidstream-2');
// If you want AniSkip boundary ranges, they will be attached as:
// stream.intro -> { start: 2633, end: 2723 }
// stream.outro -> { start: 1328, end: 1418 }Build & Test
To build the project:
pnpm run buildTo run the Vitest test suite:
pnpm run testDocumentation
Full documentation, guides, and API references are available on docs.kaizoku.site (coming soon!).
