The Movie Database Support

Hi! I'm writing a method that fetches the poster for a movie based on the movie's ID (such as 505.

My only question is, how do I get this ID?

In this scenario, the user would enter a title or pick a title from a list (such as The Hobbit: The Desolation of Smaug (2013))

What I need is an API or way of getting an ID from that title that I can use to get the poster.

I already have the method and API call for getting the poster written. All I need is a way to translate that title into an ID.

Thanks in advance!

1 reply (on page 1 of 1)

Jump to last post

Hi sammydogbro,

You would want to look at the search method. Knowing the title of say, "The Hobbit: The Desolation of Smaug" you can search like so:

http://api.themoviedb.org/3/search/movie?api_key=###&query=The+Hobbit:+The+Desolation+of+Smaug

You can be more precise if you know the year:

http://api.themoviedb.org/3/search/movie?api_key=###&query=The+Hobbit:+The+Desolation+of+Smaug&year=2013

You can then grab the results from the results array and parse out the ID.

Cheers.

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