AniKotoAPI v2.2.1
Free REST API for Anime Data
Scraping anikototv.to with Cheerio

A fast, free REST API that scrapes anime data from anikototv.to.
Built with Node.js, Cheerio, and deployed on Vercel serverless functions.
// === QUICK START ===
Get started in 3 steps:
Step 1 — Make your first request:
Step 2 — Search for an anime:
Step 3 — Get anime info:
That's it. No API keys required.
// === FEATURES ===
| Feature |
Description |
| 38+ Endpoints |
Full coverage of anime data, streaming, and discovery |
| 28 HTML Scrapers |
Cheerio-based scrapers for robust data extraction |
| 28 Route Handlers |
Organized controllers with clean separation of concerns |
| 5 Mirror Domains |
Automatic failover across multiple source domains |
| LRU Cache |
Per-endpoint TTL caching for performance |
| Rate Limiting |
100 requests per 15 minutes per IP |
| GZIP Compression |
Compressed responses for faster transfers |
| Vercel Deployment |
Zero-config serverless deployment |
| OpenAPI Spec |
Auto-generated API documentation at /api/openapi |
| Health Checks |
System status and cache monitoring endpoints |
// === ENDPOINTS OVERVIEW ===
Home
| Method |
Endpoint |
Description |
| GET |
/api/ |
Homepage data: featured, spotlight, sidebar content |
Anime
| Method |
Endpoint |
Description |
| GET |
/api/info |
Full anime info, episodes, relations, recommendations |
| GET |
/api/seasons/:id |
Season/episode details for an anime |
| GET |
/api/watch-order/:id |
Canonical watch order for a series |
Search
| Method |
Endpoint |
Description |
| GET |
/api/search |
Search anime by title |
| GET |
/api/search/suggest |
Autocomplete suggestions |
| GET |
/api/suggestions |
Trending/general suggestions |
Episodes
| Method |
Endpoint |
Description |
| GET |
/api/episodes/:id |
Episode list for an anime |
| GET |
/api/episodes-ajax/:id |
Lazy-loaded episode pagination |
Streaming
| Method |
Endpoint |
Description |
| GET |
/api/stream |
Master stream URL for an episode |
| GET |
/api/servers |
Available servers for an episode |
| GET |
/api/stream/resolve |
Resolve a streaming URL |
| GET |
/api/stream/qualities |
Available quality variants |
| GET |
/api/stream/proxy |
Proxied video stream |
| GET |
/api/stream/ts-proxy |
Proxied TS segment stream |
| GET |
/api/watch |
Watch page with stream data |
| GET |
/api/download |
Download link for an episode |
| GET |
/api/mapper-servers |
Server name mappings |
Discovery
| Method |
Endpoint |
Description |
| GET |
/api/spotlight |
Featured/spotlight anime |
| GET |
/api/trending |
Currently trending anime |
| GET |
/api/top-ten |
Top 10 rankings |
| GET |
/api/random |
Random anime recommendation |
| GET |
/api/most-popular |
Most popular anime |
| GET |
/api/trending-sidebar |
Trending sidebar widget data |
Releases
| Method |
Endpoint |
Description |
| GET |
/api/new-release |
Recently released episodes |
| GET |
/api/newly-added |
Newly added anime |
| GET |
/api/latest-updated |
Latest updated anime |
| GET |
/api/recently-updated |
Recently updated entries |
| GET |
/api/completed |
Completed anime |
| GET |
/api/upcoming |
Upcoming anime |
Rankings
| Method |
Endpoint |
Description |
| GET |
/api/top-rankings |
Top ranked anime by category |
Categories
| Method |
Endpoint |
Description |
| GET |
/api/genre/:name |
Anime by genre |
| GET |
/api/type/:name |
Anime by type (TV, Movie, OVA, etc.) |
| GET |
/api/status/:name |
Anime by status (Airing, Completed, etc.) |
| GET |
/api/az-list/:letter |
Alphabetical listing |
| GET |
/api/filter |
Multi-criteria filter |
Schedule
| Method |
Endpoint |
Description |
| GET |
/api/schedule |
Anime release schedule |
System
| Method |
Endpoint |
Description |
| GET |
/api/health |
Health check / uptime |
| GET |
/api/stats |
API statistics |
| GET |
/api/cache/stats |
Cache hit/miss statistics |
| GET |
/api/mirrors |
List available mirror domains |
| POST |
/api/mirrors/reset |
Reset failover mirror state |
| GET |
/api/openapi |
OpenAPI/Swagger spec |
// === ARCHITECTURE ===
Key Design Patterns
- Scraping Layer: 28 Cheerio-based scrapers parse HTML from anikototv.to, isolating page-specific logic from route handlers.
- Controller Layer: 28 route handlers map HTTP requests to scraper calls, handle validation, and format responses.
- Cache Layer: LRU cache with per-endpoint TTL reduces redundant scraping. Hot endpoints cache for 2–5 minutes; cold endpoints for 10+ minutes.
- Mirror Layer: 5 source domains with automatic failover. If one domain is slow or down, requests transparently fall back to the next mirror.
- Rate Limiter: Token bucket algorithm, 100 requests per 15-minute window per client IP.
// === GETTING STARTED ===
Using cURL
Using JavaScript (fetch)
Using Python (requests)
Using Node.js (axios)
// === RATE LIMITING ===
- Limit: 100 requests per 15-minute window
- Scope: Per client IP address
- Headers: Rate limit info returned in response headers
- Exceeded: Returns
429 Too Many Requests
If you hit the rate limit, wait for the window to reset before retrying.
// === MIRROR FAILOVER ===
AniKotoAPI maintains 5 mirror domains. When a request fails on the primary domain, the system automatically retries on the next available mirror.
Use /api/mirrors to check current mirror status, or POST /api/mirrors/reset to reset the failover state.
// === CACHING ===
The API uses an LRU (Least Recently Used) cache with per-endpoint TTL:
| Endpoint Category |
TTL |
| Home / Spotlight |
2 minutes |
| Search |
3 minutes |
| Anime Info |
5 minutes |
| Streaming |
1 minute |
| Rankings / Lists |
10 minutes |
Cache stats available at /api/cache/stats.
// === ERROR RESPONSES ===
All errors return JSON with a consistent structure:
| Status |
Meaning |
| 400 |
Bad request / missing parameters |
| 404 |
Resource not found |
| 429 |
Rate limit exceeded |
| 500 |
Internal server error |
// === DOCUMENTATION ===
// === CONTRIBUTING ===
Contributions are welcome. To contribute:
- Fork the repository from GitHub
- Create a feature branch:
git checkout -b feature/my-feature
- Make your changes and test them
- Commit with a clear message
- Push and open a Pull Request
Development Setup
Guidelines
- Follow existing code style and patterns
- Add scrapers in
scrapers/ for new pages
- Add route handlers in
api/ for new endpoints
- Update documentation when adding features
- Test all changes before submitting
// === LICENSE ===
This project is licensed under the MIT License.
// === LINKS ===
// ══════ END: index.md ══════