Endpoint
Description
Retrieve a randomly selected anime from the database. This endpoint is perfect for anime discovery features, “surprise me” functionality, or recommendation systems. The random selection can optionally respect parental control settings and user preferences.Authentication
This endpoint is publicly accessible and does not require authentication. However, providing a
user_id can personalize the random selection.Rate Limiting
- Limit: 100 requests per 60 seconds per IP
- Headers: Rate limit information included in response headers
Query Parameters
Apply parental control filtering to exclude mature content from random selection.Set to
false to include all anime regardless of rating.Example: parental_control=falseOptional user identifier for personalized random selection. When provided, the algorithm may consider user preferences, watch history, or favorites to improve recommendations.Example:
user_id=user_123abcResponse
Random anime object
The response intentionally returns minimal data (only
mal_id and title) to keep the endpoint fast. Use the returned mal_id with the Get Anime Details endpoint to fetch complete information.Examples
Basic Random Anime Request
Random Anime Without Parental Control
Random Anime with User Context
Get Random Anime Then Fetch Full Details
Response Example
Error Responses
No Anime Found (404)
This error is rare but can occur if:
- The database is empty
- All animes are filtered out by parental control
- There’s an issue with the random selection algorithm
Rate Limit Exceeded (429)
Internal Server Error (500)
Features
Parental Control
Whenparental_control=true (default), the random selection:
- Excludes anime with mature ratings (Rx - Hentai)
- Only selects from age-appropriate content
- Ensures family-friendly recommendations
User-Aware Selection
When auser_id is provided, the random selection algorithm may:
- Avoid animes the user has already watched
- Prefer genres the user enjoys
- Consider the user’s rating history
- Weight recommendations based on favorites
The exact personalization logic depends on the backend implementation and available user data.
Performance Characteristics
- Fast Response: Returns minimal data for quick loading
- No Caching: Each request generates a new random selection
- Database Optimized: Uses efficient random sampling queries
Use Cases
Discovery Features
Recommendation Widget
Random Anime Generator
Explore Feed
Best Practice: For better user experience, fetch full anime details immediately after getting the random selection, rather than showing just the title.
Related Endpoints
- Get Anime Details - Fetch complete information using the returned
mal_id - Get Animes - Browse animes with filters instead of random selection
