openapi: 3.0.3 info: title: Anikoto Scraper API description: | A high-performance REST API for scraping anime data from **anikoto.net** — built with Next.js, Cheerio, and in-memory caching. ## Response Format All endpoints return a consistent JSON envelope: ```json { "ok": true, "data": { ... }, "cached": true } ``` On error: ```json { "ok": false, "message": "Error description" } ``` ## Caching | Endpoint | TTL | |----------|-----| | `/api/home` | 5 minutes | | `/api/anime/:slug` | 30 minutes | | `/api/anime/tooltip/:id` | 30 minutes | | `/api/search` | 2 minutes | | `/api/filter` | 5 minutes | | `/api/schedule` | 1 hour | | `/api/watch/:slug` (Episodes) | 10 minutes | Add `?refresh=1` to any cached endpoint to bypass the cache. version: "1.0.0" contact: name: Teramoto servers: - url: https://anikoto-scrap-api.vercel.app/api description: Production server - url: /api description: Local development server tags: - name: Home description: Homepage and widget data - name: Anime description: Anime detail, episodes, recommendations, related, and tooltip - name: Browse description: Browse, filter, search, widgets, and listings - name: Schedule description: Weekly airing schedule - name: Watch description: Streaming sources, SSE streaming, and proxy - name: Discovery description: Home-page sections, rankings, listings, A-Z, suggestions and random anime - name: AniList description: AniList GraphQL lookups (id / MAL id / seasonal chart) - name: System description: Health, stats, cache, mirror failover and proxy pool status paths: /home: get: tags: [Home] summary: Homepage data description: > Returns spotlight carousel, latest episodes, new release, and top anime by day / week / month. Optionally returns dynamic widget data if `widget` parameter is provided. operationId: getHome parameters: - name: widget in: query required: false schema: type: string enum: [updated-all, updated-sub, updated-dub, trending, random] description: Optional widget name to fetch widget data instead of full home data - name: page in: query required: false schema: type: integer minimum: 1 default: 1 description: Page number for widget data - $ref: '#/components/parameters/refresh' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: oneOf: - $ref: '#/components/schemas/HomeData' - $ref: '#/components/schemas/HomeWidgetResult' example: ok: true cached: false data: spotlight: [] latestEpisodes: [] newRelease: [] newAdded: [] justCompleted: [] topDay: [] topWeek: [] topMonth: [] '500': $ref: '#/components/responses/Error' /search: get: tags: [Browse] summary: Search anime by keyword description: Search anime by keyword. Returns paginated list of matching anime cards. operationId: searchAnime parameters: - name: keyword in: query required: true description: Search keyword schema: type: string example: one piece - name: page in: query required: false schema: type: integer minimum: 1 default: 1 description: Page number - $ref: '#/components/parameters/refresh' responses: '200': description: Search results content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/SearchResult' example: ok: true cached: false data: keyword: one piece totalResults: 42 currentPage: 1 hasNextPage: true hasPreviousPage: false minPage: 1 maxPage: 3 results: [] '400': $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/Error' /filter: get: tags: [Browse] summary: Advanced anime filter description: Filter anime with multiple combinable parameters (genres, seasons, years, media types, airing status, languages, ratings, and sort order). operationId: filterAnime parameters: - name: keyword in: query required: false schema: type: string description: Search keyword example: demon slayer - name: genre[] in: query required: false explode: true schema: type: array items: type: string description: "Genre ID or slug (e.g. 1, action, romance)" - name: season[] in: query required: false explode: true schema: type: array items: type: string enum: [spring, summer, fall, winter] description: Season filter - name: year[] in: query required: false explode: true schema: type: array items: type: string description: Year filter (e.g. 2026, 2025) - name: term_type[] in: query required: false explode: true schema: type: array items: type: string enum: [Movie, Music, ONA, OVA, Special, TV] description: Media type filter - name: status[] in: query required: false explode: true schema: type: array items: type: string enum: [currently-airing, finished-airing, not-yet-aired] description: Airing status filter - name: language[] in: query required: false explode: true schema: type: array items: type: string enum: [sub, dub] description: Language filter - name: rating[] in: query required: false explode: true schema: type: array items: type: string enum: [G, PG, PG-13, R, R+, Rx] description: Age rating filter - name: sort in: query required: false schema: type: string enum: - default - latest-updated - latest-added - score - name-az - release-date - most-viewed - number_of_episodes default: default description: Sort order - name: page in: query required: false schema: type: integer minimum: 1 default: 1 description: Page number - $ref: '#/components/parameters/refresh' responses: '200': description: Filtered results content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/FilterResult' '500': $ref: '#/components/responses/Error' /anime/{slug}: get: tags: [Anime] summary: Anime detail description: > Get full anime info including title, synopsis, genres, studios, MAL score, episode count, and status. Optionally filters the embedded episode list by range using `start` and `end` query parameters. operationId: getAnimeDetail parameters: - $ref: '#/components/parameters/slug' - name: start in: query required: false schema: type: integer minimum: 1 description: Starting episode number to include (inclusive). Must be used together with `end`. example: 1 - name: end in: query required: false schema: type: integer minimum: 1 description: Ending episode number to include (inclusive). Must be used together with `start`. example: 12 - $ref: '#/components/parameters/refresh' responses: '200': description: Anime detail content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/AnimeDetail' example: ok: true cached: true data: id: one-piece-odmau slug: one-piece-odmau title: One Piece type: TV status: Currently Airing malScore: 8.9 genres: [Action, Adventure, Comedy] '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/Error' /anime/{slug}/episodes: get: tags: [Anime] summary: Anime episode list description: Get all episodes for a given anime slug, optionally filtered by episode range. operationId: getAnimeEpisodes parameters: - $ref: '#/components/parameters/slug' - name: start in: query required: false schema: type: string description: Starting episode number (inclusive) example: "5" - name: end in: query required: false schema: type: string description: Ending episode number (inclusive) example: "10" - $ref: '#/components/parameters/refresh' responses: '200': description: Episode list content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/AnimeEpisodes' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/Error' /anime/{slug}/related: get: tags: [Anime] summary: Related anime listing description: Returns related anime (watch order/sequels/prequels/etc.) for a given anime slug. operationId: getAnimeRelated parameters: - $ref: '#/components/parameters/slug' - $ref: '#/components/parameters/refresh' responses: '200': description: Related anime list content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: type: array items: $ref: '#/components/schemas/RelatedAnime' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/Error' /anime/{slug}/recommendations: get: tags: [Anime] summary: Anime recommendations listing description: Returns recommended anime cards for a given anime slug. operationId: getAnimeRecommendations parameters: - $ref: '#/components/parameters/slug' - $ref: '#/components/parameters/refresh' responses: '200': description: Recommendations listing content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: type: array items: $ref: '#/components/schemas/AnimeCard' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/Error' /anime/tooltip/{id}: get: tags: [Anime] summary: Get anime tooltip preview info by ID description: Fetches and parses the preview/tooltip HTML containing title, synopsis, year, scores, genres, and metadata for a given anime ID (`data-tip` attribute). operationId: getAnimeTooltip parameters: - name: id in: path required: true schema: type: string description: Anime ID from the `data-tip` attribute of an anime poster example: "4127" - $ref: '#/components/parameters/refresh' responses: '200': description: Anime tooltip info content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/AnimeTooltip' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/Error' /updated: get: tags: [Browse] summary: Latest updated anime listing description: Paginated listing of anime scraped directly from https://anikoto.net/latest-updated. operationId: getUpdated parameters: - name: page in: query required: false schema: type: integer minimum: 1 default: 1 description: Page number - $ref: '#/components/parameters/refresh' responses: '200': description: Listing results content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/ListingResult' '500': $ref: '#/components/responses/Error' /widget: get: tags: [Browse] summary: Home widgets data description: "Fetch dynamic home widgets: updated-all (default), updated-sub, updated-dub, trending, random." operationId: getWidgetData parameters: - name: name in: query required: false schema: type: string default: updated-all enum: - updated-all - updated-sub - updated-dub - trending - random description: "Widget name (default: updated-all)" - name: page in: query required: false schema: type: integer minimum: 1 default: 1 description: Page number - $ref: '#/components/parameters/refresh' responses: '200': description: Widget data results content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/HomeWidgetResult' '500': $ref: '#/components/responses/Error' /status: get: tags: [Browse] summary: Browse anime by airing status description: Browse anime filtered by airing status (`currently-airing`, `finished-airing`, `not-yet-aired`). operationId: getByStatus parameters: - name: type in: query required: false schema: type: string enum: [currently-airing, finished-airing, not-yet-aired] default: currently-airing description: Airing status - name: page in: query required: false schema: type: integer minimum: 1 default: 1 description: Page number - $ref: '#/components/parameters/refresh' responses: '200': description: Status listing content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/ListingResult' '400': $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/Error' /genre/{genre}: get: tags: [Browse] summary: Browse anime by genre description: Browse anime filtered by genre slug (e.g. action, romance, isekai, fantasy). operationId: getByGenre parameters: - name: genre in: path required: true schema: type: string description: Genre slug (e.g. action, romance, isekai, fantasy) example: action - name: page in: query required: false schema: type: integer minimum: 1 default: 1 description: Page number - $ref: '#/components/parameters/refresh' responses: '200': description: Genre listing content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/GenreListingResult' '400': $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/Error' /type/{type}: get: tags: [Browse] summary: Browse anime by media type description: Browse anime filtered by media type (`tv`, `movie`, `ova`, `ona`, `special`, `music`). operationId: getByType parameters: - name: type in: path required: true schema: type: string enum: [tv, movie, ova, ona, special, music] description: Media type example: movie - name: page in: query required: false schema: type: integer minimum: 1 default: 1 description: Page number - $ref: '#/components/parameters/refresh' responses: '200': description: Type listing content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: $ref: '#/components/schemas/TypeListingResult' '400': $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/Error' /schedule: get: tags: [Schedule] summary: Weekly airing schedule description: > Get the 7-day weekly airing schedule starting from today (UTC). Each day is fetched in parallel via the site's `/ajax/schedule/date` endpoint. AnimeCard fields repurposed for schedule items: - `date`: Airing time in the requested timezone (e.g. `"21:00"`) - `type`: Episode label (e.g. `"Episode 13"`) - `image`: Resolved poster image URL (requires `images=true`) operationId: getSchedule parameters: - name: tz in: query required: false schema: type: integer minimum: -12 maximum: 14 default: 0 description: UTC offset in hours (e.g. 7 for UTC+7, -5 for UTC-5). Affects the airing times in the `date` field. example: 7 - name: images in: query required: false schema: type: boolean default: false description: Set to true to resolve and fetch poster images (defaults to false) example: true - $ref: '#/components/parameters/refresh' responses: '200': description: 7-day schedule grouped by day content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean data: type: array items: $ref: '#/components/schemas/ScheduleDay' '500': $ref: '#/components/responses/Error' /watch/{slug}: get: tags: [Watch] summary: Streaming sources for an episode description: > Retrieves video servers and stream sources for a specific episode. **Dual Streaming & JSON Modes**: - Default mode (or cold cache miss): Returns an SSE stream (`text/event-stream`) delivering chunks progressively (`episode`, `servers`, `source` x N, `done`). - `stream=false` or cache hit: Returns a standard single JSON object containing full `WatchData`. operationId: watchEpisode parameters: - $ref: '#/components/parameters/slug' - name: ep in: query required: true schema: type: string description: Episode number to watch example: "1" - name: stream in: query required: false schema: type: boolean default: true description: Set to `false` to disable SSE streaming and wait for the complete JSON response example: true - $ref: '#/components/parameters/refresh' responses: '200': description: Streaming sources response (JSON on cache hit or stream=false, SSE chunks when streaming) content: application/json: schema: type: object properties: ok: type: boolean example: true cached: type: boolean streaming: type: boolean example: false data: $ref: '#/components/schemas/WatchData' text/event-stream: schema: type: string description: > Progressive SSE events: - `data: {"type":"episode","episode":{...}}` - `data: {"type":"servers","servers":[...]}` - `data: {"type":"source","source":{...}}` - `data: {"type":"done"}` '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/Error' /proxy: get: tags: [Watch] summary: Streaming proxy description: > High-volume zero-copy streaming proxy to bypass Cloudflare and CORS restrictions for m3u8 video streams, WebVTT subtitle files, and media segments. Features multi-node proxy pool routing, anti-bot browser header rotation, SSRF guard, and automatic failover retries. Rewrites segment URLs within m3u8 playlists to keep them routed through the proxy. operationId: proxyStream parameters: - name: url in: query required: true schema: type: string format: uri description: The target m3u8 or subtitle URL to proxy example: "https://cdn.mewstream.buzz/.../master.m3u8" - name: referer in: query required: false schema: type: string format: uri description: Referer header to bypass hotlink protection example: "https://megaplay.buzz/" - name: proxy in: query required: false schema: type: string description: Optional custom proxy node URL (http/https/socks) for outbound routing example: "http://user:pass@proxy.example.com:8080" responses: '200': description: Proxied stream data content: application/vnd.apple.mpegurl: schema: type: string description: m3u8 playlist with rewritten segment URLs text/vtt: schema: type: string description: WebVTT subtitle track application/octet-stream: schema: type: string format: binary description: Binary video/audio segment stream '400': $ref: '#/components/responses/BadRequest' '403': description: Access denied (SSRF guard blocked target local/private IP) content: application/json: schema: type: object properties: ok: type: boolean example: false message: type: string example: "Forbidden: Access to private or local network addresses is restricted" '500': $ref: '#/components/responses/Error' '502': description: Bad Gateway (Upstream proxy failed after retries) content: application/json: schema: type: object properties: ok: type: boolean example: false message: type: string example: "Proxy failed after 3 attempts" detail: type: string url: type: string /spotlight: get: tags: - Discovery summary: Spotlight carousel description: Featured anime from the home page spotlight carousel. Shares the cached home scrape with /home. operationId: getSpotlight parameters: - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: array items: type: object description: SpotlightAnime (see src/lib/types.ts) '500': description: Internal server error /top-ten: get: tags: - Discovery summary: Top ten (today / week / month) description: Top anime for today, this week and this month. operationId: getTopTen parameters: - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object properties: today: type: array items: type: object description: TopAnimeItem (see src/lib/types.ts) week: type: array items: type: object description: TopAnimeItem (see src/lib/types.ts) month: type: array items: type: object description: TopAnimeItem (see src/lib/types.ts) '500': description: Internal server error /trending: get: tags: - Discovery summary: Trending anime description: Trending anime from the home page's AJAX widget (paginated). Equivalent to /widget?name=trending. operationId: getTrending parameters: - name: page in: query required: false description: 'Page number (default: 1)' schema: type: integer example: '1' - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: 'Widget result: items + pagination' '400': description: Invalid or missing parameters '500': description: Internal server error /trending-sidebar: get: tags: - Discovery summary: Trending sidebar bundle description: Top day / week / month lists plus the latest episodes, as shown in the site sidebar. operationId: getTrendingSidebar parameters: - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object properties: day: type: array items: type: object description: TopAnimeItem (see src/lib/types.ts) week: type: array items: type: object description: TopAnimeItem (see src/lib/types.ts) month: type: array items: type: object description: TopAnimeItem (see src/lib/types.ts) latestEpisodes: type: array items: type: object description: LatestEpisodeItem (see src/lib/types.ts) '500': description: Internal server error /top-rankings: get: tags: - Discovery summary: Top rankings for one window description: Ranked top anime for a single time window, de-duplicated. operationId: getTopRankings parameters: - name: sort in: query required: false description: Ranking window schema: type: string enum: - day - week - month example: day - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object properties: sort: type: string example: day results: type: array items: type: object description: TopAnimeItem (see src/lib/types.ts) '400': description: Invalid or missing parameters '500': description: Internal server error /recently-updated: get: tags: - Discovery summary: Recently updated episodes description: Recently updated episodes split by audio track (paginated, AJAX-backed). operationId: getRecentlyUpdated parameters: - name: tab in: query required: false description: Audio filter schema: type: string enum: - all - sub - dub example: all - name: page in: query required: false description: 'Page number (default: 1)' schema: type: integer example: '1' - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: 'tab + widget result: items + pagination' '400': description: Invalid or missing parameters '500': description: Internal server error /completed: get: tags: - Discovery summary: Recently completed anime description: Recently completed anime from the home page. operationId: getCompleted parameters: - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: array items: type: object description: TopTableItem (see src/lib/types.ts) '500': description: Internal server error /random: get: tags: - Discovery summary: Random anime description: Follows the site's /random redirect and returns that anime's detail object plus its resolved `url`. Never cached. operationId: getRandom parameters: [] responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: AnimeDetail (see src/lib/types.ts) '500': description: Internal server error '502': description: Upstream did not redirect to an anime page /most-popular: get: tags: - Browse summary: Most popular anime description: Most viewed anime (site listing /most-viewed). operationId: getMostPopular parameters: - name: page in: query required: false description: 'Page number (default: 1)' schema: type: integer example: '1' - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object properties: results: type: array items: type: object description: AnimeCard (see src/lib/types.ts) topRated: type: array items: type: object description: AnimeCard (see src/lib/types.ts) currentPage: type: integer example: 1 hasNextPage: type: boolean hasPreviousPage: type: boolean minPage: type: integer maxPage: type: integer '500': description: Internal server error /new-release: get: tags: - Browse summary: New releases description: Newly released anime (site listing /new-release). operationId: getNewRelease parameters: - name: page in: query required: false description: 'Page number (default: 1)' schema: type: integer example: '1' - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object properties: results: type: array items: type: object description: AnimeCard (see src/lib/types.ts) topRated: type: array items: type: object description: AnimeCard (see src/lib/types.ts) currentPage: type: integer example: 1 hasNextPage: type: boolean hasPreviousPage: type: boolean minPage: type: integer maxPage: type: integer '500': description: Internal server error /newly-added: get: tags: - Browse summary: Newly added anime description: Recently added anime (site listing /latest-updated?sort=added). operationId: getNewlyAdded parameters: - name: page in: query required: false description: 'Page number (default: 1)' schema: type: integer example: '1' - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object properties: results: type: array items: type: object description: AnimeCard (see src/lib/types.ts) topRated: type: array items: type: object description: AnimeCard (see src/lib/types.ts) currentPage: type: integer example: 1 hasNextPage: type: boolean hasPreviousPage: type: boolean minPage: type: integer maxPage: type: integer '500': description: Internal server error /upcoming: get: tags: - Browse summary: Upcoming anime description: Not-yet-aired anime (site listing /status/not-yet-aired). operationId: getUpcoming parameters: - name: page in: query required: false description: 'Page number (default: 1)' schema: type: integer example: '1' - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object properties: results: type: array items: type: object description: AnimeCard (see src/lib/types.ts) topRated: type: array items: type: object description: AnimeCard (see src/lib/types.ts) currentPage: type: integer example: 1 hasNextPage: type: boolean hasPreviousPage: type: boolean minPage: type: integer maxPage: type: integer '500': description: Internal server error /az-list/{letter}: get: tags: - Browse summary: A-Z list description: Alphabetical listing. `letter` is a single letter/digit, `other`, or `all`. operationId: getAzList parameters: - name: letter in: path required: true description: Letter, digit, `other` or `all` schema: type: string example: a - name: page in: query required: false description: 'Page number (default: 1)' schema: type: integer example: '1' - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object properties: results: type: array items: type: object description: AnimeCard (see src/lib/types.ts) topRated: type: array items: type: object description: AnimeCard (see src/lib/types.ts) currentPage: type: integer example: 1 hasNextPage: type: boolean hasPreviousPage: type: boolean minPage: type: integer maxPage: type: integer letter: type: string example: a '400': description: Invalid or missing parameters '500': description: Internal server error /search/suggest: get: tags: - Browse summary: Search autocomplete description: Up to 10 lightweight suggestions (id, slug, title, image, type) for a keyword. operationId: searchSuggest parameters: - name: keyword in: query required: true description: Search text schema: type: string example: naruto - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: array items: type: object description: SuggestionItem (see src/lib/types.ts) '400': description: Invalid or missing parameters '500': description: Internal server error /suggestions: get: tags: - Browse summary: Rich search suggestions description: Up to 10 full anime cards (including sub/dub episode counts) for a keyword. operationId: getSuggestions parameters: - name: keyword in: query required: true description: Search text schema: type: string example: naruto - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: array items: type: object description: AnimeCard (see src/lib/types.ts) '400': description: Invalid or missing parameters '500': description: Internal server error /anime/{slug}/seasons: get: tags: - Anime summary: Seasons of an anime description: The site's season switcher for an anime. `slug` may also be the numeric anime id. operationId: getAnimeSeasons parameters: - name: slug in: path required: true description: Anime slug (or numeric anime id) schema: type: string example: one-piece-100 - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: AnimeSeasons (see src/lib/types.ts) '400': description: Invalid or missing parameters '404': description: Not found '500': description: Internal server error /anime/{slug}/episodes/latest: get: tags: - Anime summary: Latest episode description: Newest released episode (highest episode number) plus the total episode count. operationId: getLatestEpisode parameters: - name: slug in: path required: true description: Anime slug (or numeric anime id) schema: type: string example: one-piece-100 - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: LatestEpisodeResult (see src/lib/types.ts) '400': description: Invalid or missing parameters '404': description: Not found '500': description: Internal server error /anime/{slug}/episodes/ajax: get: tags: - Anime summary: Episode list (raw AJAX view) description: Episodes with the site's filters and range tabs, per-episode dataIds, malId and timestamp. `slug` may also be the numeric anime id. operationId: getEpisodesAjax parameters: - name: slug in: path required: true description: Anime slug (or numeric anime id) schema: type: string example: one-piece-100 - name: style in: query required: false description: Optional list style passed to the site schema: type: string - name: vrf in: query required: false description: Optional token passed to the site schema: type: string - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: EpisodeAjaxResult (see src/lib/types.ts) '400': description: Invalid or missing parameters '404': description: Not found '500': description: Internal server error /anilist: get: tags: - AniList summary: AniList metadata (query) description: Look up AniList metadata by AniList id (`id`) or MAL id (`mal`). operationId: getAnilist parameters: - name: id in: query required: false description: AniList id schema: type: string example: '21' - name: mal in: query required: false description: MAL id (alternative to id) schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: AniList Media object '400': description: Invalid or missing parameters '404': description: Not found '500': description: Internal server error /anilist/{id}: get: tags: - AniList summary: AniList metadata (path) description: AniList metadata for a numeric AniList id. operationId: getAnilistById parameters: - name: id in: path required: true description: AniList id schema: type: string example: '21' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: AniList Media object '400': description: Invalid or missing parameters '404': description: Not found '500': description: Internal server error /anilist/season: get: tags: - AniList summary: Seasonal chart description: Seasonal anime from AniList ordered by popularity. Defaults to the current season/year. operationId: getAnilistSeason parameters: - name: season in: query required: false description: Season schema: type: string enum: - WINTER - SPRING - SUMMER - FALL example: FALL - name: year in: query required: false description: Year (1940-2100) schema: type: integer example: '2026' - name: page in: query required: false description: 'Page number (default: 1)' schema: type: integer example: '1' - name: perPage in: query required: false description: Items per page (max 50, default 25) schema: type: integer example: '25' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: season, year, page, perPage, pageInfo, media[] '400': description: Invalid or missing parameters '500': description: Internal server error /servers: get: tags: - Watch summary: Servers for an episode description: Video servers (sub/dub/softsub) for one episode. `ids` is the episode's `dataIds`; each server's `linkId` feeds /stream and /stream/resolve. operationId: getServers parameters: - name: ids in: query required: true description: Episode dataIds schema: type: string - name: slug in: query required: false description: Anime slug (improves Referer) schema: type: string example: one-piece-100 - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: array items: type: object description: type, typeLabel, epId, linkId, cmid, svId, name, normalizedName '400': description: Invalid or missing parameters '404': description: Not found '500': description: Internal server error /stream: get: tags: - Watch summary: Stream info for a server link description: Embed/player URL and intro/outro skip ranges for one server `linkId`. Use /stream/resolve for a playable HLS URL. operationId: getStreamInfo parameters: - name: id in: query required: true description: Server linkId schema: type: string - name: slug in: query required: false description: Anime slug schema: type: string example: one-piece-100 - name: sv in: query required: false description: Server id schema: type: string - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: linkId, url, type, skipData, backup '400': description: Invalid or missing parameters '404': description: Not found '500': description: Internal server error /mapper-servers: get: tags: - Watch summary: Mapper servers description: Mapper-provided sources per provider (sub/dub) with embed and download URLs. operationId: getMapperServers parameters: - name: malId in: query required: true description: MAL id schema: type: string example: '21' - name: slug in: query required: true description: Anime slug schema: type: string example: one-piece-100 - name: timestamp in: query required: true description: Episode timestamp schema: type: string - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: array items: type: object description: provider, type, url, download '400': description: Invalid or missing parameters '500': description: Internal server error /stream/resolve: get: tags: - Watch summary: Resolve a server link to HLS description: 'Resolves a server link to a playable stream: m3u8, proxied URL, qualities, subtitles and skip data. When extraction fails, `m3u8` is null and `error` is set.' operationId: resolveStream parameters: - name: id in: query required: true description: Server linkId schema: type: string - name: slug in: query required: false description: Anime slug schema: type: string example: one-piece-100 - name: sv in: query required: false description: Server id schema: type: string - name: type in: query required: false description: Audio track hint schema: type: string enum: - sub - dub - softsub - hsub - raw example: sub - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: linkId, embedUrl, m3u8, proxyUrl, qualities[], subtitles[], skipData '400': description: Invalid or missing parameters '404': description: Not found '500': description: Internal server error /stream/qualities: get: tags: - Watch summary: HLS quality variants description: Lists the variants of an HLS master playlist, best first. `url` must be on an authorised streaming domain and never a private address. operationId: getStreamQualities parameters: - name: url in: query required: true description: Master playlist URL schema: type: string - name: referer in: query required: false description: Referer to send schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: url, totalQualities, qualities[] (label, width, height, bandwidth, url, proxyUrl) '400': description: Invalid or missing parameters '403': description: Domain not allowed / private address '500': description: Internal server error /stream/embeds: get: tags: - Watch summary: Third-party embed URLs description: Ready-to-iframe player URLs (megaplay, anixo, megavid) for an episode. Identify the anime with `slug`, `mal` or `anilist`. operationId: getStreamEmbeds parameters: - name: slug in: query required: false description: Anime slug schema: type: string example: one-piece-100 - name: mal in: query required: false description: MAL id schema: type: string - name: anilist in: query required: false description: AniList id schema: type: string - name: ep in: query required: false description: Episode number (default 1) schema: type: integer example: '1' - name: lang in: query required: false description: Audio schema: type: string enum: - sub - dub example: sub - name: provider in: query required: false description: Comma-separated provider ids schema: type: string example: megaplay,anixo - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: slug, episode, lang, ids, providers[], unavailable[] '400': description: Invalid or missing parameters '500': description: Internal server error /download: get: tags: - Watch summary: Episode download links description: Download links for one episode grouped by server and audio type, exactly as published by the site. operationId: getDownloads parameters: - name: slug in: query required: true description: Anime slug schema: type: string example: one-piece-100 - name: ep in: query required: true description: Episode number schema: type: string example: '1' - name: refresh in: query required: false description: Bypass cache and force fresh scrape (1 to enable) schema: type: string enum: - '0' - '1' example: '1' responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: slug, episode, totalDownloads, downloads[] '400': description: Invalid or missing parameters '404': description: Not found '500': description: Internal server error /stream/proxy: get: tags: - Watch summary: Stream proxy (alias of /proxy) description: Alias of /proxy for players configured with the original AniKotoAPI path. operationId: streamProxy parameters: - name: url in: query required: true description: Target URL schema: type: string - name: referer in: query required: false description: Referer to send schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: string description: Proxied media / rewritten playlist '403': description: Forbidden '500': description: Internal server error /stream/ts-proxy: get: tags: - Watch summary: Segment proxy (alias of /proxy) description: Alias of /proxy for HLS segments, kept for compatibility with the original AniKotoAPI path. operationId: streamTsProxy parameters: - name: url in: query required: true description: Segment URL schema: type: string - name: referer in: query required: false description: Referer to send schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: string description: Proxied segment '403': description: Forbidden '500': description: Internal server error /health: get: tags: - System summary: Health check description: 'Liveness probe: status, version, uptime and memory. Never touches the upstream site.' operationId: getHealth parameters: [] responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: status, version, uptime, memory, node, timestamp '500': description: Internal server error /stats: get: tags: - System summary: Server statistics description: Request counters, cache usage and feature flags (brotli, mirrors, proxies) for this instance. operationId: getStats parameters: [] responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: requests, cache, endpoints, features '500': description: Internal server error /cache/stats: get: tags: - System summary: Cache statistics description: In-memory cache entry count, hits, misses and hit rate. operationId: getCacheStats parameters: [] responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: keys, hits, misses, hitRate '500': description: Internal server error /mirrors: get: tags: - System summary: Mirror status description: Health, latency and current selection for every configured upstream mirror. Cached for 30 s. operationId: getMirrors parameters: [] responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: array items: type: object description: name, url, status, latencyMs, isCurrent '500': description: Internal server error /mirrors/reset: post: tags: - System summary: Reset mirror state description: 'Clears mirror failure state so the primary mirror is tried first again. Requires `Authorization: Bearer ` when ADMIN_TOKEN is set.' operationId: resetMirrors parameters: [] responses: '200': description: Reset done '401': description: Unauthorized '500': description: Internal server error /proxy/status: get: tags: - System summary: Outbound proxy status description: Proxy pool health (credentials masked) and Cloudflare Worker configuration. operationId: getProxyStatus parameters: [] responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object description: configured, total, healthy, proxies[], cloudflareWorker '500': description: Internal server error /openapi: get: tags: - System summary: OpenAPI document description: This API's OpenAPI 3.0 description as JSON. Returned as the raw document, not wrapped in { ok, data }. operationId: getOpenApi parameters: [] responses: '200': description: OK content: application/json: schema: type: object properties: ok: type: boolean example: true data: type: object '500': description: Internal server error components: parameters: slug: name: slug in: path required: true schema: type: string description: Anime slug from the URL (e.g. one-piece-odmau) example: one-piece-odmau refresh: name: refresh in: query required: false schema: type: string enum: ["0", "1"] description: Set to `1` to bypass cache and force a fresh scrape example: "1" schemas: # ─── Shared ──────────────────────────────────────────────────── EpisodeStatus: type: object properties: sub: type: integer nullable: true example: 1080 dub: type: integer nullable: true example: 1040 total: type: integer nullable: true example: 1100 AnimeCard: type: object properties: id: type: string example: "4127" slug: type: string example: "one-piece-odmau" title: type: string example: "One Piece" titleJp: type: string example: "One Piece" image: type: string format: uri example: "https://cdn.anipixcdn.co/thumbnail/a1ea8c4b315b25f06e3c212423037951.jpg" href: type: string example: "/api/anime/one-piece-odmau" type: type: string example: "TV" episodes: $ref: '#/components/schemas/EpisodeStatus' date: type: string example: "1999" score: type: number example: 8.9 totalEpisodes: type: integer example: 1100 LatestEpisodeItem: type: object properties: id: type: string example: "4127" slug: type: string example: "one-piece-odmau" title: type: string example: "One Piece" titleJp: type: string example: "One Piece" image: type: string format: uri href: type: string example: "/api/anime/one-piece-odmau" watchHref: type: string example: "https://anikoto.net/watch/one-piece-odmau/ep-1100" type: type: string example: "TV" episodes: $ref: '#/components/schemas/EpisodeStatus' TopTableItem: type: object properties: id: type: string example: "4127" slug: type: string example: "one-piece-odmau" title: type: string example: "One Piece" titleJp: type: string image: type: string format: uri href: type: string example: "/api/anime/one-piece-odmau" type: type: string example: "TV" episodes: $ref: '#/components/schemas/EpisodeStatus' date: type: string example: "Jul 2024" TopAnimeItem: type: object properties: rank: type: integer example: 1 id: type: string example: "4127" slug: type: string example: "one-piece-odmau" title: type: string example: "One Piece" titleJp: type: string image: type: string format: uri href: type: string example: "/api/anime/one-piece-odmau" type: type: string example: "TV" episodes: $ref: '#/components/schemas/EpisodeStatus' # ─── Home ────────────────────────────────────────────────────── SpotlightAnime: type: object properties: rank: type: integer example: 1 slug: type: string example: "black-clover-season-2" title: type: string example: "Black Clover Season 2" titleJp: type: string example: "Black Clover 2nd Season" rating: type: string example: "7.84" quality: type: string example: "HD" type: type: string example: "TV" episodes: type: string example: "170 eps" hasDub: type: boolean example: false hasSub: type: boolean example: false date: type: string example: "2026" synopsis: type: string example: "The second season of Black Clover." watchUrl: type: string example: "https://anikoto.net/watch/solo-leveling-season-2-arise-from-the-shadow-vvy1z" href: type: string example: "/api/anime/solo-leveling-season-2-arise-from-the-shadow-vvy1z" image: type: string format: uri HomeData: type: object properties: spotlight: type: array items: $ref: '#/components/schemas/SpotlightAnime' latestEpisodes: type: array items: $ref: '#/components/schemas/LatestEpisodeItem' newRelease: type: array items: $ref: '#/components/schemas/TopTableItem' newAdded: type: array items: $ref: '#/components/schemas/TopTableItem' justCompleted: type: array items: $ref: '#/components/schemas/TopTableItem' topDay: type: array items: $ref: '#/components/schemas/TopAnimeItem' topWeek: type: array items: $ref: '#/components/schemas/TopAnimeItem' topMonth: type: array items: $ref: '#/components/schemas/TopAnimeItem' # ─── Anime Detail & Tooltip ──────────────────────────────────── RelatedAnime: type: object properties: id: type: string malId: type: string example: "21" title: type: string example: "One Piece Film: Red" titleJp: type: string image: type: string format: uri relation: type: string example: "Side Story" href: type: string example: "/api/anime/one-piece-film-red-8636" slug: type: string example: "one-piece-film-red-8636" Episode: type: object properties: number: type: string example: "1" title: type: string example: "I'm Luffy! The Man Who Will Become the Pirate King!" href: type: string example: "https://anikoto.net/watch/one-piece-odmau/ep-1" id: type: string example: "131818" dataIds: type: string example: "131818,131819" dataMal: type: string example: "59970" dataTimestamp: type: string example: "1778859916" hasDub: type: boolean example: true hasSub: type: boolean example: true AnimeEpisodes: type: object properties: animeId: type: string example: "4127" slug: type: string example: "one-piece-odmau" episodes: type: array items: $ref: '#/components/schemas/Episode' AnimeDetail: type: object properties: id: type: string example: "4127" slug: type: string example: "one-piece-odmau" title: type: string example: "One Piece" titleJp: type: string example: "ONE PIECE" alternativeTitles: type: array items: type: string example: ["OP", "Wan Pīsu"] image: type: string format: uri rating: type: string example: "PG-13" quality: type: string example: "HD" hasDub: type: boolean example: true hasSub: type: boolean example: true synopsis: type: string example: "Gol D. Roger was known as the 'Pirate King'..." type: type: string example: "TV" premiered: type: string example: "Fall 1999" aired: type: string example: "Oct 20, 1999 to ?" status: type: string example: "Currently Airing" genres: type: array items: type: string example: ["Action", "Adventure", "Comedy", "Fantasy", "Shounen"] malScore: type: number example: 8.9 duration: type: string example: "24m" episodeCount: type: integer example: 1100 studios: type: array items: type: string example: ["Toei Animation"] producers: type: array items: type: string example: ["Fuji TV", "TAP", "Shueisha"] watchUrl: type: string example: "https://anikoto.net/watch/one-piece-odmau" episodes: $ref: '#/components/schemas/AnimeEpisodes' AnimeTooltip: type: object properties: id: type: string example: "4127" slug: type: string example: "that-time-i-got-reincarnated-as-a-slime-tales-veldora-s-journal-ngovq" title: type: string example: "That Time I Got Reincarnated as a Slime: Tales - Veldora's Journal" titleJp: type: string example: "Tensei shitara Slime Datta Ken: Kanwa - Veldora Nikki" rating: type: string example: "PG-13" quality: type: string example: "HD" episodes: $ref: '#/components/schemas/EpisodeStatus' synopsis: type: string example: "Ifrit, who has been trapped in Rimuru due to the latter's Predator skill..." otherNames: type: string example: "That Time I Got Reincarnated as a Slime..." score: type: number example: 6.48 year: type: string example: "2024" duration: type: string example: "23m" status: type: string example: "Finished Airing" genres: type: array items: type: string example: ["Fantasy", "Comedy", "Shounen"] watchUrl: type: string example: "https://anikoto.net/watch/that-time-i-got-reincarnated-as-a-slime-tales-veldora-s-journal-ngovq" href: type: string example: "/api/anime/that-time-i-got-reincarnated-as-a-slime-tales-veldora-s-journal-ngovq" # ─── Search / Filter / Listings ─────────────────────────────── SearchResult: type: object properties: results: type: array items: $ref: '#/components/schemas/AnimeCard' keyword: type: string example: "one piece" currentPage: type: integer example: 1 hasNextPage: type: boolean example: true hasPreviousPage: type: boolean example: false maxPage: type: integer example: 3 minPage: type: integer example: 1 totalResults: type: integer example: 42 FilterParams: type: object properties: keyword: type: string genre: type: array items: type: string season: type: array items: type: string year: type: array items: type: string type: type: array items: type: string status: type: array items: type: string language: type: array items: type: string rating: type: array items: type: string sort: type: string page: type: string FilterGenreOption: type: object properties: id: type: string example: "1" name: type: string example: "Action" slug: type: string example: "action" FilterOptions: type: object properties: genres: type: array items: $ref: '#/components/schemas/FilterGenreOption' years: type: array items: type: string types: type: array items: type: string seasons: type: array items: type: string statuses: type: array items: type: string languages: type: array items: type: string ratings: type: array items: type: string sorts: type: array items: type: string FilterResult: type: object properties: results: type: array items: $ref: '#/components/schemas/AnimeCard' topRated: type: array items: $ref: '#/components/schemas/AnimeCard' currentPage: type: integer example: 1 hasNextPage: type: boolean example: true hasPreviousPage: type: boolean example: false maxPage: type: integer example: 10 minPage: type: integer example: 1 params: $ref: '#/components/schemas/FilterParams' options: $ref: '#/components/schemas/FilterOptions' ListingResult: type: object properties: results: type: array items: $ref: '#/components/schemas/AnimeCard' topRated: type: array items: $ref: '#/components/schemas/AnimeCard' currentPage: type: integer example: 1 hasNextPage: type: boolean example: true hasPreviousPage: type: boolean example: false minPage: type: integer example: 1 maxPage: type: integer example: 10 GenreListingResult: allOf: - $ref: '#/components/schemas/ListingResult' - type: object properties: genre: type: string example: "action" TypeListingResult: allOf: - $ref: '#/components/schemas/ListingResult' - type: object properties: mediaType: type: string example: "movie" HomeWidgetResult: type: object properties: results: type: array items: $ref: '#/components/schemas/LatestEpisodeItem' currentPage: type: integer example: 1 hasNextPage: type: boolean example: true hasPreviousPage: type: boolean example: false maxPage: type: integer example: 2 # ─── Schedule ────────────────────────────────────────────────── ScheduleDay: type: object properties: day: type: string description: Human-readable day label (e.g. "Sat Jul 04") example: "Sat Jul 04" animes: type: array description: Anime airing on this day items: $ref: '#/components/schemas/AnimeCard' # ─── Watch ───────────────────────────────────────────────────── IntroOutro: type: object properties: start: type: integer example: 111 end: type: integer example: 199 VideoServer: type: object properties: id: type: string example: "131818-vidplay" name: type: string example: "VidPlay-1" type: type: string example: "sub" svId: type: string example: "8e4" VideoTrack: type: object properties: file: type: string format: uri example: "https://megaplay.buzz/sub/..." label: type: string example: "English" kind: type: string example: "captions" default: type: boolean example: true proxyUrl: type: string example: "/api/proxy?url=..." VideoSource: type: object properties: server: type: string example: "Vidstream-2" type: type: string example: "sub" url: type: string format: uri example: "https://megaplay.buzz/stream/..." m3u8: type: string format: uri nullable: true example: "https://cdn.mewstream.buzz/.../master.m3u8" referer: type: string format: uri example: "https://megaplay.buzz/" proxyUrl: type: string format: uri nullable: true example: "/api/proxy?url=..." tracks: type: array items: $ref: '#/components/schemas/VideoTrack' skip_data: type: object nullable: true properties: intro: $ref: '#/components/schemas/IntroOutro' outro: $ref: '#/components/schemas/IntroOutro' WatchData: type: object properties: episode: $ref: '#/components/schemas/Episode' servers: type: array items: $ref: '#/components/schemas/VideoServer' sources: type: array items: $ref: '#/components/schemas/VideoSource' # ─── API Error ───────────────────────────────────────────────── ApiError: type: object required: [ok, message] properties: ok: type: boolean example: false message: type: string example: "Internal server error" responses: Error: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ApiError' example: ok: false message: Failed to fetch data from source BadRequest: description: Bad request — missing or invalid parameters content: application/json: schema: $ref: '#/components/schemas/ApiError' example: ok: false message: Missing required parameter NotFound: description: Not found content: application/json: schema: $ref: '#/components/schemas/ApiError' example: ok: false message: Anime not found