Skip to content

v2.0.0 - Major Release

Choose a tag to compare

@Shineii86 Shineii86 released this 04 Jul 11:01
· 48 commits to main since this 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:

  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