tus*_*say 631 imdb asp.net-web-api
我最近发现了一个电影管理器应用程序,它从IMDB数据库中获取数据.
IMDB是否为此提供API,或者是否提供任何第三方API?
Tim*_*hof 437
IMDb有一个公共API,虽然没有记录,但是快速可靠(通过AJAX在官方网站上使用).
imdb${searchphrase}格式为).或者,可以通过本地代理剥离或替换填充.// 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 that strips the "padding" of JSON-P,
// e.g. "imdb$foo(" and ")", leaving pure JSON only.
jQuery.getJSON('/api/imdb/?q=foo', function (results) {
/* ... */
});
// 4) Pure JSON (ES2017 and Fetch API)
// Using a custom proxy at "/api" that strips the JSON-P padding.
const resp = await fetch('/api/imdb/?q=foo');
const results = await resp.json();
Run Code Online (Sandbox Code Playgroud)
请注意,这些API是非官方的,可能随时更改!
更新(2019年1月):高级API不再存在.好消息是,Suggestions API现在支持电影片名和演员姓名.
bfr*_*itz 210
新的api @ http://www.omdbapi.com
编辑:由于法律问题不得不将服务移动到新域:)
Pek*_*ica 90
IMDB本身似乎分发数据,但仅限于文本文件:
http://www.imdb.com/interfaces
有几个API,你可以谷歌.屏幕抓取是明确禁止的.官方API似乎正在开发中,但已经存在多年了.
Joh*_*ann 49
获取电影信息的另一个合法选择是Rotten-Tomatoes API(由Fandango提供).
hdo*_*rio 47
TMDb API怎么样?
您可以使用Movie.imdbLookup通过imdb_id进行搜索
XBMC Media Center似乎使用它
https://www.themoviedb.org/documentation/api
Byr*_*ugg 29
是的,但不是免费的.
......年费从15,000美元到更高,具体取决于数据的受众和获得许可的数据.
网址: - http://www.imdb.com/licensing/
Ome*_*ron 22
在http://app.imdb.com上有一个供移动应用程序使用的JSON API
但是,警告相当严重:
仅供IMDb书面授权的客户使用.
未经授权的客户的作者和用户对其行为承担全部法律责任.
我认为这是为那些支付许可证的开发人员通过他们的API访问数据.
编辑:只是为了踢,我写了一个客户端库来尝试从API读取数据,你可以在这里找到它:api-imdb
显然,您应该注意警告,并且确实使用像TheMovieDB这样的东西作为更好,更开放的数据库.
然后你可以使用这个Java API包装器(我写的):api-themoviedb
https://deanclatworthy.com/tools.html是一个IMDB API,但由于滥用而停止运行.
| 归档时间: |
|
| 查看次数: |
432717 次 |
| 最近记录: |