TMDB search by IMDb id and other external ids
To search TMDB by IMDb id, call GET /3/find/{imdb_id}?external_source=imdb_id: tt0137523 returns TMDB movie 550 in movie_results. Twelve external_source values are accepted and seven resolve, including Wikidata and Kinopoisk. The external_ids paths go the other way. An unknown id returns 200 with five empty arrays.
How do I find a TMDB id from an IMDb id?
Call GET /. IMDb ids look like tt0137523 for a title and nm0000093 for a person, while TMDB ids are plain numbers such as 550. The call turns tt0137523 into TMDB movie 550 in one request, and the match sits in movie_results, tv_results or person_results.
IMDb and TMDB are two databases, so a title has one id in each. The movie details record carries imdb_id (tt0137523 for movie 550), and find goes the other way. amodb serves this path under the TMDB v3 base URL https:/, with plans from $5.19 a month on amodb pricing.
GET / takes an id from another system and returns the matching records. The path holds the id, and the external_source query parameter says which system it comes from. amodb accepts twelve sources and seven of them resolve to records: imdb_id, tvdb_id, wikidata_id, kinopoisk_id, facebook_id, twitter_id and instagram_id.
The sample maps the IMDb id tt0137523 to a TMDB id.
curl -sf "https://api.amodb.dev/3/find/tt0137523?external_source=imdb_id" \
-H "Authorization: Bearer $AMODB_KEY"const url = 'https://api.amodb.dev/3/find/tt0137523?external_source=imdb_id';
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.AMODB_KEY}` } });
if (!res.ok) throw new Error(`amodb returned ${res.status}`);
const found = await res.json();
const movie = found.movie_results[0];
console.log(movie ? `${movie.id} ${movie.title}` : 'no match');import os
import requests
r = requests.get(
"https://api.amodb.dev/3/find/tt0137523",
params={"external_source": "imdb_id"},
headers={"Authorization": f"Bearer {os.environ['AMODB_KEY']}"},
timeout=10,
)
r.raise_for_status()
results = r.json()["movie_results"]
print(f"{results[0]['id']} {results[0]['title']}" if results else "no match")<?php
$url = 'https://api.amodb.dev/3/find/tt0137523?external_source=imdb_id';
$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");
}
$movies = json_decode($body, true)['movie_results'];
echo $movies ? $movies[0]['id'] . ' ' . $movies[0]['title'] : 'no match', PHP_EOL;package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
"time"
)
type Found struct {
MovieResults []struct {
ID int `json:"id"`
Title string `json:"title"`
} `json:"movie_results"`
}
func main() {
url := "https://api.amodb.dev/3/find/tt0137523?external_source=imdb_id"
req, _ := http.NewRequest("GET", url, 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 f Found
if err := json.NewDecoder(res.Body).Decode(&f); err != nil {
panic(err)
}
if len(f.MovieResults) == 0 {
fmt.Println("no match")
return
}
fmt.Println(f.MovieResults[0].ID, f.MovieResults[0].Title)
}Parameters
external_idpathrequiredThe id in the other system, for examplett0137523.external_sourcequeryrequiredOne ofimdb_id,tvdb_id,wikidata_id,kinopoisk_id,facebook_id,twitter_id,instagram_id. Five more are accepted and return nothing:freebase_mid,freebase_id,tvrage_id,tiktok_id,youtube_id.languagequeryOne of 14 languages such asenorru-RU. Other values fall back toen.api_keyqueryone of twoYour key. Use this or theAuthorization: Bearerheader.
A missing external_source, or one that is not in the list, answers 400 with status_code 22. The value must be lower case.
Response fields
| Field | Type | Notes |
|---|---|---|
movie_results | array | Movie records with the same fields as a search result, plus media_type set to movie. |
person_results | array | People matched by the id. Each has known_for as an empty array and media_type set to person. |
tv_results | array | TV series records with media_type set to tv. |
tv_episode_results | array | Always empty. |
tv_season_results | array | Always empty. |
Example response
{
"movie_results": [
{
"adult": false,
"backdrop_path": "/c6OLXfKAk5BKeR6broC8pYiCquX.jpg",
"genre_ids": [18, 53],
"id": 550,
"original_language": "en",
"original_title": "Fight Club",
"overview": "A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking n...",
"popularity": 39.0054,
"poster_path": "/jSziioSwPVrOy9Yow3XhWIBDjq1.jpg",
"release_date": "1999-10-15",
"title": "Fight Club",
"video": false,
"vote_average": 8.437,
"vote_count": 33039,
"media_type": "movie"
}
],
"person_results": [],
"tv_results": [],
"tv_episode_results": [],
"tv_season_results": []
}The overview is cut.
Which source finds what
external_source | Id looks like | Example | Usual result array |
|---|---|---|---|
imdb_id | tt plus digits for titles, nm plus digits for people | tt0137523, nm0000093 (Brad Pitt) | movie_results, tv_results or person_results |
tvdb_id | Number | 81189 (Breaking Bad) | tv_results |
wikidata_id | Q plus digits | Q190050 (Fight Club), Q1079 (Breaking Bad), Q35332 (Brad Pitt) | movie_results, tv_results or person_results |
kinopoisk_id | Number | 361 (Fight Club), 404900 (Breaking Bad) | movie_results or tv_results |
facebook_id, twitter_id, instagram_id | Account name | FightClub | Depends on the account |
One account name can match more than one title. For example instagram_ returns the series and the film El Camino, so read every array.
curl -sf "https://api.amodb.dev/3/find/361?external_source=kinopoisk_id" \
-H "Authorization: Bearer $AMODB_KEY"Which external_source values does find accept?
All twelve values are listed below. The first seven resolve to records. The last five are accepted and return five empty arrays. Send the value in lower case, exactly as written.
external_source | Resolves | Id looks like | Example | Result array |
|---|---|---|---|---|
imdb_id | Yes | tt plus digits for titles, nm plus digits for people | tt0137523 | movie_results, tv_results or person_results |
tvdb_id | Yes | Number | 81189 | tv_results |
wikidata_id | Yes | Q plus digits | Q190050 | movie_results, tv_results or person_results |
kinopoisk_id | Yes | Number | 361 | movie_results or tv_results |
facebook_id | Yes | Account name | FightClub | Depends on the account |
twitter_id | Yes | Account name | BreakingBad | Depends on the account |
instagram_id | Yes | Account name | breakingbad | Depends on the account |
freebase_mid | No | Not resolved | none | All five arrays empty |
freebase_id | No | Not resolved | none | All five arrays empty |
tvrage_id | No | Not resolved | none | All five arrays empty |
tiktok_id | No | Not resolved | none | All five arrays empty |
youtube_id | No | Not resolved | none | All five arrays empty |
A value that is not in this table answers 400 with status_code 22. The movie details API page covers the record that carries imdb_id, and the TMDB search API finds a TMDB id from a title.
How do I get the IMDb id of a TMDB movie?
Read imdb_id from the movie details record, or call an external_ids endpoint to get every id at once. The reverse direction is a set of external_ids endpoints. They return the ids that other systems use for a record you already have.
| Method and path | Returns | Parameters |
|---|---|---|
GET / | imdb_id, wikidata_id, facebook_id, instagram_id, twitter_id, kinopoisk_id | movie_id |
GET / | The same plus freebase_mid, freebase_id, tvdb_id, tvrage_id | tv_id |
GET / | imdb_id, wikidata_id, facebook_id, instagram_id, tiktok_id, twitter_id, youtube_id | person_id |
An id that a title does not have comes back as null. kinopoisk_id is a string and is only present for a movie or series when amodb knows it. A real answer for /:
{
"id": 550,
"imdb_id": "tt0137523",
"wikidata_id": "Q190050",
"facebook_id": "FightClub",
"instagram_id": null,
"twitter_id": null,
"kinopoisk_id": "361"
}A real answer for /:
{
"id": 1396,
"imdb_id": "tt0903747",
"freebase_mid": null,
"freebase_id": null,
"tvdb_id": 81189,
"tvrage_id": null,
"wikidata_id": "Q1079",
"facebook_id": "BreakingBad",
"instagram_id": "breakingbad",
"twitter_id": "BreakingBad",
"kinopoisk_id": "404900"
}The season and episode external_ids endpoints exist, but every id in them is null today, so skip them.
What Wikidata facts can I read for a title?
GET / and GET / return the Wikidata id of a title and facts about it: money, neighbours in a series, Wikipedia pages, awards and places. Every key is always present. A fact that is not known is null for a single value and [] for a list.
| Method and path | Returns | Parameters |
|---|---|---|
GET / | Wikidata id and facts | movie_id, language |
GET / | Wikidata id and facts | tv_id, language |
append_ | Same block under wikidata, with its id | Added to a details call |
This is the answer for Fight Club (movie 550), cut to a readable size:
{
"id": 550,
"wikidata_id": "Q190050",
"budget": {
"value": 63000000,
"currency": "USD"
},
"box_office": {
"value": 101209702,
"currency": "USD",
"worldwide": true
},
"follows": null,
"followed_by": null,
"sitelinks": {
"en": "Fight Club",
"ru": "Бойцовский клуб (фильм)",
"uk": "Бійцівський клуб (фільм)"
},
"awards": [
{
"wikidata_id": "Q28044798",
"label": "Empire Awards, UK for best british actress"
},
{
"wikidata_id": "Q943908",
"label": "Jupiter Award",
"year": 2000
}
],
"nominations": [
{
"wikidata_id": "Q488645",
"label": "Academy Award for Best Sound Editing",
"year": 2000
}
],
"based_on": [
{
"wikidata_id": "Q837283",
"label": "Fight Club",
"author": {
"wikidata_id": "Q268181",
"label": "Chuck Palahniuk"
}
}
],
"filming_locations": [
{
"wikidata_id": "Q65",
"label": "Los Angeles"
}
],
"narrative_locations": [
{
"wikidata_id": "Q65",
"label": "Los Angeles"
}
],
"original_broadcasters": []
}The sitelinks object has 14 entries and awards has 5. Both are cut here.
| Field | Type | Notes |
|---|---|---|
id | integer | TMDB id of the title. It stays when you use append_to_response. |
wikidata_id | string or null | Wikidata item such as Q190050. |
budget | object or null | value is a rounded integer and currency is an ISO code or null. |
box_office | object or null | Same as budget, plus worldwide set to true or false. |
follows, followed_by | object or null | The previous and next title in a series of films, as a link. |
sitelinks | object | Maps a language code to the Wikipedia page title. Keys are the 14 served languages. {} when none. |
awards, nominations | array | Links with an optional year. |
based_on | array | Source works with wikidata_id, label and an author object or null. |
filming_locations, narrative_locations, original_broadcasters | array | Links. Breaking Bad has AMC in original_broadcasters. |
A link has wikidata_id, label and, when the item is a title in the catalog, tmdb_id and media_type. For The Matrix Reloaded (movie 604) the neighbours are links to movies 603 and 605:
{
"follows": {
"wikidata_id": "Q83495",
"label": "The Matrix",
"tmdb_id": 603,
"media_type": "movie"
},
"followed_by": {
"wikidata_id": "Q207536",
"label": "The Matrix Revolutions",
"tmdb_id": 605,
"media_type": "movie"
}
}Each label comes in the request language and falls back to English. With language=ru the author above reads Чак Паланик.
Personal or commercial project?
A lookup by IMDb id is one request on every service that offers it. The terms around that request are what differ, so check them before you ship a paid app.
| Service | Price and terms for a commercial app |
|---|---|
| amodb | $5.19, $6.19 or $7.19 a month, as low as $3.11 on a 24 month prepay. No extra charge for commercial use, and the terms do not prohibit it. No amodb logo; credit JustWatch and licensed texts and images as marked. |
| TMDB | Free only until the app earns money (TMDB staff on the TMDB forum, 2026-10-15). Then $149 a month for companies under $1M revenue, custom quote above (TMDB staff, 2026-03-31). |
| OMDb | Free key with 1,000 requests a day. The terms say personal, non-commercial use, and the content is CC BY-NC 4.0. Patreon tiers start at $1 a month. |
| IMDb official API | AWS Marketplace listing at $400,000 per 12 months plus metered fees. The free IMDb datasets are for personal and non-commercial use only. |
Prices were read on 2026-10-19 from the TMDB API terms, the OMDb Patreon page, the OMDb legal page and the AWS Marketplace listing. The full comparisons are on amodb pricing, OMDb API and IMDb API. Kinopoisk ids are covered on Kinopoisk API.
Errors
Errors use the TMDB body, for example {"success": false,.
| HTTP | status_code | When |
|---|---|---|
| 400 | 22 | external_source is missing, not lower case or not in the list. |
| 401 | 7 | The key is missing or wrong. |
| 402 | 36 | The plan period has ended. |
| 404 | 34 | The title id in a wikidata path does not exist. |
| 429 | 25 | Over your requests per minute. Wait for the Retry-After seconds. |
An unknown external id on find is not an error: expect all five arrays to be empty. The external_ids endpoints do not answer 404 for an unknown id either. They answer 200 with every id null. See error codes and authentication.
Practical notes
- Save the TMDB id the first time you resolve an external id. Later calls then skip
findand go straight to the details path, which saves one request per title. - Always test that the array you want has an item.
findcan return several arrays at once for one id. - Details and external ids are cached at the edge for 6 hours. A repeated lookup inside that time returns the stored answer.
wikidata_idworks both ways: pass it tofindto get a title, or read it fromexternal_idsto link out.- To bring OMDb style IMDb lookups over, see the OMDb API documentation for the
iparameter. For scores after you resolve a title, see the movie ratings API. - To search a title and fetch its cast and IMDb rating in two calls, follow the TMDB API in Python tutorial.
- Every other path is listed in the API reference.