IMDB是否提供API?

我最近find一个电影pipe理器应用程序,从IMDB数据库中获取数据。

IMDB为此提供了一个API,还是提供了任何第三方API?

IMDb目前有两个公开的API,虽然没有logging,但非常快速和可靠(通过AJAX在他们自己的站点上使用)。

  1. 静态caching的searchbuild议API:

    • http://sg.media-imdb.com/suggests/a/aa.json
    • http://sg.media-imdb.com/suggests/h/hello.json
    • 格式:JSONP
    • 下行:

      • 它采用JSONP格式,但是不能通过传递callback查询参数来设置callback参数。 为了跨域使用它,你必须使用他们select的函数名(这是“imdb $ {searchphrase}”格式,见下面的例子)。 或者使用从IMDb下载(并caching!)它的本地代理(例如一个小php文件),并去除JSON-Pcallback,或者用自定义的callback代替它。

      • 如果没有结果,则不会优雅地回退,而是显示一个XML错误

 // Basic window.imdb$foo = function (list) { /* ... */ }; jQuery.getScript('http://sg.media-imdb.com/suggests/f/foo.json'); // Using jQuery.ajax (let jQuery handle the callback) jQuery.ajax({ url: 'http://sg.media-imdb.com/suggests/f/foo.json', dataType: 'jsonp', cache: true, jsonp: false, jsonpCallback: 'imdb$foo' }).done(function (result) { /* ... */ }); // With local proxy to a PHP script replacing imdb$foo with a sanitized // version of $_GET['callback'] (https://stackoverflow.com/a/8811412/319266) jQuery.getJSON('./imdb.php?q=foo&callback=?', function (list) { /* ... */ }); 
  1. 更高级的search

    • 名称search(json): http : //www.imdb.com/xml/find? json=1&nr=1&nm=on&q=jeniffer+garner
    • 标题search(xml): http : //www.imdb.com/xml/find? xml=1&nr=1&tt=on&q= lost
    • 格式:JSON,XML等等
    • 下行:
      • 没有JSONP。 为了从跨域使用JavaScript,需要本地代理。
      • 没有文件,更多的格式可能是可用的
    • 上边
      • 现场search!
      • 也支持演员的名字!
      • 适当的回退到空物体

如上所述,这两种API都是无证的。 他们可以随时改变。

另请参阅https://stackoverflow.com/a/8811412/319266 ,了解PHP中的JSON API示例。

新的API @ http://www.omdbapi.com

编辑:由于法律问题不得不将服务移动到一个新的领域:)

IMDB自己似乎分发数据,但只在文本文件中:

http://www.imdb.com/interfaces

有几个API,你可以谷歌。 屏幕抓取是明确禁止的。 一个官方的API似乎正在工作,但已经有这么多年了。

获得电影信息的另一个合法替代方法是Rotten-Tomatoes API (由Fandango提供)。

那么TMDb API呢?

您可以使用Movie.imdbLookup通过imdb_id进行search

XBMC媒体中心似乎使用它

https://www.themoviedb.org/documentation/api

是的,但不是免费的。

…..年费从15,000美元到更高,这取决于数据的受众以及正在获得许可的数据。

url: – http://www.imdb.com/licensing/

http://app.imdb.com上有一个供移动应用程序使用的JSON API

但是,这个警告相当严重:

仅供IMDb以书面forms授权的客户使用。
未经授权的客户的作者和使用者对其行为承担全部法律风险/责任。

我认为这是为支付许可证的开发者通过他们的API访问数据。

编辑 :只是踢,我写了一个客户端库,试图从API中读取数据,你可以在这里find它: api-imdb

显然,你应该注意警告,并且确实使用像TheMovieDB这样的更好更开放的数据库。

然后你可以使用这个Java API封装(我写的): api-themoviedb

https://deanclatworthy.com/tools.html是一个IMDB API,但由于滥用已经closures。

find了这一个

IMDbPY是一个Python包,用于检索和pipe理关于电影,人物,angular色和公司的IMDb电影数据库的数据。

http://imdbpy.sourceforge.net/

截至2016年8月,IMDB似乎没有直接的API,但是我看到很多人在上面写刮刀和东西。 这是使用票房buzz API访问电影数据的更为标准的方法。 JSON格式的所有响应和每天5000免费计划查询

由API提供的东西的列表

  1. 电影积分
  2. 电影ID
  3. 电影图像
  4. 通过IMDB ID获取电影
  5. 获取最新的电影列表
  6. 获取新版本
  7. 获取电影发行date
  8. 获取特定电影的翻译列表
  9. 获取电影的video,预告片和戏弄
  10. 按标题search电影
  11. 还支持电视节目,游戏和video

那deanclatworthy似乎仍然工作,还有另一个: http ://imdbapi.poromenos.org/

下面是一个简单的解决scheme,根据Krinkle的查询获取名称显示:

您可以通过让服务器获取URL来避免同源策略,而不是直接使用AJAX获取它,而不必使用JSONP来实现。

Javascript(jQuery):

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

PHP(在文件ajax.php):

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

NetFilx更多的是个性化的媒体服务,但是您可以使用它来获取关于电影的公共信息。 它支持Javascript和OData。
也看JMDb :信息基本上是相同的,你可以得到使用IMDb网站。

最近在SXSWi 2012上,在他们的“Mashery Lounge”中,有一个从rovi中调用的类似于IMDB的API的展台。 这不是一个免费的API,但根据我跟他们谈的销售人员,他们提供的是转股或固定费用,取决于您的预算。 我还没有使用它,但它似乎很酷。

好的,我发现这一个IMDB刮刀

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

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

或者一个用于c#的imdbapi.org实现:

 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; } } } 

如果你需要电视信息,你可以尝试TVmaze.com 。

它是免费的,快速和可靠的。 这是开发者页面:

http://api.tvmaze.com/

这里是一个Python模块,提供从IMDB网站获取数据的API

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

我非常有信心,你发现的应用程序实际上从Themoviedb.org的API获得他们的信息(他们从IMDB获得大部分的东西)。 他们有一个免费的开放式API,使用了很多电影pipe理器/ XMBC应用程序。

如果你想要电影的详细信息,你可以考虑

OMDB API是开放电影数据库返回IBDB评级,IMDB票,你也可以包括烂番茄评分。

否则你可以使用

我的Api电影 ,它允许您searchIMDB ID和返回详细的信息,但它有要求的限制。