Does IMDB provide an API?

asp.net Web-ApiImdb

asp.net Web-Api Problem Overview


I recently found a movie organizer application which fetches its data from the IMDB database.

Does IMDB provide an API for this, or any third party APIs available?

asp.net Web-Api Solutions


Solution 1 - asp.net Web-Api

The IMDb has a public API that, although undocumented, is fast and reliable (used on the official website through AJAX).

Search Suggestions API

// 1) Vanilla JavaScript (JSON-P)
function addScript(src) { var s = document.createElement('script'); s.src = src; document.head.appendChild(s); }
window.imdb$foo = function (results) {
  /* ... */
};
addScript('https://sg.media-imdb.com/suggests/f/foo.json');

// 2) Using jQuery (JSON-P)
jQuery.ajax({
    url: 'https://sg.media-imdb.com/suggests/f/foo.json',
    dataType: 'jsonp',
    cache: true,
    jsonp: false,
    jsonpCallback: 'imdb$foo'
}).then(function (results) {
    /* ... */
});

// 3) Pure JSON (with jQuery)
// Use a local proxy to the clean `/suggestion` API.
jQuery.getJSON('/api/imdb/?q=foo', function (results) {
    /* ... */
});

// 4) Pure JSON (plain JavaScript; Modern ES6, ES2017, and Fetch API)
// Serve a "/api" route in your app, that proxies (and caches!)
// to v2.sg.media-imdb.com/suggestion/h/hello.json
const resp = await fetch('/api/imdb/?q=foo');
const results = await resp.json();

Beware that these APIs are unofficial and could change at any time!


Update (January 2019): The Advanced API no longer exists. The good news is, that the Suggestions API now supports the "advanced" features of searching by film titles and actor names as well.

Solution 2 - asp.net Web-Api

new api @ http://www.omdbapi.com

edit: due to legal issues had to move the service to a new domain :)

Solution 3 - asp.net Web-Api

IMDB themselves seem to distribute data, but only in text files:

http://www.imdb.com/interfaces

there are several APIs around this that you can Google. Screen scraping is explicitly forbidden. A official API seems to be in the works, but has been that for years already.

Solution 4 - asp.net Web-Api

Another legal alternative to get movie info is the Rotten-Tomatoes API (by Fandango).

Solution 5 - asp.net Web-Api

What about TMDb API ?

You can search by imdb_id with GET /find/{external_id}

<https://developers.themoviedb.org/3/find/find-by-id>

Solution 6 - asp.net Web-Api

Yes, but not for free.

> .....annual fees ranging from $15,000 to higher depending on the audience for the data and which data are being licensed.

URL :- http://www.imdb.com/licensing/

Solution 7 - asp.net Web-Api

There is a JSON API for use by mobile applications at http://app.imdb.com

However, the warning is fairly severe: >For use only by clients authorized in writing by IMDb.
>Authors and users of unauthorized clients accept full legal exposure/liability for their actions.

I presume this is for those developers that pay for the licence to access the data via their API.

EDIT: Just for kicks, I wrote a client library to attempt to read the data from the API, you can find it here: api-imdb

Obviously, you should pay attention to the warning, and really, use something like TheMovieDB as a better and more open database.

Then you can use this Java API wrapper (that I wrote): api-themoviedb

Solution 8 - asp.net Web-Api

Found this one

> IMDbPY is a Python package useful to retrieve and manage the data of > the IMDb movie database about movies, people, characters and > companies.

http://imdbpy.sourceforge.net/

Solution 9 - asp.net Web-Api

https://deanclatworthy.com/tools.html is an IMDB API but has been down due to abuse.

Solution 10 - asp.net Web-Api

IMDB doesn't seem to have a direct API as of August 2016 yet but I saw many people writing scrapers and stuff above. Here is a more standard way to access movie data using box office buzz API. All responses in JSON format and 5000 queries per day on a free plan

List of things provided by the API

  1. Movie Credits
  2. Movie ID
  3. Movie Images
  4. Get movie by IMDB id
  5. Get latest movies list
  6. Get new releases
  7. Get movie release dates
  8. Get the list of translations available for a specific movie
  9. Get videos, trailers, and teasers for a movie
  10. Search for a movie by title
  11. Also supports TV shows, games and videos

Solution 11 - asp.net Web-Api

If you want movie details API then you can consider

OMDB API which is Open movies Database. It returns IMDB Ratings, IMDB Votes and it also has Rotten Tomato rating.

Or else You can use

My Api Films which allows you to search with IMDB ID, it returns detailed information but it has request limits.

Solution 12 - asp.net Web-Api

that deanclatworthy still seems to work and there's another one: http://imdbapi.poromenos.org/

Solution 13 - asp.net Web-Api

Here is a simple solution that fetches shows by name based on the query from Krinkle:

You can get around the same-origin policy by having your server fetch the URL instead of trying to fetch it directly with AJAX and you don't have to use JSONP to do it.

Javascript (jQuery):

function getShowOptionsFromName (name) {
	$.ajax({
		url: "ajax.php",
		method: "GET",
		data: {q: name},
		dataType: "json"
	}).done(function(data){
		console.log(data);
	});
}

PHP (in file ajax.php):

$q = urlencode($_GET["q"]);
echo file_get_contents("http://www.imdb.com/xml/find?json=1&nr=1&tt=on&q=$q");

Solution 14 - asp.net Web-Api

Recently at SXSWi 2012, in their "Mashery Lounge", there was a booth for an IMDB-like API called from rovi. It's not a free API, but according to the sales guy I talked to they offer either a rev share or a flat fee for usage, depending on your budget. I haven't used it yet but it seems pretty cool.

Solution 15 - asp.net Web-Api

NetFilx is more of personalized media service but you can use it for public information regarding movies. It supports Javascript and OData.
Also look JMDb: The information is basically the same as you can get when using the IMDb website.

Solution 16 - asp.net Web-Api

If you need TV information you can try TVmaze.com.

It's free, fast and reliable. Here is the developer page:

http://api.tvmaze.com/

Solution 17 - asp.net Web-Api

ok i found this one IMDB scraper

for C#: http://web3o.blogspot.de/2010/11/aspnetc-imdb-scraping-api.html

PHP here: http://web3o.blogspot.de/2010/10/php-imdb-scraper-for-new-imdb-template.html

alternatively a imdbapi.org implementation for c#:

using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Xml.Linq;
using HtmlAgilityPack; // http://htmlagilitypack.codeplex.com/


public class IMDBHelper
{

    public static imdbitem GetInfoByTitle(string Title)
    {
        string url = "http://imdbapi.org/?type=xml&limit=1&title=" + Title;
        HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);
        req.Method = "GET";
        req.UserAgent = "Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))";
        string source;
        using (StreamReader reader = new StreamReader(req.GetResponse().GetResponseStream()))
        {
            source = reader.ReadToEnd();
        }
        HtmlDocument doc = new HtmlDocument();
        doc.LoadHtml(source);        
        XDocument xdoc = XDocument.Parse(doc.DocumentNode.InnerHtml, LoadOptions.None);
        imdbitem i = new imdbitem();
        i.rating = xdoc.Descendants("rating").Select(x => x.Value).FirstOrDefault();
        i.rating_count = xdoc.Descendants("rating_count").Select(x => x.Value).FirstOrDefault();
        i.year = xdoc.Descendants("year").Select(x => x.Value).FirstOrDefault();
        i.rated = xdoc.Descendants("rated").Select(x => x.Value).FirstOrDefault();
        i.title = xdoc.Descendants("title").Select(x => x.Value).FirstOrDefault();
        i.imdb_url = xdoc.Descendants("imdb_url").Select(x => x.Value).FirstOrDefault();
        i.plot_simple = xdoc.Descendants("plot_simple").Select(x => x.Value).FirstOrDefault();
        i.type = xdoc.Descendants("type").Select(x => x.Value).FirstOrDefault();
        i.poster = xdoc.Descendants("poster").Select(x => x.Value).FirstOrDefault();
        i.imdb_id = xdoc.Descendants("imdb_id").Select(x => x.Value).FirstOrDefault();
        i.also_known_as = xdoc.Descendants("also_known_as").Select(x => x.Value).FirstOrDefault();
        i.language = xdoc.Descendants("language").Select(x => x.Value).FirstOrDefault();
        i.country = xdoc.Descendants("country").Select(x => x.Value).FirstOrDefault();
        i.release_date = xdoc.Descendants("release_date").Select(x => x.Value).FirstOrDefault();
        i.filming_locations = xdoc.Descendants("filming_locations").Select(x => x.Value).FirstOrDefault();
        i.runtime = xdoc.Descendants("runtime").Select(x => x.Value).FirstOrDefault();
        i.directors = xdoc.Descendants("directors").Descendants("item").Select(x => x.Value).ToList();
        i.writers = xdoc.Descendants("writers").Descendants("item").Select(x => x.Value).ToList();
        i.actors = xdoc.Descendants("actors").Descendants("item").Select(x => x.Value).ToList();
        i.genres = xdoc.Descendants("genres").Descendants("item").Select(x => x.Value).ToList();
        return i;
    }
    
    public class imdbitem
    {
        public string rating { get; set; }
        public string rating_count { get; set; }
        public string year { get; set; }
        public string rated { get; set; }
        public string title { get; set; }
        public string imdb_url { get; set; }
        public string plot_simple { get; set; }
        public string type { get; set; }
        public string poster { get; set; }
        public string imdb_id { get; set; }
        public string also_known_as { get; set; }
        public string language { get; set; }
        public string country { get; set; }
        public string release_date { get; set; }
        public string filming_locations { get; set; }
        public string runtime { get; set; }
        public List<string> directors { get; set; }
        public List<string> writers { get; set; }
        public List<string> actors { get; set; }
        public List<string> genres { get; set; }
    }
	
}

Solution 18 - asp.net Web-Api

Here is a Python module providing API's to get data from IMDB website

http://techdiary-viki.blogspot.com/2011/03/imdb-api.html

Solution 19 - asp.net Web-Api

Im pretty confident that the application you found actually gets their information form Themoviedb.org's API(they get most of there stuff from IMDB). They have a free open API that is used alot of the movie organizer/XMBC applications.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiontusayView Question on Stackoverflow
Solution 1 - asp.net Web-ApiTimo TijhofView Answer on Stackoverflow
Solution 2 - asp.net Web-ApibfritzView Answer on Stackoverflow
Solution 3 - asp.net Web-ApiPekkaView Answer on Stackoverflow
Solution 4 - asp.net Web-ApiJohannView Answer on Stackoverflow
Solution 5 - asp.net Web-ApihdorioView Answer on Stackoverflow
Solution 6 - asp.net Web-ApiByran ZauggView Answer on Stackoverflow
Solution 7 - asp.net Web-ApiOmertronView Answer on Stackoverflow
Solution 8 - asp.net Web-ApimarkivView Answer on Stackoverflow
Solution 9 - asp.net Web-ApiValentin GolevView Answer on Stackoverflow
Solution 10 - asp.net Web-ApiPirateAppView Answer on Stackoverflow
Solution 11 - asp.net Web-ApiAkshay KhaleView Answer on Stackoverflow
Solution 12 - asp.net Web-ApimyincomeView Answer on Stackoverflow
Solution 13 - asp.net Web-ApiBrett PenningsView Answer on Stackoverflow
Solution 14 - asp.net Web-ApibpapaView Answer on Stackoverflow
Solution 15 - asp.net Web-ApiThePCWizardView Answer on Stackoverflow
Solution 16 - asp.net Web-ApiSaeed MasoumiView Answer on Stackoverflow
Solution 17 - asp.net Web-ApifuboView Answer on Stackoverflow
Solution 18 - asp.net Web-ApivikasView Answer on Stackoverflow
Solution 19 - asp.net Web-ApiMikeView Answer on Stackoverflow