我最近发现了一个从IMDB数据库获取数据的电影管理应用程序。

IMDB是否为此提供API,或任何可用的第三方API ?


当前回答

是的,但不是免费的。

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

网址: http://www.imdb.com/licensing/

其他回答

是的,但不是免费的。

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

网址: http://www.imdb.com/licensing/

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

然而,警告是相当严重的:

仅供IMDb书面授权的客户使用。 未经授权客户端的作者和用户为他们的行为承担全部法律责任。

我认为这是为那些通过API访问数据而付费的开发者准备的。

编辑:只是为了好玩,我写了一个客户端库,试图从API读取数据,你可以在这里找到它:API -imdb

显然,您应该注意这个警告,并使用像TheMovieDB这样的数据库作为更好、更开放的数据库。

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

最近在SXSWi 2012上,在他们的“Mashery Lounge”中,有一个来自rovi的类似imdb的API的展位。这不是一个免费的API,但据我采访的销售人员说,他们根据你的预算提供收益分成或固定费用。我还没用过,不过看起来挺酷的。

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

IMDb有一个公共API,虽然没有文档记载,但是快速可靠(在官方网站上通过AJAX使用)。

搜索建议API

https://sg.media-imdb.com/suggests/h/hello.json https://v2.sg.media-imdb.com/suggests/h/hello.json (as of 2019) Format: JSON-P Caveat: It's in JSON-P format, and the callback parameter can not customised. To use it cross-domain you'll have to use their function name for the callback (which is in the imdb${searchphrase} format). Alternatively, one could strip or replace the padding via a local proxy. https://v2.sg.media-imdb.com/suggestion/h/hello.json (as of 2020) Format: JSON Caveat: It's not CORS-enabled. This is fine for use in apps and server-side scripts. For use in a web app, you'll need to route it through a simple proxy (and consider enabling caching, too!)

// 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();

高级搜索

名称搜索(json): http://www.imdb.com/xml/find?json=1&nr=1&nm=on&q=jeniffer+garner 标题搜索(xml): http://www.imdb.com/xml/find?xml=1&nr=1&tt=on&q=lost 格式:XML 优点:同时支持电影名称和演员名称(与建议API不同)。


请注意,这些api是非官方的,随时都可能更改!


更新(2019年1月):高级API不再存在。好消息是,建议API现在支持“高级”功能,即通过电影名称和演员名称进行搜索。