Discover Movies
The Discover Movies endpoint provides a powerful way to find movies stored in our database. You can search through a wide array of movies using specific criteria such as genre, release year, and user ratings. This endpoint is perfect for creating dynamic movie discovery features in your applications.
Endpoint Information
Endpoint URL
{baseUrl}/movies/discoverQuery Parameters
Enhance your movie discovery by using the following query parameters to filter search results. These parameters allow you to tailor the movie data retrieved from our database, ensuring that the results meet your specific needs or the preferences of your application's users:
- Genre: Filter movies by specific genres such as comedy, drama, action, etc.
- Year: Retrieve movies released in a particular year to focus on new releases or classic films.
- Page: Specify the page number for paginated results. Default is 1.
- Limit: Set the number of movies to return per page. Default is 10.
Example Responses
200 OK - Successful Response
This response indicates that the request was successful and the movies were retrieved.
{
"statusCode": 200,
"status": "success",
"message": "Movies fetched successfully",
"results": {
"movies": [],
"totalPages": 0,
"currentPage": 0
}
}404 Not Found - No Movies Found
This response is returned when no movies match the search criteria in the database.
{
"statusCode": 404,
"status": "error",
"message": "No movies found",
"results": null
}500 Internal Server Error - Server Failure
This response indicates that there was an internal server error that prevented the request from being fulfilled.
{
"statusCode": 500,
"status": "error",
"message": "Internal server error",
"results": null
}API Demonstration
Try out the Discover Movies API with this interactive demonstration. Adjust the parameters below and click the button to make an API call.
API Call Example
import axios from 'axios';
const fetchMovies = async () => {
try {
const response = await axios.get('{baseUrl}/api/v1/movies/discover?page=1&limit=1&genre=&year=2025&api_token=undefined');
console.log(response.data);
} catch (error) {
console.error('Error fetching movies:', error);
}
};
fetchMovies();Please sign in and obtain an API token to use this demonstration.