Documentation Index
Fetch the complete documentation index at: https://sirjosh.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
For this quickstart, you’ll use the Details endpoint in the Account Folder to retrieve the public details of an account on TMDB.
GET https://api.themoviedb.org/3/account/{account_id}
Get your account_id
The endpoint to fetch the account_id is:
GET https://api.themoviedb.org/3/account
- Add the query parameter your_bearer_token to authenticate your request.
GET https://api.themoviedb.org/3/account?bearer_token=YOUR_BEARER_TOKEN
Example response
{
"id": 12345678, //Your account_id
"name": "YourUsername",
"include_adult": false,
"username": "YourUsername",
"avatar": {
"gravatar": {
"hash": "abc123def456ghi789"
},
"tmdb": {
"avatar_path": "/path/to/avatar.jpg"
}
},
"iso_639_1": "en",
"iso_3166_1": "US"
}
Your account_id is an integer value.
Get the Account details endpoint.
GET https://api.themoviedb.org/3/account/{account_id}
Replace the {account_id} with your TMDb account_id
To authenticate your request, include your bearer_token as a query parameter or in the request header.
https://api.themoviedb.org/3/account/{account_id}
?bearer_token=YOUR_BEARER_TOKEN
Make the Request
Below are examples of how to make the request using different tools:
Using cURL
Using Postman
Using Python
curl "https://api.themoviedb.org/3/account/{account_id}?api_key=YOUR_BEARER_TOKEN"
-
Open Postman and create a new request.
-
Set the request type to GET.
-
Enter the URL:
https://api.themoviedb.org/3/account/{account_id}?api_key=YOUR_API_KEY
-
Click Send.
import requests
api_key = "YOUR_API_KEY"
account_id = "YOUR_ACCOUNT_ID"
url = f"https://api.themoviedb.org/3/account/{account_id}?api_key={your_bearer_token}"
response = requests.get(url)
data = response.json()
print(data)
Example response
If the request is successful, you’ll receive a JSON response containing details about the account. Here’s an example response:
{
"id": 12345678,
"name": "YourUsername",
"include_adult": false,
"username": "YourUsername",
"avatar": {
"gravatar": {
"hash": "abc123def456ghi789"
},
"tmdb": {
"avatar_path": "/path/to/avatar.jpg"
}
},
"iso_639_1": "en",
"iso_3166_1": "US"
}