BBC Topics Search
BBC Topics Search 用于按主题 ID 获取 BBC topic 页面中的内容列表数据。
- 按主题 ID 抓取 BBC topic 页面内容
- 支持按地区发起请求
- 支持从指定页开始连续抓取多页结果
- 返回主题页中的文章、视频和其他内容项
使用 XCrawl 获取 BBC Topics Search 结果
使用方式
curl -s -X POST 'https://run.xcrawl.com/v1/data' \
-H 'Authorization: Bearer $XCRAWL_API_KEY'\
-H 'Content-Type: application/json' \
-d '{
"engine": "bbc_topics_search",
"location": "US",
"topic_id": "cq04nvd56lxt",
"start_page": 1,
"pages": 1
}'请求参数说明:
engine固定为bbc_topics_searchlocation用于指定请求地区topic_id用于指定 BBC 主题标识start_page和pages用于控制抓取页码范围
响应示例
{
"result": [
{
"url": "https://www.bbc.com/news/topics/cq04nvd56lxt?page=3",
"topic_id": "cq04nvd56lxt",
"topic_title": "Bereavement - BBC News",
"current_page": 3,
"item_count": 30,
"video_count": 1,
"result_count": 30,
"results": [
{
"position": 30,
"headline": "2 Jan 2026 How embracing grief can help you enjoy what you have",
"url": "https://www.bbc.com/news/videos/clyk58v1ykjo",
"content_type": "video",
"media_type": "video"
}
]
}
]
}参数说明
必填参数
| 参数 | 类型 | 说明 |
|---|---|---|
location | string | 指定请求地区。 |
topic_id | string | 指定 BBC 主题 ID。 |
start_page | number | 指定从第几页开始抓取。 |
pages | number | 指定连续抓取的页数。 |
参数补充说明
location默认值为USlocation支持多个地区值,例如US、HK、CA、GB、JPtopic_id默认值为cq04nvd56lxtstart_page默认值为1pages默认值为1
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
url | string | 抓取的 BBC topic 页链接。 |
base_url | string | 用于补全相对链接的站点基础地址。 |
page_title | string | topic 页标题。 |
canonical_url | string | 页面声明的规范链接。 |
topic_id | string | 主题标识。 |
topic_title | string | 主题页标题。 |
current_page | number | 当前页码。 |
language | string | 页面语言代码。 |
item_count | number | 当前返回的内容数量。 |
video_count | number | 视频内容数量。 |
result_count | number | 结果对象数量。 |
meta | object | 页面元数据。 |
results | array | 内容列表。 |
结果项字段
results[] 中每一项通常包含以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
position | number | 结果位置,从 1 开始。 |
group_key | string | 来源容器标识。 |
group_title | string | 来源容器标题。 |
headline | string | 内容标题。 |
url | string | 内容链接。 |
path | string | 内容相对路径。 |
content_type | string | 归一化后的内容类型,例如 article、video、live。 |
media_type | string | 原始媒体类型,通常用于视频内容。 |
