IMDB API Manual
中文版
Overview
IMDB API 是一个轻量级的 Web 服务,提供一种 IMDB 数据的有效访问方式。虽然 IMDB 的数据可以在上免费下载,但是却没有提供一个很好的 API 来检索这些信息。此 Web 服务旨在一定范围内解决这一问题。
本接口具备以下特点:
1) 支持中文译名检索
2) 支持返回中文数据
3) 支持 Javascript 调用接口(可以使用AJAX直接获取结果,非JSONP方式)
4) 返回数据字段丰富
5) 支持返回多条结果
6) 请求限制宽松
API Usage
发送所有请求到 /
Search: By Title
参数列表
参数名 | 必需 | 可选项 | 默认值 | 说明 |
q | YES | <empty> | 你想要检索的影片名(e.g. 消失的子弹,疯狂的赛车。中文请注意编码) | |
type | NO | json,jsonp, xml | json | 你想要 API 返回的数据类型。 |
year | NO | 当前年份 | 你想要检索的年份。如果你省略该参数,在检索时会自动使用当前年份。 | |
yg | NO | 1,0 | 1 | 当该参数为0时,在检索时会忽略年份参数。 |
plot | NO | none,simple, full | simple | 你希望 API 返回的剧情介绍类型。 |
episode | NO | 1,0 | 1 | 当该参数为0时,“episodes”字段将不被包含在结果中。 |
limit | NO | 1 – 5 | 1 | 你希望 API 返回的记录数。 |
lang | NO | en-US,zh-CN | en-US | 你希望 API 返回数据的语言。 |
示例:
检索“消失的子弹”
Request:
/?q=%E6%B6%88%E5%A4%B1%E7%9A%84%E5%AD%90%E5%BC%B9&type=json&plot=simple&episode=1&limit=1&yg=0&lang=en-US
Response:
{"rating": 6.5, "genres": ["Action", "Drama", "Mystery"], "filming_locations": "Shanghai, China", "language": ["Mandarin", "Cantonese"], "title": "Xiao shi de zi dan", "runtime": "108 min", "poster": "ia.media-imdb/images/M/MV5BMTQyNTEyMzY1OF5BMl5BanBnXkFtZTcwNzE1MTEzOA@@._V1._SY317_CR6,0,214,317_.jpg", "imdb_url": "www.imdb/title/tt2106741/", "wri
ters": ["Sin Ling Yeung", "Lo Sin-Ling"], "imdb_id": "tt2106741", "directors": ["Chi-Leung Law"], "rating_count": 85, "actors": ["Nicholas Tse", "Ching Wan Lau", "Mini Yang", "Kai Chi Liu", "Gang Wu", "Boran Jing", "Hu Gao", "Yiyan Jiang", "Hei-Yi Cheng", "Kar Lok Chin", "Kwok Cheung Tsang", "Zhiyi Wang"], "also_known_as": ["Ghost Bulle"], "year": 2012, "country": ["China", "Hong Kong"], "type": "M", "release_date": 20120814}
Search: By ID
参数列表
参数名 | 必需 | 可选项 | 默认值 | 说明 |
id | YES | /^tt\d+$/ | 影片的 IMDB ID。(e.g. tt0120689) | |
type | NO | json,jsonp, xml | json | 你想要 API 返回的数据类型。 |
plot | NO | none,simple, full | simple | 你希望 API 返回的剧情介绍类型。 |
episode | NO | 1,0 | 1 | 当该参数为0时,“episodes”字段将不被包含在结果中。 |
lang | NO | en-US,zh-CN | en-US | 你希望 API 返回数据的语言。 |
示例:
检索“tt0120689”
Request:
/?id=tt0120689&type=json&plot=simple&episode=1&lang=en-US
Response:
{"rating": 8.5, "genres": ["Crime", "Drama", "Fantasy", "Mystery"], "filming_locations": "Blowing Rock, North Carolina, USA", "language": ["English", "French"], "title": "The Green Mile", "runtime": "189 min", "poster": "ia.media-imdb/images/M/MV5BMTUxMzQyNjA5MF5BMl5BanBnXkFtZTYwOTU2NTY3._V1._SY317_CR0,0,214,317_.jpg", "imdb_url": "www.imdb/title/tt0120689/", "writers": ["Stephen King", "Frank Darabont"], "imdb_id": "tt0120689", "directors": ["Frank Darabont"], "rating_count": 347924, "actors": ["Tom Hanks", "Michael Clarke Duncan", "David Morse", "
Bonnie Hunt", "James Cromwell", "Michael Jeter", "Graham Greene", "Doug Hutchison", "Sam Rockwell", "Barry Pepper", "Jeffrey DeMunn", "Patricia Clarkson", "Harry Dean Stanton", "Dabbs Greer", "Eve Brent"], "plot_simple": "The lives of guards on Death Row are affected by one of their charges: a black man accused of child murder and rape, yet who has a mysterious gift.", "year": 1999, "country": ["USA"], "type": "M", "release_date": 19991210, "also_known_as": ["Stephen King's The Green Mi"]}
More…
更多内容请访问 API :/
发布评论