免费电影播放 API:播放公有领域电影的链接
GET /3/movie/{movie_id}/streams 为版权区块标为自由的电影返回播放链接:Commons 和 Internet Archive 副本,以及无需账户的其他网站链接,限原始语言,列出前都先试播。需要 Pro+ Streaming 套餐。
怎样获取播放自由电影的链接?
调用 GET /。对于 版权区块 标为自由的电影,回答会列出可以交给播放器的链接:url、type(hls、mp4、webm、ogg)、quality、链接所需的请求 headers,以及 source_id。不自由的电影返回空的 streams 列表。这个接口包含在 amodb 定价 的 Pro+ Streaming 套餐中,价格为 $19.99 一个月。
链接按以下顺序排列:
- Wikimedia Commons 副本,带有文件自身的许可(
verified: true)。 - Internet Archive 副本(
verified: false:那里的许可只是上传者的说法,电影的状态以版权区块为准)。 - 其他网站,无需账户、设备、令牌或 Cookie,只限电影原始语言,没有配音、旁白或烧录字幕。每条链接在列出前都会像播放器那样先启动一次(
verified: "start_)。checked"
curl -sf "https://api.amodb.dev/3/movie/961/streams" \
-H "Authorization: Bearer $AMODB_KEY"const res = await fetch('https://api.amodb.dev/3/movie/961/streams', {
headers: { Authorization: `Bearer ${process.env.AMODB_KEY}` },
});
if (!res.ok) throw new Error(`amodb returned ${res.status}`);
const { streams, pending } = await res.json();
if (pending) console.log('links are being checked, ask again in a minute');
// A browser <video> cannot send headers: pick a plain file without them.
const file = streams.find((s) => ['mp4', 'webm'].includes(s.type) && Object.keys(s.headers).length === 0);
if (file) document.querySelector('video').src = file.url;import os
import requests
r = requests.get(
"https://api.amodb.dev/3/movie/961/streams",
headers={"Authorization": f"Bearer {os.environ['AMODB_KEY']}"},
timeout=40,
)
r.raise_for_status()
for s in r.json()["streams"]:
print(s["source_type"], s["type"], s["quality"], s["url"])响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | integer | 电影 id。 |
license | object | 来自版权区块的 status、free、worldwide、countries、commercial_use、license、notes。 |
streams | array | 链接,Commons 和 Internet Archive 在前。电影不自由时为空。 |
streams[].source_id | string | 16 个十六进制字符。在举报中用来指明来源;从不出现网站名称。 |
streams[].source_type | string | wikimedia_commons、internet_archive 或 provider。 |
streams[].url | string | 指向播放列表或文件的 HTTPS 链接。 |
streams[].page_url | string 或 null | 文件在 Commons 或 Internet Archive 上的页面。 |
streams[].type | string | hls、mp4、webm 或 ogg。 |
streams[].headers | object | 该链接每个请求都要发送的请求头。从不包含 Cookie。 |
streams[].quality | string 或 null | 画面高度,如 1080p。 |
streams[].audio_ | string 或 null | 其他网站链接对应的电影原始语言。 |
streams[].license | string 或 null | Commons 文件自身的许可。 |
streams[].verified | boolean 或 string | true(Commons)、false(Internet Archive)、"start_checked"(其他网站)。 |
total | integer | 链接数量。 |
checked_at | string 或 null | 链接核验的时间。 |
stale | boolean | 回答已超过 20 分钟;后台正在重新核验。 |
pending | boolean | 核验尚未进行。请一分钟后再请求。 |
响应示例
{
"id": 961,
"license": {
"status": "public_domain",
"free": true,
"worldwide": false,
"countries": ["US"],
"commercial_use": true,
"license": null,
"notes": ["later_additions_not_covered", "not_legal_advice"]
},
"streams": [
{
"source_id": "8df6d4bc3e69dfe5",
"source_type": "wikimedia_commons",
"url": "https://upload.wikimedia.org/wikipedia/commons/a/ab/The_General_1926_720p.webm",
"page_url": "https://commons.wikimedia.org/wiki/File:The_General_1926_720p.webm",
"type": "webm",
"headers": {},
"quality": "720p",
"audio_language": null,
"license": "Public domain",
"verified": true
},
{
"source_id": "a18c3ce2b5d41c2f",
"source_type": "internet_archive",
"url": "https://archive.org/download/TheGeneral_201312/The-General-v2.mp4",
"page_url": "https://archive.org/details/TheGeneral_201312",
"type": "mp4",
"headers": {},
"quality": "480p",
"audio_language": null,
"license": null,
"verified": false
},
{
"source_id": "46e480b976b249ea",
"source_type": "provider",
"url": "https://video.example.net/hls/9f3c/master.m3u8",
"page_url": null,
"type": "hls",
"headers": { "Referer": "https://player.example.net/" },
"quality": "1080p",
"audio_language": "en",
"license": null,
"verified": "start_checked"
}
],
"total": 3,
"checked_at": "2026-11-17T13:57:06.000Z",
"stale": false,
"pending": false
}上面的 provider 链接只是演示格式;真实链接会指向托管该副本的网站。
链接有多新?
链接在列出时核验,最多保留 20 分钟。不超过 3 小时的回答会立即返回并带 stale: true,同时后台重新核验。最近 7 天内被请求过的电影会在链接过期前重新核验。回答从不在边缘缓存,所以请在观众按下播放时重新请求。
怎样移除一个来源?
任何拥有某个副本权利的人,或代表权利人行事的人,都可以用 播放链接举报 举报来源。该来源会立即从回答中移除,不事先审核。
错误
| HTTP | status_code | 何时出现 |
|---|---|---|
| 401 | 7 | 缺少密钥或密钥错误。 |
| 403 | 3 | 你的套餐不是 Pro+ Streaming。 |
| 429 | 25 | 超出每分钟请求数。 |
不自由或状态未知的电影不算错误:它返回 streams: []。
实用提示
- 在浏览器中,请优先选择
headers为空对象的mp4或webm链接。对于hls,请使用 hls.js 等播放器并发送列出的请求头。 - 只在许可列出的国家放映电影;许可要求署名时,请把署名和许可链接放在播放器旁边。
- WordPress 插件 有一个使用这个接口的播放器区块。