Overview
ThegetTopAnime() function retrieves the highest-rated anime from MyAnimeList, ranked by user scores. Supports pagination and optional filtering by anime type or status.
Function Signature
Parameters
Page number for pagination.
- Minimum: 1
- Default: 1
- Each page contains
limitnumber of results
Number of results per page.
- Minimum: 1
- Maximum: 25
- Default: 20
Filter results by anime characteristics. Supported values:
"airing"- Currently airing anime only"upcoming"- Anime that haven’t aired yet"bypopularity"- Sort by popularity instead of score"favorite"- Sort by number of favorites
Return Value
Returns a Promise that resolves to aJikanSearchResponse object.
Array of top-rated anime objects, sorted by score (or other metric if filtered).Each anime includes:
mal_id- MyAnimeList IDtitle- Anime titlescore- User rating (0-10)rank- Global ranking positionpopularity- Popularity ranking- Complete metadata (genres, studios, episodes, etc.)
Pagination metadata
Examples
Basic Usage
Filtered Queries
Advanced Usage
React Hook Usage
Use theuseTopAnime hook for React components:
Filtering Details
Available Filters
- airing
- upcoming
- bypopularity
- favorite
Currently broadcasting anime only.Use case: Show what’s hot right now
Performance & Caching
Automatic Caching
Responses are cached for 5 minutes:Rate Limiting
Automatic rate limiting ensures API compliance:- 3 requests per second maximum
- Queued execution when limit reached
- Exponential backoff on 429 errors
Common Patterns
Leaderboard Display
Recommendation Engine
Trending Analysis
Error Handling
Invalid page number (beyond available pages)
Rate limit exceeded (after retries)
Connection issues or timeouts
API Endpoint
Calls the Jikan API endpoint:See Also
searchAnime()
Search anime by query string
Seasonal Anime
Get anime by season and year
Components
React components for anime display
API Overview
Complete API reference and types