The Movie Database Support

I have the imdb Ids (tconst, as they call it); what I need to know is how to get the tmdb movie Id value from that imdb movie Id value (with a REST call).

6 replies (on page 1 of 1)

Jump to last post

Hi @bclayshannon,

Yes, you can use the /find method.

https://api.themoviedb.org/3/find/tt0458290?api_key=###&external_source=imdb_id

As an example.

Hi, for movies it works ... but not for shows

TV works just fine:

Request

curl -v "https://api.themoviedb.org/3/find/tt3581920?api_key=###&external_source=imdb_id"

*   Trying 2600:9000:20be:1800:c:174a:c400:93a1:443...
* Connected to api.themoviedb.org (2600:9000:20be:1800:c:174a:c400:93a1) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.themoviedb.org
*  start date: Sep 20 00:00:00 2022 GMT
*  expire date: Oct 18 23:59:59 2023 GMT
*  subjectAltName: host "api.themoviedb.org" matched cert's "*.themoviedb.org"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* h2h3 [:method: GET]
* h2h3 [:path: /3/find/tt3581920?api_key=###&external_source=imdb_id]
* h2h3 [:scheme: https]
* h2h3 [:authority: api.themoviedb.org]
* h2h3 [user-agent: curl/7.85.0]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x7fc10e011a00)
> GET /3/find/tt3581920?api_key=###&external_source=imdb_id HTTP/2
> Host: api.themoviedb.org
> user-agent: curl/7.85.0
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200
< content-type: application/json;charset=utf-8
< content-length: 808
< date: Sun, 19 Feb 2023 20:08:16 GMT
< server: openresty
< cache-control: public, max-age=28800
< x-memc: HIT
< x-memc-key: 13bcbc85ce0120202947ea87d5749ffb737d32f9
< x-memc-age: 12585
< x-memc-expires: 9015
< etag: W/"bf5bf1295d2c0dea853d14c05641f6cb"
< vary: Accept-Encoding,Accept-Encoding,Accept-Encoding
< x-cache: Miss from cloudfront
< via: 1.1 a06140ffee86972bad90c57fc682df36.cloudfront.net (CloudFront)
< x-amz-cf-pop: SEA19-C3
< alt-svc: h3=":443"; ma=86400
< x-amz-cf-id: xlS3qgMUukDKwhyE9VIZv6CszYDPBmIrb06vtReSYzz6bjsLR5p6Pg==
< vary: Origin
<
* Connection #0 to host api.themoviedb.org left intact

Response

{
  "movie_results": [],
  "person_results": [],
  "tv_results": [
    {
      "adult": false,
      "backdrop_path": "/uDgy6hyPd82kOHh6I95FLtLnj6p.jpg",
      "id": 100088,
      "name": "The Last of Us",
      "original_language": "en",
      "original_name": "The Last of Us",
      "overview": "Twenty years after modern civilization has been destroyed, Joel, a hardened survivor, is hired to smuggle Ellie, a 14-year-old girl, out of an oppressive quarantine zone. What starts as a small job soon becomes a brutal, heartbreaking journey, as they both must traverse the United States and depend on each other for survival.",
      "poster_path": "/uKvVjHNqB5VmOrdxqAt2F7J78ED.jpg",
      "media_type": "tv",
      "genre_ids": [
        18,
        10759
      ],
      "popularity": 5706.38,
      "first_air_date": "2023-01-15",
      "vote_average": 8.807,
      "vote_count": 1803,
      "origin_country": [
        "US"
      ]
    }
  ],
  "tv_episode_results": [],
  "tv_season_results": []
}

This works if pasted into the browser url window, but not with curl.

It works for me with curl, using the command Travis provided above. Be sure to wrap the URL with quotation marks. If it doesn't work, provide an example curl command that doesn't work, removing your API key.

Hi,

Thanks for responding. I found my mistake after going through half a dozen permutations of the command line. I counted as URL from http to the question mark and quoted that and nonthing else. The entire line has to be quoted because the entire line, api key and external source option are part of the URL. Quoting the entire thing succeeded.

Thanks again, JIm J.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login