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?
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?
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.
What about TMDb API ?
You can search by imdb_id with GET /find/{external_id}
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.
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");
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.