Updated on Sep 14, 2023
2
min read
Retrieve an actor
GET
You can retrieve detailed information about a specific actor from the Movies API by using the actor's unique identifier (ID). This document provides instructions on how to make a GET request to retrieve actor data.
Endpoint
To retrieve an actor, make a GET request to the following endpoint:
Replace {actor_id}
with the unique identifier of the actor you want to retrieve.
Request
Here's an example of how to make a GET request to retrieve actor information using JavaScript:
In this example, we use the fetch
function to make an HTTP GET request to the specified API endpoint. Replace 123
with the actual actor ID you want to retrieve.
Response
The API will respond with detailed information about the actor in JSON format. Here's an example response:
Response Explanation
id
: The unique identifier of the actor.name
: The full name of the actor.birthdate
: The birthdate of the actor (if available).nationality
: The nationality of the actor (if available).biography
: A brief biography or description of the actor (if available).movies
: An array of movies associated with the actor. Each movie object includes details about the movie and the character played by the actor.
You can now retrieve detailed information about specific actors using the Movies API. Next, we'll cover other actions related to actors.