Movie Cast
The Movie Cast endpoint provides detailed information about the cast of a specific movie. This endpoint returns a collection of cast members for the requested movie, allowing you to display information about actors and their roles. It's a great feature for enhancing movie details pages or creating cast-focused sections in your application.
Endpoint Information
Endpoint URL
{baseUrl}/movie/cast/:movieIdPath Parameters
Use the following path parameter to specify the movie for which you want to retrieve the cast:
- movieId: The unique identifier of the movie.
Example Responses
200 OK - Successful Response
This response indicates that the request was successful and the movie cast was retrieved.
{
"statusCode": 200,
"status": "success",
"message": "Movie cast fetched successfully",
"results": [
{
"originalName": "Actor Name",
"characterName": "Character Name",
"images": []
}
]
}404 Not Found - Cast Not Found
This response is returned when the specified movie is not found in the database.
{
"statusCode": 404,
"status": "error",
"message": "Cast not 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 Movie Cast API with this interactive demonstration. Enter a movie ID 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/movie/cast/?movieId=&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.