TMDB search API: search movies by title
The TMDB search API turns a text query into ids. GET /3/search/movie finds movies by title, and sibling paths search TV shows, people, collections, companies, keywords or all media with multi. The JSON matches TMDB v3. A page holds 20 results, pages run from 1 to 500, and the edge caches a query for 10 minutes.
How do I search movies by title?
Call GET /. The reply lists up to 20 matches per page, best match first, and each entry carries the id, title and release date. A search costs one request of your 20, 40 or 120 per minute, and the edge caches the same query for 10 minutes. Pass the id to the movie details API for the full record. Every endpoint is listed in the API reference.
Use search to turn what a user typed into a movie id. The example looks for Inception, restricted to 2010, and prints id, title and release date.
curl -sSf --get "https://api.amodb.dev/3/search/movie" \
--data-urlencode "query=inception" \
--data-urlencode "year=2010" \
-H "Authorization: Bearer $AMODB_KEY"const params = new URLSearchParams({ query: 'inception', year: '2010', language: 'en-US' });
const res = await fetch(`https://api.amodb.dev/3/search/movie?${params}`, {
headers: { Authorization: `Bearer ${process.env.AMODB_KEY}` },
});
if (!res.ok) throw new Error(`amodb returned ${res.status}`);
const { results, total_results } = await res.json();
console.log(`${total_results} matches`);
for (const m of results.slice(0, 5)) console.log(m.id, m.title, m.release_date);import os
import requests
r = requests.get(
"https://api.amodb.dev/3/search/movie",
params={"query": "inception", "year": 2010, "language": "en-US"},
headers={"Authorization": f"Bearer {os.environ['AMODB_KEY']}"},
timeout=10,
)
r.raise_for_status()
data = r.json()
print(data["total_results"], "matches")
for m in data["results"][:5]:
print(m["id"], m["title"], m["release_date"])<?php
$url = 'https://api.amodb.dev/3/search/movie?' . http_build_query([
'query' => 'inception',
'year' => 2010,
'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");
}
$data = json_decode($body, true);
foreach (array_slice($data['results'], 0, 5) as $m) {
echo $m['id'], ' ', $m['title'], ' ', $m['release_date'], PHP_EOL;
}package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"time"
)
type SearchPage struct {
TotalResults int `json:"total_results"`
Results []struct {
ID int `json:"id"`
Title string `json:"title"`
ReleaseDate string `json:"release_date"`
} `json:"results"`
}
func main() {
q := url.Values{"query": {"inception"}, "year": {"2010"}, "language": {"en-US"}}
req, _ := http.NewRequest("GET", "https://api.amodb.dev/3/search/movie?"+q.Encode(), 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 p SearchPage
if err := json.NewDecoder(res.Body).Decode(&p); err != nil {
panic(err)
}
fmt.Println(p.TotalResults, "matches")
for _, m := range p.Results {
fmt.Println(m.ID, m.Title, m.ReleaseDate)
}
}Parameters
queryqueryrequiredText to search. URL-encode it: spaces become%20or+.api_keyqueryone of twoYour key. Use this or theAuthorization: Bearerheader.yearqueryFour digit year. Keeps movies with any release date in that year, in any country.primary_release_yearqueryFour digit year. Matches the primary release date only, so it can return fewer titles thanyear.regionqueryUppercase 2 letter country code such asUS. Replacesrelease_datewith the date in that country when one is known. It does not remove titles.include_adultqueryAccepted and ignored. Adult titles are never returned.languagequeryTMDB tag such asen-USorit-IT. 14 base languages are served, anything else falls back to English. Defaulten-US.pagequeryPage number from 1 to 500. Default 1.
Response fields
| Field | Type | Notes |
|---|---|---|
page | integer | The page you asked for. |
results | array | Up to 20 entries, best match first. |
total_pages, total_results | integer | Size of the result set for this query. Capped at 500 pages and 10000 results. |
id | integer | Movie id for the details endpoint. |
title, original_title | string | Localized and original title. |
original_language | string | Two letter code of the language the movie was made in. |
overview | string | Localized text, empty when no translation exists. |
release_date | string | YYYY-MM-DD, empty for titles without a date. |
genre_ids | array of integers | Genre ids, not names. Map them with genres. |
poster_path, backdrop_path | string or null | Append to https:/. |
popularity, vote_average, vote_count | number | Ranking and score values. |
adult, video | boolean | adult is always false. video is true for entries flagged as video content. |
Example response
{
"page": 1,
"results": [
{
"adult": false,
"backdrop_path": "/zSBVQIvx4UIHoFf1oDvixHyIQrz.jpg",
"genre_ids": [28, 878, 80],
"id": 27205,
"original_language": "en",
"original_title": "Inception",
"overview": "Cobb, a skilled thief who commits corporate espionage by infiltrating the subconscious of his targets is of...",
"popularity": 60.9811,
"poster_path": "/xlaY2zyzMfkhk0HSC5VUwzoZPU1.jpg",
"release_date": "2010-07-15",
"title": "Inception",
"video": false,
"vote_average": 8.373,
"vote_count": 40459
},
{
"adult": false,
"backdrop_path": "/p8K8Z4yjaslJx5mTsIC5L6LJxQB.jpg",
"genre_ids": [16, 28, 53],
"id": 64956,
"original_language": "en",
"original_title": "Inception: The Cobol Job",
"overview": "Cobb, Arthur and Nash are enlisted by Cobol Engineering.",
"popularity": 1.9401,
"poster_path": "/sNxqwtyHMNQwKWoFYDqcYTui5Ok.jpg",
"release_date": "2010-12-07",
"title": "Inception: The Cobol Job",
"video": false,
"vote_average": 7.2,
"vote_count": 320
},
{
"adult": false,
"backdrop_path": null,
"genre_ids": [10402],
"id": 973484,
"original_language": "en",
"original_title": "Inception: Music from the Motion Picture",
"overview": "The Special Features Blu-ray disc contains a lossless DTS-HD MA 5.1 surround mix of the Inception soundtrack.",
"popularity": 0.4911,
"poster_path": "/7uM4DyRVAcgagvhZoWrkrqMPbqV.jpg",
"release_date": "2010-12-07",
"title": "Inception: Music from the Motion Picture",
"video": true,
"vote_average": 7,
"vote_count": 3
}
],
"total_pages": 1,
"total_results": 3
}The reply has all three matches. It was fetched from the live API and only long overview strings were shortened.
Which search endpoints are there besides movies?
Every path below shares the base https:/, needs query, and returns the same page, results, total_pages and total_results envelope. Each one also takes page from 1 to 500. include_adult is accepted on all of them and ignored.
| Method and path | Finds | Extra parameters | Entry fields |
|---|---|---|---|
GET /search/tv | TV shows | first_air_date_year, year, language | name, original_name, first_air_date, origin_country |
GET /search/person | People | language | name, original_name, known_for_department, gender, profile_path, known_for |
GET /search/multi | Movies, shows and people together | language | media_type plus the fields of that type |
GET /search/collection | Movie collections | language | name, original_name, overview, poster_path, backdrop_path |
GET /search/company | Production companies | none | name, logo_path, origin_country |
GET /search/keyword | Keywords | none | id, name |
For TV, first_air_date_year keeps shows whose first air date is in that year, while year also keeps older shows that aired in that year. A search for the with year=2010 returns The Simpsons, which first aired in 1989, and the same search with first_ does not. If you send both, both must match. Person entries carry up to 3 known_for titles, each with media_type. /search/multi ignores year.
Entities found here continue on the TMDB TV API, the person API, the collections API, production companies and networks and the keywords API.
| Goal | Call | Next step |
|---|---|---|
| Find a movie by title | / | /movie/{id} on the movie details API |
| Find a TV show by name | / | /tv/{id} on the TMDB TV API |
| Find an actor or director | / | /person/{id} on the person API |
| One box for all three | / | Branch on media_type |
| Find a movie by IMDb id | / | Search by IMDb id |
Multi search
media_type is movie, tv or person, and it tells you which fields to expect. Movie entries carry title and TV and person entries carry name.
const byType = { movie: [], tv: [], person: [] };
for (const r of results) byType[r.media_type]?.push(r.title || r.name);
console.log(byType);What errors does the search API return?
/search/tv and /search/person answer a query with no match with HTTP 200, an empty results array and total_results of 0. At the moment /search/movie, /search/multi, /search/keyword, /search/company and /search/collection answer the same case with HTTP 500 and status_code 11. Treat a 500 on those paths as "no results" unless it repeats for queries that you know match.
| HTTP | status_code | When |
|---|---|---|
| 401 | 7 | The key is missing or wrong. |
| 402 | 36 | The plan period has ended. |
| 405 | 37 | You called a write method. |
| 429 | 25 | Over your requests per minute. Wait for the Retry-After seconds. |
| 500 | 11 | A movie, multi, keyword, company or collection query that matches nothing, or a page outside 1 to 500. |
| 504 | 24 | The backend did not answer in time. Retry once. |
See error codes for the full list and rate limits for the windows.
How does this differ from the TMDB search endpoint?
The search paths, the query parameters and the JSON fields follow TMDB v3, so a client built for api.themoviedb.org/3 works after a base URL and key change. The host, the limit and the logo rule differ, and so does one error case.
| Item | TMDB | amodb |
|---|---|---|
| Base URL | https:/ | https:/ |
| 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 |
The error case: on amodb, a movie, multi, keyword, company or collection query that matches nothing answers HTTP 500 with status_code 11, so treat that as an empty result. TMDB figures come from its API terms and forum answers, read on 2026-10-19. The details are in amodb vs TMDB.
Personal or commercial project?
TMDB is free only until your app earns money. Its staff say an app is commercial once it earns revenue from ads, in-app purchases, donations or subscriptions, and the commercial plan is $149 a month for companies under $1M revenue (TMDB staff, 2026-03-31). TMDB decides what counts as commercial. amodb costs from $5.19 a month and charges nothing extra for commercial use, as listed on amodb pricing.
Practical notes
- The edge caches a search for 10 minutes and shares the copy across keys. Each call still counts against your 20, 40 or 120 requests per minute, because the rate limit runs before the cache. See rate limits.
- For a search box, wait 300 ms after the last keystroke and cancel the request in flight. A box that fires on every key can use a 20 requests per minute plan in seconds.
- Lowercase and trim the query before you use it as a cache key on your side.
- To look up a title by IMDb id, skip search and use search by IMDb id.
- A keyword id from
/search/keywordfeeds thewith_keywordsfilter on the TMDB discover API, and a company id feedswith_companies. - To build a search box in code, follow TMDB API in JavaScript or TMDB API in Python. The movie API page shows what else one key can read.