TMDB credits API: get the cast and crew of a movie
The TMDB credits API returns the cast and crew of a movie at GET /3/movie/{movie_id}/credits, and of series, seasons and episodes under /3/tv. The JSON matches TMDB v3, with credit_id, order, department and job. Credits are cached for 6 hours. Episode credits add guest_stars, and their cast array is empty.
How do I get the cast of a movie?
Call GET / and read the cast array, sorted by order. Inception (27205) returns 52 cast and 735 crew entries today in one request, and the edge caches the reply for 6 hours. The director is the crew entry whose job is Director. All endpoints are listed in the API reference.
The call returns two arrays for one movie: cast for people who appear on screen and crew for people who worked behind the camera. Every entry holds the person id, so you can open the full record with the person API or the actor API. The same data is available inside the movie details API reply with append_.
The example reads Inception, prints the director and lists the five first billed actors.
curl -sSf "https://api.amodb.dev/3/movie/27205/credits?language=en-US" \
-H "Authorization: Bearer $AMODB_KEY"const url = 'https://api.amodb.dev/3/movie/27205/credits?language=en-US';
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.AMODB_KEY}` } });
if (!res.ok) throw new Error(`amodb returned ${res.status}`);
const credits = await res.json();
const director = credits.crew.find((c) => c.job === 'Director');
console.log('Director:', director?.name);
for (const c of [...credits.cast].sort((a, b) => a.order - b.order).slice(0, 5)) {
console.log(c.order, c.name, 'as', c.character);
}import os
import requests
r = requests.get(
"https://api.amodb.dev/3/movie/27205/credits",
params={"language": "en-US"},
headers={"Authorization": f"Bearer {os.environ['AMODB_KEY']}"},
timeout=10,
)
r.raise_for_status()
credits = r.json()
director = next((c for c in credits["crew"] if c["job"] == "Director"), None)
print("Director:", director and director["name"])
for c in sorted(credits["cast"], key=lambda c: c["order"])[:5]:
print(c["order"], c["name"], "as", c["character"])<?php
$url = 'https://api.amodb.dev/3/movie/27205/credits?language=en-US';
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 10,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AMODB_KEY')],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status !== 200) {
throw new RuntimeException("amodb returned $status");
}
$credits = json_decode($body, true);
usort($credits['cast'], fn ($a, $b) => $a['order'] <=> $b['order']);
foreach (array_slice($credits['cast'], 0, 5) as $c) {
echo $c['order'], ' ', $c['name'], ' as ', $c['character'], PHP_EOL;
}package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
"time"
)
type Credits struct {
Cast []struct {
Order int `json:"order"`
Name string `json:"name"`
Character string `json:"character"`
} `json:"cast"`
Crew []struct {
Name string `json:"name"`
Job string `json:"job"`
} `json:"crew"`
}
func main() {
req, _ := http.NewRequest("GET", "https://api.amodb.dev/3/movie/27205/credits?language=en-US", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("AMODB_KEY"))
client := &http.Client{Timeout: 10 * time.Second}
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
panic(res.Status)
}
var c Credits
if err := json.NewDecoder(res.Body).Decode(&c); err != nil {
panic(err)
}
for _, m := range c.Crew {
if m.Job == "Director" {
fmt.Println("Director:", m.Name)
}
}
for i, a := range c.Cast {
if i == 5 {
break
}
fmt.Println(a.Order, a.Name, "as", a.Character)
}
}Parameters
movie_idpathrequiredNumeric movie id, for example27205.api_keyqueryone of twoYour key. Use this or theAuthorization: Bearerheader.languagequeryTMDB tag such asen-USorfr-FR. Tags outside the 14 base languages fall back toen.
Response fields
| Field | Applies to | Notes |
|---|---|---|
id | top level | Id of the movie, series, season or episode the credits belong to. |
cast, crew | top level | Arrays of entries. Episode credits add guest_stars. |
id | each entry | Person id. Open it with people. |
name, original_name | each entry | The person's name. |
known_for_department | each entry | The person's main job overall, not the job on this title. |
gender, popularity, adult | each entry | Same meaning as on the person record. |
profile_path | each entry | Image path or null. Append to https:/. |
credit_id | each entry | String that identifies this one credit. |
character | cast, guest stars | Role name, empty for some entries. |
order | cast, guest stars | Billing position, 0 is first. |
department | crew | Group such as Directing, Writing, Production, Camera, Editing, Sound, Art, Visual Effects, Lighting, Costume & Make-Up or Crew. |
job | crew | Specific job, for example Director, Screenplay or Editor. |
Example response
GET /. The reply has 52 cast and 735 crew entries today, so both arrays are cut to two here:
{
"id": 27205,
"cast": [
{
"adult": false,
"gender": 2,
"id": 6193,
"known_for_department": "Acting",
"name": "Leonardo DiCaprio",
"original_name": "Leonardo DiCaprio",
"popularity": 9.3213,
"profile_path": "/wo2hJpn04vbtmh0B9utCFdsQhxM.jpg",
"character": "Dom Cobb",
"credit_id": "52fe4534c3a368484e04de03",
"order": 0
},
{
"adult": false,
"gender": 2,
"id": 24045,
"known_for_department": "Acting",
"name": "Joseph Gordon-Levitt",
"original_name": "Joseph Gordon-Levitt",
"popularity": 5.6202,
"profile_path": "/z2FA8js799xqtfiFjBTicFYdfk.jpg",
"character": "Arthur",
"credit_id": "52fe4534c3a368484e04de0b",
"order": 1
}
],
"crew": [
{
"adult": false,
"gender": 2,
"id": 1025090,
"known_for_department": "Crew",
"name": "Jim Wilkey",
"original_name": "Jim Wilkey",
"popularity": 0.9114,
"profile_path": "/peEdS7ZYHwEeMJAwInJj732AeYs.jpg",
"credit_id": "6634553bad59b501286dab5f",
"department": "Crew",
"job": "Stunt Driver"
},
{
"adult": false,
"gender": 2,
"id": 1741194,
"known_for_department": "Sound",
"name": "James Thatcher",
"original_name": "James Thatcher",
"popularity": 0.6215,
"profile_path": null,
"credit_id": "5bcdece8925141613e0216d3",
"department": "Sound",
"job": "Musician"
}
]
}How do I get the cast of a TV series, season or episode?
All paths below share the base https:/ and take language.
| Method and path | Returns |
|---|---|
GET / | Cast and crew of the series, one entry per person and role. |
GET / | Cast and crew of one season. |
GET / | crew and guest_stars for one episode. cast is an empty array. |
The same data is available with append_ on the series, season and episode paths. The entry shape matches the movie credits above. Episode guest stars carry character and order, and crew entries carry department and job.
GET /, with the arrays cut to two entries:
{
"id": 63056,
"cast": [],
"crew": [
{
"department": "Writing",
"job": "Writer",
"credit_id": "5256c8a019c2956ff6046e2b",
"adult": false,
"gender": 2,
"id": 9813,
"known_for_department": "Writing",
"name": "David Benioff",
"original_name": "David Benioff",
"popularity": 2.0354,
"profile_path": "/xvNN5huL0X8yJ7h3IZfGG4O2zBD.jpg"
},
{
"department": "Editing",
"job": "Editor",
"credit_id": "54eef2ab925141795f005d4f",
"adult": false,
"gender": 2,
"id": 18077,
"known_for_department": "Editing",
"name": "Oral Norrie Ottey",
"original_name": "Oral Norrie Ottey",
"popularity": 0,
"profile_path": null
}
],
"guest_stars": [
{
"character": "Benjen Stark",
"credit_id": "5256c8b919c2956ff604836a",
"order": 61,
"adult": false,
"gender": 2,
"id": 119783,
"known_for_department": "Acting",
"name": "Joseph Mawle",
"original_name": "Joseph Mawle",
"popularity": 1.4645,
"profile_path": "/1Ocb9v3h54beGVoJMm4w50UQhLf.jpg"
},
{
"character": "Rickon Stark",
"credit_id": "566a83bcc3a3683f56003604",
"order": 80,
"adult": false,
"gender": 2,
"id": 1050248,
"known_for_department": "Acting",
"name": "Art Parkinson",
"original_name": "Art Parkinson",
"popularity": 1.2594,
"profile_path": "/ejAKOJME1DsvHECLWdQ7dEtXyyc.jpg"
}
]
}amodb does not offer aggregate TV credits or a lookup by credit_id. For a series cast list, read / and sort cast by order.
How do I read cast and crew in an app?
| Task | How |
|---|---|
| Show the director | Pick the crew entries with job equal to Director. A film can have several. |
| Show the lead cast | Sort cast by order and take the first 10. |
| Group the crew | Group by department. A person with two jobs appears twice, so merge on the person id. |
| Show a series cast | Read the series credits and sort cast by order. |
| List all departments and jobs | Read the lookup list described on TMDB genre ids. |
Does append_to_response=credits cost an extra request?
No. Credits arrive under the credits key of the same reply, so the call is one request of your 20, 40 or 120 per minute. Cached replies count too.
| Approach | Calls | Requests used |
|---|---|---|
| Movie details only | /movie/27205 | 1 |
| Details and credits in one call | / | 1 |
| Details and credits as two calls | /movie/27205, /movie/27205/credits | 2 |
| Season 1 credits of a series | / | 1 |
| Every episode of a 10 episode season | / for n from 1 to 10 | 10 |
How does this differ from the TMDB credits endpoint?
The paths, parameters and fields are the same, so a TMDB client needs a new base URL and key. Two TMDB paths are missing, and the terms differ. TMDB figures below come from its API terms, read on 2026-10-19.
| Item | TMDB | amodb |
|---|---|---|
| Base URL | https:/ | https:/ |
| Movie, series, season and episode credits | In TMDB v3 | Offered, same fields |
aggregate_credits for series | In TMDB v3 | Not offered |
Lookup by credit_id | In TMDB v3 | Not offered |
| Rate limit | About 40 requests per second per IP, and TMDB says it could change | 20, 40 or 120 requests per minute per account |
| Logo or attribution | TMDB terms require the TMDB logo and a not-endorsed notice | No amodb logo; credit JustWatch and licensed texts and images as marked |
Personal or commercial project?
TMDB is free only until your app earns money. Ads, in-app purchases, donations and subscriptions all count as earning, and TMDB staff quote $149 a month for companies under $1M revenue (2026-03-31). amodb starts at $5.19 a month, charges nothing extra for commercial use, and its terms do not prohibit it. Compare plans on amodb pricing, or read the TMDB API alternative page.
What errors does the credits API return?
| HTTP | status_code | When |
|---|---|---|
| 401 | 7 | The key is missing or wrong. |
| 402 | 36 | The plan period has ended. |
| 404 | 34 | The movie, series, season or episode does not exist, or the path is not offered. |
| 405 | 37 | You called a write method. |
| 429 | 25 | Over your requests per minute. Wait for the Retry-After seconds. |
Details are on error codes and rate limits.
Practical notes
- Credits are cached for 6 hours, like details. A new cast member can take that long to appear.
- A large production can list hundreds of crew entries. Slice the arrays before you render them.
profile_pathis null for people without a photo. Usew185for list rows andh632for detail views.- Movie and TV records are in the movie details API and the TMDB TV API. Season and episode records are on seasons and episodes API.
- To call the credits path from code, follow TMDB API in Python or TMDB API in JavaScript. The movie API page gives the product overview.