1

I want to get ratings of films from IMDB. When I search source from internet I found that imdb's web service is not free and a lot of developer use www.omdbapi.com. Moreover, I cannot find right api or ws of imdb. However, I am not sure about to use it because of true information of rates and imdb policies. Could anyone give any suggestion? Thanks

Begum
  • 645
  • 1
  • 6
  • 11

2 Answers2

3

The information from www.omdbapi.com are fetched from the orginal IMDB database. You should almost get the same accuracy.

You can see the rating is the same on both side, and the imdbVotes are similar (but the IMDB version is newer than the OMDBApi).

Manitoba
  • 8,522
  • 11
  • 60
  • 122
Tibox
  • 827
  • 6
  • 7
  • Hello Tibox, first of all thanks. But I am not sure if there is a one more film the same name. – Begum Sep 18 '15 at 06:35
  • Use the `s` parameter to retrieve a list of movies matching the given name. Ie. http://www.omdbapi.com/?s=The+godfather&y=&plot=short&r=json should return the Godfather trilogy. – Manitoba Sep 18 '15 at 09:58
0

@Begum imdb can be queries for a unique film as follows -

use the i parameter with the unique movie ID from imdb, eg tt1347007 gets you the Norweigan 2009 movie Hidden returning the info in json -

http://www.omdbapi.com/?i=tt1347007&plot=short&r=json

the return info looks like this, and can get processed with getJSON for example if you are using javascript:

 {"Title":"Hidden","Year":"2009","Rated":"R","Released":"03 Apr 2009",
 "Runtime":"95 min","Genre":"Horror, Thriller","Director":"Pål Øie",
 "Writer":"Pål Øie","Actors":"Kristoffer Joner, Cecilie A. Mosli, Bjarte Hjelmeland,
  Marko Iversen Kanic","Plot":"Painful memories arise when Kai Koss goes 
  back to his childhood home after 19 years and inherits his dead mother's house.",
  "Language":"Norwegian, Swedish","Country":"Norway","Awards":"1 win & 2 nominations.",
   "Poster":"http://ia.media-imdb.com/images/M/MV5BNTM3OTEyMjA1NV5BMl5BanBnXkFtZTcwMzQxNjQyMw@@._V1_SX300.jpg",
 "Metascore":"N/A","imdbRating":"5.7","imdbVotes":"2,295","imdbID":"tt1347007",
  "Type":"movie","Response":"True"}

Compare this with another film called Hidden from 2005, URL http://www.imdb.com/title/tt0478411/ so i is tt0478411 and call to omdbapi would be -

http://www.omdbapi.com/?i=tt0478411&plot=short&r=json

returning the data you can see this is a New Zealand film:

  {"Title":"Hidden","Year":"2005","Rated":"N/A","Released":"N/A",
 "Runtime":"93 min","Genre":"Thriller","Director":"Tim McLachlan",
 "Writer":"Tim McLachlan","Actors":"Luke Alexander, Dana Bernard, 
 Daniel Betty, Ellie Cragg","Plot":"Deep within a dark, twisted forest, at a 
 faraway adventure camp, a group of young 'camp leaders' play a fast and 
 furious game of 'hide and seek'. The atmosphere is strange and thick with ...",
 "Language":"English","Country":"New Zealand",
 "Awards":"N/A","Poster":"http://ia.media-imdb.com/images/M/MV5BMTQ4NTgyNTUwOV5BMl5BanBnXkFtZTcwNzY0OTM4NA@@._V1_SX300.jpg",
  "Metascore":"N/A","imdbRating":"5.0","imdbVotes":"99","imdbID":"tt0478411",
 "Type":"movie","Response":"True"}

if you search by name omdbapi will return a JSON object containing ALL matches, which you then parse yourself and sort through or display to the user, it depends what you want to do.

Another useful feature of OMDBAPI is the ability to return selected information from rottentomatoes for the same movie, at the same time, within the same call, as follows:

http://www.omdbapi.com/?i=tt0478411&plot=short&r=json&tomatoes=true

The full documentation can be found on http://www.omdbapi.com/ and many examples of code using the API going back a number of years can be found on places like github and codepen, it's a very good API.

Mousey
  • 1,855
  • 19
  • 34