Repository navigation
Releases
v2.6.1 — Sweep Fixes, Stream Resolver Rebuild & AniList Enrichment
AniKotoAPI v2.6.1
Full release covering 2.6.0 + 2.6.1 — both shipped 2026-10-24 (2.6.0 never got its own tag). Three sessions in one: the 2.6.0 architecture push (modular middleware/routes, AniList enrichment, cache controls), the 2.6.1 stream-resolver rebuild, and the follow-up full diagnostic sweep that closed every P0–P3 finding.
Added
- AniList Enrichment —
GET /api/anilist/:id(also?mal=21) returns synopsis, genres, scores, studios, characters, relations, recommendations and next-airing data straight from AniList's public GraphQL API — no scraping, immune to origin-site Cloudflare challenges. Unknown media returns 404, an AniList outage returns 502. - Seasonal Chart —
GET /api/anilist/season?season=WINTER&year=2026&page=1&perPage=25, defaults to the current season/year, 30 min cache per season/page. - AniList Client —
src/helper/anilist.helper.js(cached GraphQL client + MAL→AniList ID map, 60 min) shared by/anilist,info.externalIdsand/stream/embeds. - Modular Stack — middleware extracted to
src/middleware/(request ID, CORS, security headers, rate limit, timeout, validation), routes split intosrc/routes/*domain modules, spec builder moved tosrc/configs/openapi.config.js(49 paths / 13 tags);server.jsis now a pure composition root. - Cache Controls —
?refresh=1bypasses the LRU for the whole request chain (AsyncLocalStorage scope) withX-Cache: HIT/MISS/BYPASSheaders, plus an in-flight request registry so a cold key can no longer fan out into 5-mirror stampedes. - TRUST_PROXY — rate limiting keys on the real client IP behind Render/Vercel/nginx instead of the proxy's address (one noisy client can no longer 429 the whole API).
- Response Sanitizer — new
src/middleware/sanitizeJson.middleware.js: decodes HTML entities (&,', non-terminated&NBSP 1999), collapses whitespace runs and coerces stringified identity keys to numbers on every JSON response. - Rate-Limit Skip —
/api/healthand/api/openapiare exempt from the limiter so monitoring and spec readers are never throttled out of the window. - Tests — 16 new sweep-regression cases (real seasons/watch-order, ranking windows, error mapping, strict validation, payload hygiene); suite now 64 tests, and the runner prints its count after the dynamic injections so the number always matches the list.
Fixed
- Seasons & Watch Order (P0) — both endpoints served the generic trending sidebar for every anime; they now parse the real upstream AJAX fragments
GET {base}api/seasons/{animeId}andGET {base}api/watch-order/{animeId}(XHR header + Referer). Naruto → 4 real seasons (Classic Series,Shippuden Series, …), One Piece → honesttotalSeasons: 0, watch-order → 56 One Piece / 25 Naruto related entries, deduped with the anime itself excluded. Slug and numeric forms work —/api/seasons/1642used to answer 500. - Top Rankings (P0) — the selector merged all three homepage tabs (27 items, ranks 1–27, byte-identical output for every
?sort=). Now scoped per window: 9 unique slugs ranked 1–9 each,day ≠ week ≠ month, and an unknown sort returns 400 instead of silently falling back. - Fast-Fail Error Mapping (P1) — client faults no longer replay across every mirror with backoff: structured upstream
4xx/"Bad request" answers are terminal on the first try, so a bad slug returns 404 in ~0.5–1 s instead of 500 after 13–16 s; the status propagates through all 42 routecatchblocks (plus/stream, which used to wrap everything as a 502). - JSON 404s — unknown
/api/*paths return{ success: false, message: "Endpoint not found" }instead of the HTML error page; 429s carry the creator envelope again (limiter now runs after the attribution middleware);/api/mirrors/resetgained the standardresultskey. - Stream Resolver (upstream break) — the legacy
/ajax/sourceshost (megaplay-1.buzz) died in DNS, killing/stream/resolveand/stream/qualities. Resolution now callsstream/getSourcesNew → stream/getSourceson the embed host and decrypts the AES-256-CBCencpayload (key/IV from the player) to themaster.m3u8; the legacy call stays as fallback,kind: "captions"tracks count as subtitles,skipDatanormalised to the site's[start, end]shape. - Stream Qualities — the playlist fetch sent no player-origin Referer and the CDN answered 403, so
totalQualitieswas always0; it now sendsstreamRefererHeaders()and returns the real variant list. - Info Artifacts —
ratingreads#w-rating[data-score](the old text extraction doubled it:"8.73 8.73 /10"),premieredstrips upstream's&NBSP,altNamesis split + deduped,episodesisnullinstead of the literal"?". - AniList Misses —
/api/anilist/999999999→ 404 (was 502). - Validation —
?page=/ slug / letter guards rejected before any upstream call; embedslang,ep,mal,anilistnow 400 on junk instead of being silently clamped or probed; schedule rejects impossible calendar dates (2026-13-45→ 400).
Changed
- Strict Qualities —
/api/stream/qualitiesanswers 415 when the URL isn't an HLS playlist and 502 when the fetch fails, instead of returningqualities: []with 200. - Proxy Upgrade — playlists rewrite every media reference (bare lines and
URI="…"on#EXT-X-KEY/#EXT-X-MAP), one bounded retry on network/429/5xx, segments are streamed withRangeforwarded, HTML bodies are rejected instead of served as media,Content-Typederives per extension; live allowlist now covers MegaPlay's current hosts (shiora.top,ivorysummit.world,nexabloom.top,eclipseharbor.space). - Schedule Defaults —
?date=is optional (defaults to today) and must be a realYYYY-MM-DDdate. - OpenAPI — 20 parameters flagged
required: trueto match the controllers that already 400 on them; refreshed descriptions for the seasons/watch-order sources + relation limitation, ranking windows, qualities415, embeds one-of and the numeric id types. - Docs —
docs/endpoints.md,docs/testing.md,docs/architecture.md,docs/index.mdand README synced to the new behaviour and the 64-test suite;docs/diagnostic-sweep.mdgained a status header pointing at this release.
Example
GET /api/seasons/naruto-eybxz → 4 seasons (Classic, Shippuden, …)
GET /api/seasons/1642 → { totalSeasons: 0 } # honest empty
GET /api/watch-order/1642 → 56 related entries, relation: "related"
GET /api/top-rankings?sort=month → 9 unique slugs, ranks 1–9
GET /api/schedule → today's airings (no date needed)
GET /api/schedule?date=2026-13-45 → 400 Invalid date
GET /api/stream/embeds?mal=21 → ids { malId: 21, anilistId: 21 }
GET /api/info?id=one-piece-odmau → rating "8.73", episodes null, clean titles
GET /api/definitely-not-a-route → JSON 404Verified
- Integration suite: 64 passed / 0 failed / 0 skipped (avg 401 ms)
- Full diagnostic sweep re-run: 97/97 requests, 0 × 5xx, 0 × 429 — statuses
{ 200: 50, 400: 33, 403: 3, 404: 11 } node --checkclean over all 94 JS files/api/health→2.6.1,/api/openapi→2.6.1/ 49 paths,/api/stats→ 42 endpoints- Bad-slug latency:
/episodes/<bad>0.5–1 s (was 13–16 s),/watch?slug=<bad>0.47 s, 429 + unknown-path replies verified JSON - No secrets tracked in git
Notes for API consumers
- Numeric identity fields (
animeId,malId,anilistId) are now numbers;info.episodesis a number ornull - Titles/descriptions are entity-decoded and whitespace-normalised
watch-orderentries all reportrelation: "related"until upstream fixes its placeholder labels- Invalid
sort/lang/dateand unknown/api/*paths now answer400/404instead of silently succeeding
Full changelog: CHANGELOG.md
End-to-end endpoint reference: docs/endpoints.md
Diagnostic sweep (cross-repo): docs/diagnostic-sweep.md
v2.5.1 — Embed Providers, Domain Sync & Latest-Episode Checker
AniKotoAPI v2.5.1
Full release consolidating the 2026-10-13 session: domain sync with the official hub, spotlight-carousel drift fix, direct embed providers, two new bot/dev features, and a complete docs + diagnostics pass.
Added
- Direct Embed Providers — new
GET /api/stream/embedsreturning iframe-ready player URLs for Megavid, AniXo and MegaPlay. Playback happens in the provider's own iframe, so Cloudflare never blocks watch-time requests — no source-site AJAX scraping needed. - Provider Config —
src/configs/embedProviders.config.js: provider registry with URL builders (patterns verified against the AniCult provider registry). - Embed Extractor —
src/extractors/embedProviders.extractor.js: resolves the MAL ID from the site's episode list (data-mal), looks up the AniList ID via the public AniList GraphQL API (cached 60 min), builds provider URLs. - Embed Controller — supports
?slug=,?mal=,?anilist=(direct IDs skip slug scraping entirely),?ep=,?lang=sub|dub,?provider=comma filter; 400 on unknown provider or missing params. - Info External IDs —
GET /api/infonow includesexternalIds: { animeId, malId, anilistId }, resolved server-side (60 min cache, best-effort: failed resolution returnsnulls and never breaks the response). Feed the IDs straight into/api/stream/embeds. - Latest-Episode Checker — new
GET /api/episodes/latest?slug=(newepisodeLatest.controller.js): returns only the newest episode plus summary counts — built for bot polling and notification jobs. 10 min cache; registered before/episodes/:idso the literal path wins. - IDs Cache TTL — new
TTL.ids(60 min) for MAL/AniList ID mappings (these never change per anime). - OpenAPI —
/stream/embedsand/episodes/latestregistered in the spec;/infosummary notes theexternalIdsaddition. - Tests — new
Embed Providers,Embed (direct MAL),Info External IDsandLatest Episodecases.
Fixed
- Spotlight Carousel Selectors (upstream drift) — the source site redesigned the
#hotestcarousel;homeInfo.extractor.jsandspotlight.extractor.jsupdated for the new markup (swiper-slidewithout.item,a.btn.btn-primaryinstead ofa.play,h2.ak-title,.ak-detaildetails). Old-layout selectors kept as fallbacks (dual-selector). Spotlight was returning 0 items before this fix; now returns 9. - Spotlight Rating — new layout packs rating into the
.ak-detaillist alongside year/date; numeric-with-decimal matching prevents years (e.g.2026) being mistaken for ratings (e.g.7.84). - Diagnostic Sweep — stale counts fixed across README badges,
docs/index.md,docs/endpoints.mdsample responses, landing-page meta/stat counter,docs/architecture.mdcontroller/extractor counts; render.yaml trailing newline added.
Changed
- Mirror Domains Synced — verified all mirrors against the official AniKoto domain hub (
https://anikoto.site/#domains); all 5 official domains return HTTP 200. Replaced deadanikoto.sewith officialanikototv.seindataUrl.js,render.yamland README domain tables. - Top Rankings —
?sort=day|week|monthconfirmed already supported by the extractor; docs matched, no code change needed. - Documentation Style — full repo-style pass on all new modules: box headers,
FEATUREmarkers, inlineNOTE/TIPmarkers, complete JSDoc, module footers; new sections indocs/endpoints.mdanddocs/streaming.md. - Dockerfile — base image
node:18-alpine→node:22-alpine(Node 18 is EOL; aligns with README's Node 20+ guidance).
Example
GET /api/stream/embeds?slug=one-piece-odmau&ep=1150
GET /api/stream/embeds?mal=21&ep=1&lang=dub&provider=megavid,megaplay
GET /api/info?id=one-piece-odmau
→ results.externalIds = { animeId: 1642, malId: "21", anilistId: 21 }
GET /api/episodes/latest?slug=one-piece-odmau
→ results.latest = { episode_no: 1180, server_ids: "...", mal_id: "21" }
Verified
- Full API suite: 38 passed / 0 failed / 2 optional skips (Servers + Stream Resolve — documented upstream AJAX blocks)
- 77 JS files pass
node --check; all relative imports resolve - All 3 embed provider URLs live-verified HTTP 200 (Megavid serves an embed-only page by design)
- Official domains all HTTP 200:
anikototv.to(primary),anikoto.cz,anikoto.me,anikoto.net,anikototv.se; deadanikoto.seconfirmed offline - No secrets tracked in git
Full changelog: see CHANGELOG.md
End-to-end endpoint reference: docs/endpoints.md
v2.4.1 — Security Patch (SSRF Fix)
🔒 Security Patch — SSRF Fix
Critical security fix for unauthenticated Server-Side Request Forgery (SSRF) in the stream proxy endpoints.
🛡️ Security
- CRITICAL: Fixed unauthenticated SSRF in
/api/stream/proxyand/api/stream/ts-proxy- The proxy endpoint domain allowlist had an escape hatch (
pathname.endsWith(".m3u8")) that let any host through as long as the path looked like a playlist /api/stream/ts-proxyhad no destination check at all — the URL went straight toaxios.get- Both could be used to fetch internal services (127.0.0.1, 169.254.169.254) and read responses
- The proxy endpoint domain allowlist had an escape hatch (
- Added shared
streamProxy.helper.jswith:- Real allowlist by registrable domain (subdomains covered)
- Private/loopback/link-local/CGNAT address blocking as second layer
- HTTPS-only scheme enforcement
- Removed dead domain
megaplay-1.buzzfrom allowlist - Added
vid-tube.siteand CDNs currently serving streams (norami.top,kryntal.top,akirax.buzz) - Added
SECURITY.mdwith vulnerability reporting policy
🐛 Fixed
- Environment loading: Fixed
dotenv.config()being called after static imports — helpers readingprocess.envat module top level (mirror, cache, proxy, streamProxy) were never receiving.envvalues. Changed toimport "dotenv/config"as the first import so.envis populated before any helper module loads- Affected settings:
MIRROR_DOMAINS,MIRROR_CACHE_TTL,CACHE_MAX_SIZE,CACHE_DEFAULT_TTL,SCRAPER_API_KEY,FLARESOLVERR_URL,STREAM_PROXY_DOMAINS,STREAM_PROXY_REFERER
- Affected settings:
✨ Added
- Stream Proxy Allowlist Config: New
STREAM_PROXY_DOMAINSenv var to override the built-in domain allowlist (comma-separated) - Stream Proxy Referer Config: New
STREAM_PROXY_REFERERenv var to override the Referer header sent to stream CDNs (default:https://megaplay.buzz/) - Maintenance Badge: Added to README
- Security Contributors: Credit to @jamil182 in README and CHANGELOG
🧪 Tests
- Marked upstream-dependent tests (Servers, Stream Resolve, Upcoming, Top Rankings, Recently Updated, Completed, Status, OpenAPI) as
optional: true— they skip gracefully when the scraping target blocks requests
📦 Files Changed
| File | Change |
|---|---|
src/helper/streamProxy.helper.js |
New — SSRF guard with allowlist + private IP blocking |
SECURITY.md |
New — vulnerability reporting policy |
server.js |
dotenv load order fix |
src/routes/apiRoutes.js |
Proxy validation using shared guard |
test.js |
Upstream-dependent tests marked optional |
.env.example |
New config vars documented |
package.json |
Version 2.4.0 → 2.4.1 |
README.md |
Maintenance badge + security credits |
CHANGELOG.md |
v2.4.1 entry |
docs/*.md |
Version references updated |
🙏 Credits
Thanks to @jamil182 for discovering and fixing this vulnerability, and for the security policy.
Full Changelog: 2.4.0...v2.4.1
v2.4.0 — Proxy Support & Streaming Fix
What's New
🛡️ Proxy Support (NEW)
- ScraperAPI Integration — Route requests through ScraperAPI premium residential IPs when direct requests fail
- FlareSolverr Integration — Route requests through self-hosted FlareSolverr browser when direct requests fail
- Proxy Status Endpoint —
GET /api/proxy/statusshows configured proxy providers - Auto Proxy Fallback —
fetchWithMirror()automatically falls back to configured proxies when all mirrors fail - Cloudflare Detection — Detects Cloudflare challenge pages and triggers proxy fallback
📺 Streaming Status
- Added
⚠️ Streaming Status section documenting which endpoints work vs which are blocked - Added solutions table with SCRAPER_API_KEY and FLARESOLVERR_URL env vars
🔧 New Files
src/helper/proxy.helper.js— Unified proxy support for ScraperAPI + FlareSolverr
Bug Fixes
🚨 CRITICAL
- Fixed
/api/streamreturningnullURL — Upstream AJAX endpoints (/ajax/server?get=,/ajax/server/list?servers=) require session cookies; now properly detects upstream 500 errors and returns HTTP 502 with error message
🐛 Other Fixes
- Cookie-aware session establishment in
extractStreamInfoandextractServerList - Upstream error detection — detects
status >= 400and non-JSON error strings - Optional
?slug=parameter for session establishment
Changes
- Mirror helper now includes proxy fallback and Cloudflare detection
- Updated all docs with streaming status warnings
- Version bumped to 2.4.0
Environment Variables
# Option 1: ScraperAPI (requires premium plan — $49/month)
SCRAPER_API_KEY=your_scraperapi_key
# Option 2: FlareSolverr (self-hosted, unlimited)
FLARESOLVERR_URL=http://your-flaresolverr-host:8191Full Changelog: v2.2.2...v2.4.0
v2.2.0 — Streaming Resolver, M3U8 Proxy & Full Diagnostic Sweep
AniKotoAPI v2.2.0
A massive update with streaming URL resolution, M3U8/TS proxy for CORS-free playback, 5 new endpoints, a full diagnostic sweep fixing 8 bugs, and complete modularization of the codebase.
What's New
Streaming URL Resolver
The /api/stream endpoint now has a companion resolver that takes embed URLs and returns actual video file URLs (m3u8/mp4).
| Endpoint | Description |
|---|---|
GET /api/stream/resolve?id=&slug= |
Resolve embed URL to actual m3u8/mp4 video URL |
GET /api/stream/qualities?url= |
Parse M3U8 playlist for available quality options (360p, 480p, 720p, 1080p) |
GET /api/stream/proxy?url= |
M3U8 playlist proxy — rewrites relative URLs for CORS-free HLS playback |
GET /api/stream/ts-proxy?url= |
TS video segment proxy with proper Content-Type and CORS headers |
How it works:
/api/stream?id={link_id} → embed URL (vidtube.site/stream/...)
/api/stream/resolve?id={link_id} → actual video URL (m3u8/mp4)
/api/stream/proxy?url={m3u8_url} → rewritten M3U8 with proxy URLs
The M3U8 proxy fetches playlists from the source, rewrites all relative .m3u8 and .ts URLs to proxy through our API, and adds CORS headers — enabling browser playback of HLS streams that would otherwise be blocked by CORS.
New Endpoints (5)
| Endpoint | Description |
|---|---|
GET /api/upcoming |
Upcoming anime releases sorted by air date |
GET /api/top-rankings |
Top-ranked anime from sidebar with rank numbers |
GET /api/recently-updated?tab=all|sub|dub |
Recently updated anime with tab filtering |
GET /api/completed |
Finished anime series sorted by score |
GET /api/stream/resolve |
Resolve embed URLs to actual video URLs |
Total: 38 endpoints (up from 33)
Bug Fixes (from Full Diagnostic Sweep)
| Bug | Fix |
|---|---|
/api/watch 500 error |
Path format changed from /slug/ep to /slug/ep-N |
/api/info 400 error |
Now accepts both ?id= and ?slug= params |
/api/status/airing 500 |
Added status name mapping (ongoing→currently-airing) |
/api/top-rankings 0 items |
Fixed selectors to #top-anime .scaff.side.items a.item |
/api/completed 0 items |
Fixed selectors for section.top-table[data-name=completed] |
/api/recently-updated 0 items |
Fixed selectors for #recent-update .ani.items .item |
parseListItem self-anchor |
Added detection when item IS the <a> tag |
/api/cache/stats 404 |
Added missing endpoint to apiRoutes.js |
Stream Info Improvements
- Session establishment:
streamInfo.extractor.jsnow fetches the watch page first to establish session cookies before AJAX calls - Server name normalization: Display names mapped to clean identifiers (VidPlay-1 → vidplay, HD-1 → hd)
- Type field: Server objects now include
type: "hls"ortype: "mp4"based on file extension - Subtitle extraction: Subtitle tracks extracted from streaming API responses
Mirror Fallback Fix
The mirror helper previously marked mirrors as "failed" when they returned 404 responses. This caused all 5 mirrors to be marked as failed when endpoints like /api/seasons or /api/watch-order returned 404 (because the AJAX endpoints don't exist on the source site).
Fix: 404 responses no longer mark mirrors as failed. Only connection errors trigger mirror failover.
Codebase Modularization
Shared Helpers
parseListItem.helper.js— Unified list item parser with self-anchor detection, eliminating ~200 lines of duplicated code across 8+ extractorsmirror.helper.js— All 22+ extractors now usefetchWithMirror()for consistent mirror fallback
Extractor Rewrites
seasons.extractor.js— Now extracts from watch page sidebar (AJAX endpoints don't exist on source site)watchOrder.extractor.js— Now extracts from watch page sidebar trending/related sections
Security & Performance
- Graceful shutdown (SIGTERM/SIGINT handlers)
- Request ID tracking (X-Request-Id header)
- CSP and HSTS security headers
- Body size limits (10kb)
- Rate limiter cleanup (stale IP eviction every 5 min)
- Uncaught exception handler
- Removed unused
corsdependency
Documentation
- README.md: Version 2.2.0, 38 endpoints, streaming resolver/proxy docs
- CHANGELOG.md: Full v2.2.0 entry
- docs/endpoints.md: 8 new endpoint sections
- docs/streaming.md: Stream URL resolution, M3U8 quality parsing, proxy docs
- docs/architecture.md: Updated file structure, streaming flow, dependencies
- docs/examples.md: New endpoint examples
- agents/: Updated all agents to reference 38 endpoints
Test Results
34/34 endpoints passing with 0 errors in the full diagnostic sweep.
Full Changelog: https://github.com/Shineii86/AniKotoAPI/commits/v2.2.0
v2.1.0 — Claude Design System Redesign
What's New
UI Redesign (Claude/Anthropic Design System)
Complete visual overhaul of all HTML pages adopting the Claude/Anthropic design language:
- Warm Cream Canvas (
#faf9f5) — Replaced dark purple theme with a distinctly warm, editorial cream background - Coral Accent (
#cc785c) — Signature Anthropic coral for all primary CTAs and accent elements - Slab-Serif Headlines — Cormorant Garamond at weight 400 with negative letter-spacing for a literary, editorial voice
- Dark Navy Surfaces (
#181715) — Code blocks, terminal panels, and footer use dark navy for product chrome contrast - Light Cream Cards (
#efe9de) — Feature cards use a slightly darker cream for visual hierarchy - Minimal Shadows — Color-block depth philosophy; shadows are rare, depth comes from surface contrast
- Removed Effects — Ambient orbs, floating particles, glitch animations, and scanlines removed for cleaner editorial feel
Design Principles Applied
- Cream + coral + dark navy trinity as the brand color palette
- Copernicus/Cormorant serif for display headlines (weight 400, negative tracking)
- Inter humanist sans for body text and UI labels
- 96px section rhythm with generous card padding (32px)
- Border radius hierarchy: 8px buttons, 12px cards, 16px hero
- Hierarchical surface modes: canvas → soft → card → dark
Files Changed
public/index.html— Landing page with 2-column hero, dark code console, feature grid, endpoint explorer, playground, coral CTApublic/404.html— Minimal error page with large serif 404, coral accentpublic/tos.html— Terms of Service with warm cream stylingpublic/privacy.html— Privacy Policy with warm cream styling
Version Changes
- Version bumped from 2.0.2 to 2.1.0
- Updated all documentation to reflect new design system
- Updated CHANGELOG with full redesign notes
Full Changelog: v2.0.2...v2.1.0
v2.0.0 - Major Release
AniKotoAPI v2.0.0
A major release with significant improvements to reliability, performance, and developer experience.
Highlights
- Multi-Mirror Fallback — Automatic failover across 5 mirror domains
- LRU Cache — Configurable TTL per endpoint type
- Pagination Metadata — Standardized pagination in all list responses
- Creator Info Middleware — Attribution injected into every response
- 4 New Endpoints — Seasons, Watch Order, Latest Updated, Download
What's New
New Endpoints
| Endpoint | Description |
|---|---|
GET /api/seasons/:id |
All seasons/OVAs/movies for an anime |
GET /api/watch-order/:id |
Related anime with relationship types |
GET /api/latest-updated |
Recently updated anime sorted by update time |
GET /api/download?slug=&ep= |
Decoded download links from base64 data |
GET /api/cache/stats |
Cache hits, misses, sets, size, hitRate |
GET /api/mirrors |
Health status and latency for all domains |
POST /api/mirrors/reset |
Clear mirror cache and failed state |
Pagination Metadata
All list endpoints now include standardized pagination:
{
"pagination": {
"currentPage": 1,
"totalPages": 294,
"totalItems": 8820,
"itemsPerPage": 30,
"hasNext": true,
"hasPrev": false
}
}Creator Info Middleware
Every JSON response now includes:
{
"creator": "Shinei Nouzen",
"github": "https://github.com/Shineii86",
"telegram": "https://telegram.me/Shineii86",
"message": "Built with ❤️ by Shinei Nouzen",
"timestamp": "4/7/2026, 3:50:48 pm"
}Multi-Mirror Fallback
Automatic failover across 5 domains:
anikototv.to(Primary)anikoto.cz(Regional CZ)anikoto.me(Short TLD)anikoto.net(Network)anikototv.se(Nordic .se)
Health checks mark failed mirrors, session caching avoids re-probing.
LRU Cache
- Configurable TTL per endpoint type (3min to 60min)
- LRU eviction when cache is full
- Cache stats endpoint for monitoring
Rate Limiting
- Configurable via
RATE_LIMITandRATE_WINDOWenv vars X-RateLimit-LimitandX-RateLimit-RemainingheadersRetry-Afterheader in 429 responses
Response Compression
- Gzip compression (level 6, 1024 byte threshold)
- Reduces response sizes by ~70%
Bug Fixes
- CRITICAL: Fixed
extractPagesURL handling bug causing doubled URLs in mirror fallback - CRITICAL: Fixed
creatorInfomiddleware not includingmessagefield in responses - Fixed header merging bug in mirror helper (custom headers were ignored)
- Fixed mirror URL construction (proper base URL handling)
- Fixed cache key sorting in filter controller
- Fixed trailing slash inconsistency in console output
- Fixed inconsistent error handling across extractors
Environment Variables
| Variable | Default | Description |
|---|---|---|
RATE_LIMIT |
100 |
Requests per window |
RATE_WINDOW |
60000 |
Window in ms |
CACHE_MAX_SIZE |
500 |
Max cache entries |
CACHE_DEFAULT_TTL |
300000 |
Default TTL in ms |
MIRROR_DOMAINS |
5 domains | Comma-separated mirror URLs |
MIRROR_CACHE_TTL |
3600000 |
Mirror health cache TTL |
REQUEST_TIMEOUT |
30000 |
Request timeout in ms |
Breaking Changes
- All extractors now use mirror fallback helper for resilience
- Cache system upgraded from simple Map to LRU with eviction
- Rate limiting now configurable via environment variables
Endpoints: 33 total
Core: Home, Search, Info, Watch, Episodes, Episodes Ajax
Streaming: Servers, Stream, Download, Mapper Servers
Discovery: Spotlight, Trending, Top 10, Random, Suggestions, Most Popular
Lists: New Release, Newly Added, Latest Updated, Trending Sidebar, AZ List
Filter: Filter, Genre, Type, Status
Anime: Seasons, Watch Order, Schedule
System: Health, Stats, Cache Stats, Mirrors, Mirrors Reset, OpenAPI
Links
- Live API: https://anikototvapi.vercel.app/api
- Documentation: https://github.com/Shineii86/AniKotoAPI#readme
- Changelog: https://github.com/Shineii86/AniKotoAPI/blob/main/CHANGELOG.md
Full Changelog: v1.9.0...v2.0.0
v1.9.0 — Added More Bugs To Fix Later
🔍 Full Diagnostic Sweep — 42 Issues Fixed
Fixed
CRITICAL (7):
- Added global Express error handler (returns JSON instead of HTML)
- Removed caching from random endpoint (defeated purpose)
- Renamed share.jpg → share.png (MIME type mismatch)
- Fixed OG image dimensions (630 → 601)
- Fixed manifest.json icon sizes (192x192 → 512x512)
- Fixed implicit global event variable in console
- Added 9 missing endpoints to docs/endpoints.md
HIGH (12):
- Imported version from package.json (no hardcoded drift)
- Added dynamic endpoint count in stats
- Added input sanitization for mapper API (SSRF prevention)
- Added homepage caching (reduced 5 duplicate HTTP requests)
- Added rate limiting (100 requests/minute per IP)
- Added
rel="noopener noreferrer"to alltarget="_blank"links - Fixed trailing slash inconsistency in console
- Added noindex meta to 404.html
- Fixed docs/architecture.md controller filenames and dependency versions
- Fixed README.md dependency versions
- Added 12 missing endpoint tests
MEDIUM (22):
- Added escapeHtml helper for error messages
- Consistent favicon across all pages
- Added meta descriptions to privacy.html and tos.html
- Added OG/Twitter meta tags to privacy.html and tos.html
- Added aria-label to playground inputs
- Added aria-hidden to decorative SVGs
- Synced Twitter description with OG description
- Fixed robots.txt to disallow /api
- Added PWA fields to manifest.json
- Removed 5 unused imports
- Removed unused cookie-parser dependency
- Fixed inconsistent error handling in extractors
- Fixed resolvedSlug returning numeric ID
- Added /watch endpoint to streaming docs
- Improved test assertions and status code validation
- Deleted orphaned og-image.svg and logo.png
LOW (11):
- Removed redundant try/catch from extractPages
- Added max size eviction to cache
- Added cache key sorting in filter controller
- Added author meta tag
- Fixed favicon.svg font
30 files changed | 404 insertions | 139 deletions
v1.8.0 — Full Diagnostic Sweep
🔍 Full Diagnostic Sweep — 20 Bugs Fixed
Fixed
- CRITICAL:
extractPages.helper.js— Pagination URL bug (?page→&pagewhen URL already has query params) - CRITICAL:
package.json— Fixed invalid dependency versions (axios ^1.7.0, dotenv ^16.4.0, express ^4.21.0) privacy.html+tos.html— Fixed broken footer links (//tos→/tos,//privacy→/privacy)manifest.json— Fixed invalid icon purpose ("any maskable"→"maskable")server.js— Removed duplicate CORS middleware (was using bothcors()package and custom middleware)server.js— Removed unusedcorsimportserver.js— Added__dirnamecomputation (was missing)search.controller.js— Fixed cache key collision with suggestion controllerapiRoutes.js— Made endpoint count dynamic (was hardcoded 27)- Updated endpoint count from 27→30 across all documentation files
- Fixed axios version in package.json (^1.7.0 → ^1.8.0)
vercel.json— Removed duplicate CORS header (server.js handles it)
Changed
header.config.js— Updated User-Agent to Chrome 130 (was Chrome 120)dataUrl.js— Removed redundantanikototv.tofrom ALT_DOMAINScategory.extractor.js— Removed unusedcheerioimporttest.js— Updated test script in package.json to actually run tests- Version bumped to 1.8.0
Security
- Unified CORS handling in server.js (single middleware instead of triple)
- Removed Vercel-level CORS header (Express handles it)
- Fixed XSS potential in index.html error display (used textContent pattern)
v1.7.3 — Health & Episode Fixes
🩹 Health & Episode Fixes
Fixed
- Health endpoint typo:
s→secondsin uptime string formatting - Request counter middleware moved before route registrations (was never executing)
- Request counter now properly tracks all API requests and errors