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.

Updated View as Markdown

How do I find a TMDB id from an IMDb id?

Call GET /3/find/{imdb_id}?external_source=imdb_id. 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://api.amodb.dev/3, with plans from $5.19 a month on amodb pricing.

GET /3/find/{external_id} 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.

bashjspyphpgo
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_idpathrequired
    The id in the other system, for example tt0137523.
  • external_sourcequeryrequired
    One of imdb_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.
  • languagequery
    One of 14 languages such as en or ru-RU. Other values fall back to en.
  • api_keyqueryone of two
    Your key. Use this or the Authorization: Bearer header.

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

FieldTypeNotes
movie_resultsarrayMovie records with the same fields as a search result, plus media_type set to movie.
person_resultsarrayPeople matched by the id. Each has known_for as an empty array and media_type set to person.
tv_resultsarrayTV series records with media_type set to tv.
tv_episode_resultsarrayAlways empty.
tv_season_resultsarrayAlways empty.

Example response

JSON
{
  "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_sourceId looks likeExampleUsual result array
imdb_idtt plus digits for titles, nm plus digits for peoplett0137523, nm0000093 (Brad Pitt)movie_results, tv_results or person_results
tvdb_idNumber81189 (Breaking Bad)tv_results
wikidata_idQ plus digitsQ190050 (Fight Club), Q1079 (Breaking Bad), Q35332 (Brad Pitt)movie_results, tv_results or person_results
kinopoisk_idNumber361 (Fight Club), 404900 (Breaking Bad)movie_results or tv_results
facebook_id, twitter_id, instagram_idAccount nameFightClubDepends on the account

One account name can match more than one title. For example instagram_id=breakingbad returns the series and the film El Camino, so read every array.

curl
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_sourceResolvesId looks likeExampleResult array
imdb_idYestt plus digits for titles, nm plus digits for peoplett0137523movie_results, tv_results or person_results
tvdb_idYesNumber81189tv_results
wikidata_idYesQ plus digitsQ190050movie_results, tv_results or person_results
kinopoisk_idYesNumber361movie_results or tv_results
facebook_idYesAccount nameFightClubDepends on the account
twitter_idYesAccount nameBreakingBadDepends on the account
instagram_idYesAccount namebreakingbadDepends on the account
freebase_midNoNot resolvednoneAll five arrays empty
freebase_idNoNot resolvednoneAll five arrays empty
tvrage_idNoNot resolvednoneAll five arrays empty
tiktok_idNoNot resolvednoneAll five arrays empty
youtube_idNoNot resolvednoneAll 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 pathReturnsParameters
GET /movie/{movie_id}/external_idsimdb_id, wikidata_id, facebook_id, instagram_id, twitter_id, kinopoisk_idmovie_id
GET /tv/{tv_id}/external_idsThe same plus freebase_mid, freebase_id, tvdb_id, tvrage_idtv_id
GET /person/{person_id}/external_idsimdb_id, wikidata_id, facebook_id, instagram_id, tiktok_id, twitter_id, youtube_idperson_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 /3/movie/550/external_ids:

JSON
{
  "id": 550,
  "imdb_id": "tt0137523",
  "wikidata_id": "Q190050",
  "facebook_id": "FightClub",
  "instagram_id": null,
  "twitter_id": null,
  "kinopoisk_id": "361"
}

A real answer for /3/tv/1396/external_ids:

JSON
{
  "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 /3/movie/{movie_id}/wikidata and GET /3/tv/{tv_id}/wikidata 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 pathReturnsParameters
GET /movie/{movie_id}/wikidataWikidata id and factsmovie_id, language
GET /tv/{tv_id}/wikidataWikidata id and factstv_id, language
append_to_response=wikidataSame block under wikidata, with its idAdded to a details call

This is the answer for Fight Club (movie 550), cut to a readable size:

JSON
{
  "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.

FieldTypeNotes
idintegerTMDB id of the title. It stays when you use append_to_response.
wikidata_idstring or nullWikidata item such as Q190050.
budgetobject or nullvalue is a rounded integer and currency is an ISO code or null.
box_officeobject or nullSame as budget, plus worldwide set to true or false.
follows, followed_byobject or nullThe previous and next title in a series of films, as a link.
sitelinksobjectMaps a language code to the Wikipedia page title. Keys are the 14 served languages. {} when none.
awards, nominationsarrayLinks with an optional year.
based_onarraySource works with wikidata_id, label and an author object or null.
filming_locations, narrative_locations, original_broadcastersarrayLinks. 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:

JSON
{
  "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.

ServicePrice 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.
TMDBFree 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).
OMDbFree 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 APIAWS 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, "status_code": 7, "status_message": "Invalid API key: You must be granted a valid key."}.

HTTPstatus_codeWhen
40022external_source is missing, not lower case or not in the list.
4017The key is missing or wrong.
40236The plan period has ended.
40434The title id in a wikidata path does not exist.
42925Over 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 find and go straight to the details path, which saves one request per title.
  • Always test that the array you want has an item. find can 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_id works both ways: pass it to find to get a title, or read it from external_ids to link out.
  • To bring OMDb style IMDb lookups over, see the OMDb API documentation for the i parameter. 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.