分类新闻
使用语言和国家/地区偏好检索所选热门、电影、电视或名人类别的IMDb新闻。用于监控娱乐新闻或研究特定类别。
参数
| 参数 | 必填 | 类型 | 说明 | 示例 | 可选值 |
|---|---|---|---|---|---|
category |
必填 | string | 用于筛选的新闻类别。 可用值: - `TOP`: 头条新闻 - `MOVIE`: 电影新闻 - `TV`: 电视新闻 - `CELEBRITY`: 名人新闻 | TOP |
TOPMOVIETVCELEBRITY |
language_country |
可选 | string | 语言与国家/地区偏好。 可用值: - `en_US`: 英语(美国) - `fr_CA`: 法语(加拿大) - `fr_FR`: 法语(法国) - `de_DE`: 德语(德国) - `hi_IN`: 印地语(印度) - `it_IT`: 意大利语(意大利) - `pt_BR`: 葡萄牙语(巴西) - `es_ES`: 西班牙语(西班牙) - `es_US`: 西班牙语(美国) - `es_MX`: 西班牙语(墨西哥) | en_US |
en_USfr_CAfr_FRde_DEhi_INit_ITpt_BRes_ESes_USes_MX |
代码示例
curl -G "https://api.mofa-ai.com/v1/imdb/news_by_category_query_v1" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'category=TOP' \
--data-urlencode 'language_country=en_US'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/imdb/news_by_category_query_v1",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"category": "TOP",
"language_country": "en_US",
},
timeout=60,
)
body = resp.json()
if body["success"]:
print(body["cost_usd"], body["data"])
else:
print(body["error"], body["message"])
const url = new URL("https://api.mofa-ai.com/v1/imdb/news_by_category_query_v1");
url.search = new URLSearchParams({
category: "TOP",
language_country: "en_US",
});
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOFA_API_KEY}` },
});
const body = await resp.json();
if (body.success) console.log(body.cost_usd, body.data);
else console.error(body.error, body.message);
在线试用
登录后可以在这里直接调用此接口,按价格从余额扣费,失败不收费。新账户赠送 $0.50 试用额度。
响应示例
采集于 2026-11-08,耗时 5272 ms · 请求参数 {"category": "TOP", "language_country": "en_US"}
JSON
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "imdb.news_by_category_query_v1",
"cost_usd": 0.01,
"data": {
"code": 0,
"data": {
"news": {
"edges": [
{
"node": {
"id": "ni66097771",
"date": "2026-11-06T00:45:00Z",
"text": {
"plainText": "Rosamund Pike will star in and produce “Feed,” a new body horror movie from “The Acolyte” director Leslye Headland and screenwriter Daniella Isaacs.\n\nInspired by the 2022 Finnish horror movie “Hatchin…"
},
"image": {
"id": "rm1218180354",
"url": "https://m.media-amazon.com/images/M/MV5BZGRmMGVmODktYmVjYy00ZTJlLWFlNWYtODMxYjU2MGEzNmRiXkEyXkFqcGc@._V1_.jpg",
"width": 1200,
"height": 800,
"__typename": "Image"
},
"byline": "Jack Dunn",
"source": {
"homepage": {
"url": "http://variety.com/",
"label": "Variety - Film News"
},
"description": null
},
"__typename": "News",
"externalUrl": "https://variety.com/2026/film/news/rosamund-pike-feed-body-horror-movie-leslye-headland-1236940925/",
"articleTitle": {
"plainText": "Rosamund Pike Set to Star in and Produce ‘Feed,’ Body Horror Movie From Leslye Headland"
}
}
},
{
"node": {
"id": "ni66100602",
"date": "2026-11-07T23:07:32Z",
"text": {
"plainText": "According to Andy Richter, U2’s the Edge penned a script for a sequel to “Elf” — but fans will likely never get to see (or read) it.\n\nOn a recent episode of “Obsessed: The Podcast,” the actor explaine…"
},
"image": {
"id": "rm2303980802",
"url": "https://m.media-amazon.com/images/M/MV5BMzk1OTJhMzYtMzczYy00ZWFkLWJhMDgtMzc1NmM1MDZhMDBmXkEyXkFqcGc@._V1_.jpg",
"width": 1000,
"height": 667,
"__typename": "Image"
},
"byline": "Payton Turkeltaub",
"source": {
"homepage": {
"url": "http://variety.com/",
"label": "Variety - Film News"
},
"description": null
},
"__typename": "News",
"externalUrl": "https://variety.com/2026/film/news/u2-the-edge-sequel-elf-andy-richter-1236942164/",
"articleTitle": {
"plainText": "U2’s The Edge Wrote an ‘Elf’ Sequel, But It ‘Petered Out and Never Happened,’ Says Andy Richter"
}
}
},
"… +98"
],
"total": 800472,
"pageInfo": {
"endCursor": "NjYwOTg4ODN8MjAyNi0xMS0wNiAxNzozNjoyOA",
"__typename": "NewsPageInfo",
"hasNextPage": true
},
"__typename": "NewsConnection"
}
},
"message": null,
"requestId": "138e7296f7ed469c8c1f1ccb72b7048c",
"recordTime": "2026-11-08T08:00:40.71113937",
"requestParams": {
"body": null,
"query": {
"category": "TOP",
"languageCountry": "en_US"
}
}
}
}