Overview
EpiNeko integrates with the Jikan API v4 to fetch anime data from MyAnimeList. The Jikan service provides a clean, typed interface with built-in caching and rate limit handling.All Jikan API functions are located in
src/services/jikan.ts:1 and include automatic caching and error handling.Core Functions
getTopAnime
Fetches the top-rated anime from MyAnimeList with pagination support.number
default:1
The page number for pagination
searchAnime
Search for anime by query string with pagination support.string
required
The search query string (automatically URL-encoded)
number
default:1
The page number for pagination
getAnimeById
Fetch detailed information about a specific anime by its MyAnimeList ID.number
required
The MyAnimeList ID of the anime
getAnimeCharacters
Fetch the characters for a specific anime.number
required
The MyAnimeList ID of the anime
getAnimeEpisodes
Fetch episode information for a specific anime with pagination.number
required
The MyAnimeList ID of the anime
number
default:1
The page number for pagination
TypeScript Interfaces
JikanAnime
JikanImage
JikanEpisode
JikanResponse<T>
Rate Limiting & Error Handling
The Jikan API has rate limits. The service automatically handles rate limit errors:Caching Strategy
All Jikan API calls use Next.js ISR (Incremental Static Regeneration) for caching:You can adjust cache durations by modifying the
revalidate parameter in each function call.Best Practices
API Base URL
Related Resources
Jikan API Documentation
Official Jikan API v4 documentation
MyAnimeList
Source data for all anime information