Skip to content

Releases

v2.6.1 — Sweep Fixes, Stream Resolver Rebuild & AniList Enrichment

Choose a tag to compare

@Shineii86 Shineii86 released this 26 Oct 02:29

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.externalIds and /stream/embeds.
  • Modular Stack — middleware extracted to src/middleware/ (request ID, CORS, security headers, rate limit, timeout, validation), routes split into src/routes/* domain modules, spec builder moved to src/configs/openapi.config.js (49 paths / 13 tags); server.js is now a pure composition root.
  • Cache Controls — ?refresh=1 bypasses the LRU for the whole request chain (AsyncLocalStorage scope) with X-Cache: HIT/MISS/BYPASS headers, 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/health and /api/openapi are 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} and GET {base}api/watch-order/{animeId} (XHR header + Referer). Naruto → 4 real seasons (Classic Series, Shippuden Series, …), One Piece → honest totalSeasons: 0, watch-order → 56 One Piece / 25 Naruto related entries, deduped with the anime itself excluded. Slug and numeric forms work — /api/seasons/1642 used 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 route catch blocks (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/reset gained the standard results key.
  • Stream Resolver (upstream break) — the legacy /ajax/sources host (megaplay-1.buzz) died in DNS, killing /stream/resolve and /stream/qualities. Resolution now calls stream/getSourcesNew → stream/getSources on the embed host and decrypts the AES-256-CBC enc payload (key/IV from the player) to the master.m3u8; the legacy call stays as fallback, kind: "captions" tracks count as subtitles, skipData normalised to the site's [start, end] shape.
  • Stream Qualities — the playlist fetch sent no player-origin Referer and the CDN answered 403, so totalQualities was always 0; it now sends streamRefererHeaders() and returns the real variant list.
  • Info Artifacts — rating reads #w-rating[data-score] (the old text extraction doubled it: "8.73 8.73 /10"), premiered strips upstream's &NBSP, altNames is split + deduped, episodes is null instead of the literal "?".
  • AniList Misses — /api/anilist/999999999 → 404 (was 502).
  • Validation — ?page= / slug / letter guards rejected before any upstream call; embeds lang, ep, mal, anilist now 400 on junk instead of being silently clamped or probed; schedule rejects impossible calendar dates (2026-13-45 → 400).

Changed

  • Strict Qualities — /api/stream/qualities answers 415 when the URL isn't an HLS playlist and 502 when the fetch fails, instead of returning qualities: [] 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 with Range forwarded, HTML bodies are rejected instead of served as media, Content-Type derives 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 real YYYY-MM-DD date.
  • OpenAPI — 20 parameters flagged required: true to match the controllers that already 400 on them; refreshed descriptions for the seasons/watch-order sources + relation limitation, ranking windows, qualities 415, embeds one-of and the numeric id types.
  • Docs — docs/endpoints.md, docs/testing.md, docs/architecture.md, docs/index.md and README synced to the new behaviour and the 64-test suite; docs/diagnostic-sweep.md gained 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 404

Verified

  • 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 --check clean 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.episodes is a number or null
  • Titles/descriptions are entity-decoded and whitespace-normalised
  • watch-order entries all report relation: "related" until upstream fixes its placeholder labels
  • Invalid sort / lang / date and unknown /api/* paths now answer 400 / 404 instead 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

Choose a tag to compare

@Shineii86 Shineii86 released this 13 Oct 01:58

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/embeds returning 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/info now includes externalIds: { animeId, malId, anilistId }, resolved server-side (60 min cache, best-effort: failed resolution returns nulls and never breaks the response). Feed the IDs straight into /api/stream/embeds.
  • Latest-Episode Checker — new GET /api/episodes/latest?slug= (new episodeLatest.controller.js): returns only the newest episode plus summary counts — built for bot polling and notification jobs. 10 min cache; registered before /episodes/:id so the literal path wins.
  • IDs Cache TTL — new TTL.ids (60 min) for MAL/AniList ID mappings (these never change per anime).
  • OpenAPI — /stream/embeds and /episodes/latest registered in the spec; /info summary notes the externalIds addition.
  • Tests — new Embed Providers, Embed (direct MAL), Info External IDs and Latest Episode cases.

Fixed

  • Spotlight Carousel Selectors (upstream drift) — the source site redesigned the #hotest carousel; homeInfo.extractor.js and spotlight.extractor.js updated for the new markup (swiper-slide without .item, a.btn.btn-primary instead of a.play, h2.ak-title, .ak-detail details). 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-detail list 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.md sample responses, landing-page meta/stat counter, docs/architecture.md controller/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 dead anikoto.se with official anikototv.se in dataUrl.js, render.yaml and README domain tables.
  • Top Rankings — ?sort=day|week|month confirmed already supported by the extractor; docs matched, no code change needed.
  • Documentation Style — full repo-style pass on all new modules: box headers, FEATURE markers, inline NOTE/TIP markers, complete JSDoc, module footers; new sections in docs/endpoints.md and docs/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; dead anikoto.se confirmed 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)

Choose a tag to compare

@Shineii86 Shineii86 released this 27 Aug 09:48

🔒 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/proxy and /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-proxy had no destination check at all — the URL went straight to axios.get
    • Both could be used to fetch internal services (127.0.0.1, 169.254.169.254) and read responses
  • Added shared streamProxy.helper.js with:
    • 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.buzz from allowlist
  • Added vid-tube.site and CDNs currently serving streams (norami.top, kryntal.top, akirax.buzz)
  • Added SECURITY.md with vulnerability reporting policy

🐛 Fixed

  • Environment loading: Fixed dotenv.config() being called after static imports — helpers reading process.env at module top level (mirror, cache, proxy, streamProxy) were never receiving .env values. Changed to import "dotenv/config" as the first import so .env is 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

✨ Added

  • Stream Proxy Allowlist Config: New STREAM_PROXY_DOMAINS env var to override the built-in domain allowlist (comma-separated)
  • Stream Proxy Referer Config: New STREAM_PROXY_REFERER env 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

Choose a tag to compare

@Shineii86 Shineii86 released this 14 Aug 02:22

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/status shows 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/stream returning null URL — 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 extractStreamInfo and extractServerList
  • Upstream error detection — detects status >= 400 and 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:8191

Full Changelog: v2.2.2...v2.4.0

v2.2.0 — Streaming Resolver, M3U8 Proxy & Full Diagnostic Sweep

Choose a tag to compare

@Shineii86 Shineii86 released this 28 Jul 15:36

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.js now 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" or type: "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+ extractors
  • mirror.helper.js — All 22+ extractors now use fetchWithMirror() 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 cors dependency

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

Choose a tag to compare

@Shineii86 Shineii86 released this 05 Jul 12:05

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 CTA
  • public/404.html — Minimal error page with large serif 404, coral accent
  • public/tos.html — Terms of Service with warm cream styling
  • public/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

Choose a tag to compare

@Shineii86 Shineii86 released this 04 Jul 11:01

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:

  1. anikototv.to (Primary)
  2. anikoto.cz (Regional CZ)
  3. anikoto.me (Short TLD)
  4. anikoto.net (Network)
  5. 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_LIMIT and RATE_WINDOW env vars
  • X-RateLimit-Limit and X-RateLimit-Remaining headers
  • Retry-After header in 429 responses

Response Compression

  • Gzip compression (level 6, 1024 byte threshold)
  • Reduces response sizes by ~70%

Bug Fixes

  • CRITICAL: Fixed extractPages URL handling bug causing doubled URLs in mirror fallback
  • CRITICAL: Fixed creatorInfo middleware not including message field 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


Full Changelog: v1.9.0...v2.0.0

v1.9.0 — Added More Bugs To Fix Later

Choose a tag to compare

@Shineii86 Shineii86 released this 09 Jun 00:33

🔍 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 all target="_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

Choose a tag to compare

@Shineii86 Shineii86 released this 09 Jun 00:11
84c4877

🔍 Full Diagnostic Sweep — 20 Bugs Fixed

Fixed

  • CRITICAL: extractPages.helper.js — Pagination URL bug (?page → &page when 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 both cors() package and custom middleware)
  • server.js — Removed unused cors import
  • server.js — Added __dirname computation (was missing)
  • search.controller.js — Fixed cache key collision with suggestion controller
  • apiRoutes.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 redundant anikototv.to from ALT_DOMAINS
  • category.extractor.js — Removed unused cheerio import
  • test.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

Choose a tag to compare

@Shineii86 Shineii86 released this 09 Jun 00:11
84c4877

🩹 Health & Episode Fixes

Fixed

  • Health endpoint typo: s → seconds in uptime string formatting
  • Request counter middleware moved before route registrations (was never executing)
  • Request counter now properly tracks all API requests and errors