公有领域电影列表 API:筛选与搜索免费电影

GET /3/free/movie 列出可完整放映的电影,支持 discover 筛选及国家、许可、商业使用和完整副本。GET /3/free/search/movie 按名称查找,GET /3/free/stats 统计总数。需 Pro+ 套餐。

更新于 以 Markdown 查看

怎样列出可以完整放映的电影?

调用 GET /3/free/movie(或 GET /3/free/tv)。它返回 版权区块 标为自由的电影,格式与 TMDB 列表相同:page、results、total_pages、total_results,每页 20 张卡片。每张卡片另加一个简短的 license 对象,含 status、confidence、worldwide、countries、commercial_use、license 和 has_copy。

列表接受 TMDB discover 的筛选和它自己的筛选,所以一页美国公有领域的喜剧片只需一次调用。它包含在 amodb 定价 的 Pro+ 和 Pro+ Streaming 套餐中。

bashjspy
curl -sf "https://api.amodb.dev/3/free/movie?country=US&with_genres=35&sort_by=vote_average.desc" \
  -H "Authorization: Bearer $AMODB_KEY"
const url = new URL('https://api.amodb.dev/3/free/movie');
url.search = new URLSearchParams({ country: 'US', with_genres: '35', commercial_use: 'true' });
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.AMODB_KEY}` } });
if (!res.ok) throw new Error(`amodb returned ${res.status}`);
const { results, total_results } = await res.json();
console.log(total_results, 'free comedies');
for (const film of results) console.log(film.title, film.release_date, film.license.status);
import os
import requests

r = requests.get(
    "https://api.amodb.dev/3/free/movie",
    params={"license_type": "open_license", "sort_by": "primary_release_date.desc"},
    headers={"Authorization": f"Bearer {os.environ['AMODB_KEY']}"},
    timeout=10,
)
r.raise_for_status()
for film in r.json()["results"]:
    print(film["title"], film["license"]["license"]["spdx_id"])

参数

参数说明
license_typepublic_domain 或 open_license。默认两者都有。
country两位字母代码(别名 region):在该国或全球自由的电影。
worldwidetrue:只要在所有国家都自由的。
commercial_usetrue:可以在商业网站上放映。
modificationstrue:可以编辑(不是 ND 许可)。
without_attributiontrue:无需署名。
with_copytrue:列有完整副本(Wikimedia Commons 或 Internet Archive)。
confidencehigh,或 medium 表示 medium 及以上。
with_genres、without_genresTMDB 类型 id。逗号表示全部满足,竖线表示任一满足。
primary_release_year年份,电视剧用 first_air_date_year。year 两者通用。
primary_release_date.gte、.lte日期格式如 1925-01-01。电视剧:first_air_date.gte、.lte。
with_original_language两位字母代码,如 de。
vote_count.gte、vote_average.gte、vote_average.lte评分筛选。
with_runtime.gte、with_runtime.lte分钟数。
sort_bypopularity、vote_average、vote_count、primary_release_date(电视剧为 first_air_date),各自加 .asc 或 .desc。默认 popularity.desc。
language、page与其他接口相同:14 种语言,第 1 到 500 页。

筛选格式错误时返回 HTTP 400 和 status_code 22。

响应示例

JSON
{
  "page": 1,
  "results": [
    {
      "adult": false,
      "backdrop_path": "/mzox4HbcV9W42MH2dB1QsdDVGo3.jpg",
      "genre_ids": [35, 10749, 10752],
      "id": 961,
      "original_language": "en",
      "overview": "During the American Civil War, Union spies steal the locomotive of engineer Johnnie Gray, and he sets out to get it back.",
      "popularity": 3.308,
      "poster_path": "/o2vYEjxjqfT8ta5xcrtPJ3uFLlk.jpg",
      "vote_average": 7.9,
      "vote_count": 1496,
      "media_type": "movie",
      "title": "The General",
      "original_title": "The General",
      "release_date": "1926-12-25",
      "video": false,
      "license": {
        "status": "public_domain",
        "confidence": "high",
        "worldwide": false,
        "countries": ["US"],
        "commercial_use": true,
        "license": null,
        "has_copy": true
      }
    }
  ],
  "total_pages": 1,
  "total_results": 1
}

怎样按名称搜索自由电影?

GET /3/free/search/movie?query=nosferatu 在原始标题、英文标题和请求 language 的标题中查找,并接受上面所有筛选。不带 query 时返回空页,与 TMDB 搜索相同。

自由电影有多少部?

GET /3/free/stats 返回 { movie: { public_domain, open_license, worldwide, total }, tv: { ... } }。它在边缘缓存一小时。

错误

HTTPstatus_code何时出现
40022筛选格式错误,例如 country=USA 或未知的 sort_by。
4017缺少密钥或密钥错误。
4033你的套餐不是 Pro+ 或 Pro+ Streaming。
42925超出每分钟请求数。

实用提示

  • 列表在边缘缓存 30 分钟,搜索缓存 10 分钟。一次调用可以服务一个页面的所有访客。
  • 放映一部电影之前,请打开它的 版权区块,查看完整证据和提示。
  • 要播放自由电影,播放链接接口 在 Pro+ Streaming 套餐中列出经过核验的链接。
  • 同样的列表在 WordPress 插件 中以区块形式提供。