The Movie Database Support

After having a long read of the API documentation, I can't seem to find anything or something very similar to generate a random movie on each request to the url, ideally I would want each request to the url to return a new movie each time with the following data:

  • Poster image
  • Name of movie
  • Genre
  • Brief description

Please could you let me know if this is possible and point me in the right direction please?

3 replies (on page 1 of 1)

Jump to last post

I actually found a site that is using this sites API but I can't view how they have done it because it is hidden via normal PHP methods: https://www.randomlists.com/random-movies so at least I know its possible now to the name of the movie and the poster image somehow at random? Just if anyone could help me figure out how they done this or the owner of this site is reading this perhaps they can help along with the genre of film and brief description.

Hey @SomeT,

Unfortunately, there is no supported "random item" method on the API. Depending on your requirements, you can use the /movie/latest method to get the latest ID. Our ids are sequential, so randomizing anything from 1..[latest id] would work fine. Just be mindful that many movies have been deleted, so you will no doubt get some ids that doesn't exist.

However, if you are bringing some data in house, you can use our daily ID exports to know what IDs are valid and only randomize them thus saving you a lot of wasted requests hitting a bunch of deleted items.

Once you have the id you want to query, call the get details method which will return all of the data you're looking for.

Ok that all makes sense so far, I am a bit new to using API's so I just have another question, on my API settings page I have API Key (v3 auth) and API Read Access Token (v4 auth) only v3 works in the try it out sections in the documentation therefore my main question is why is this so, what are the differences between the v3 and v4 key?

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