免费电影播放 API:播放公有领域电影的链接

GET /3/movie/{movie_id}/streams 为版权区块标为自由的电影返回播放链接:Commons 和 Internet Archive 副本,以及无需账户的其他网站链接,限原始语言,列出前都先试播。需要 Pro+ Streaming 套餐。

更新于 以 Markdown 查看

怎样获取播放自由电影的链接?

调用 GET /3/movie/{movie_id}/streams。对于 版权区块 标为自由的电影,回答会列出可以交给播放器的链接:url、type(hls、mp4、webm、ogg)、quality、链接所需的请求 headers,以及 source_id。不自由的电影返回空的 streams 列表。这个接口包含在 amodb 定价 的 Pro+ Streaming 套餐中,价格为 $19.99 一个月。

链接按以下顺序排列:

  1. Wikimedia Commons 副本,带有文件自身的许可(verified: true)。
  2. Internet Archive 副本(verified: false:那里的许可只是上传者的说法,电影的状态以版权区块为准)。
  3. 其他网站,无需账户、设备、令牌或 Cookie,只限电影原始语言,没有配音、旁白或烧录字幕。每条链接在列出前都会像播放器那样先启动一次(verified: "start_checked")。
bashjspy
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"])

响应字段

字段类型说明
idinteger电影 id。
licenseobject来自版权区块的 status、free、worldwide、countries、commercial_use、license、notes。
streamsarray链接,Commons 和 Internet Archive 在前。电影不自由时为空。
streams[].source_idstring16 个十六进制字符。在举报中用来指明来源;从不出现网站名称。
streams[].source_typestringwikimedia_commons、internet_archive 或 provider。
streams[].urlstring指向播放列表或文件的 HTTPS 链接。
streams[].page_urlstring 或 null文件在 Commons 或 Internet Archive 上的页面。
streams[].typestringhls、mp4、webm 或 ogg。
streams[].headersobject该链接每个请求都要发送的请求头。从不包含 Cookie。
streams[].qualitystring 或 null画面高度,如 1080p。
streams[].audio_languagestring 或 null其他网站链接对应的电影原始语言。
streams[].licensestring 或 nullCommons 文件自身的许可。
streams[].verifiedboolean 或 stringtrue(Commons)、false(Internet Archive)、"start_checked"(其他网站)。
totalinteger链接数量。
checked_atstring 或 null链接核验的时间。
staleboolean回答已超过 20 分钟;后台正在重新核验。
pendingboolean核验尚未进行。请一分钟后再请求。

响应示例

JSON
{
  "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 天内被请求过的电影会在链接过期前重新核验。回答从不在边缘缓存,所以请在观众按下播放时重新请求。

怎样移除一个来源?

任何拥有某个副本权利的人,或代表权利人行事的人,都可以用 播放链接举报 举报来源。该来源会立即从回答中移除,不事先审核。

错误

HTTPstatus_code何时出现
4017缺少密钥或密钥错误。
4033你的套餐不是 Pro+ Streaming。
42925超出每分钟请求数。

不自由或状态未知的电影不算错误:它返回 streams: []。

实用提示

  • 在浏览器中,请优先选择 headers 为空对象的 mp4 或 webm 链接。对于 hls,请使用 hls.js 等播放器并发送列出的请求头。
  • 只在许可列出的国家放映电影;许可要求署名时,请把署名和许可链接放在播放器旁边。
  • WordPress 插件 有一个使用这个接口的播放器区块。