Google Events Search
Google Events Search 用于按关键词获取 Google Events 结果数据。
- 按关键词抓取 Google Events 结果
- 支持按地区发起请求
- 支持按起止页范围抓取结果
- 返回事件标题、链接、时间、图片和地点描述
使用 XCrawl 获取 Google Events 搜索结果
使用方式
curl -s -X POST 'https://run.xcrawl.com/v1/data' \
-H 'Authorization: Bearer $XCRAWL_API_KEY'\
-H 'Content-Type: application/json' \
-d '{
"engine": "google_events",
"location": "US",
"keyword_list": ["concert"],
"start_page": 1,
"end_page": 1
}'请求参数说明:
engine固定为google_eventslocation用于指定请求地区keyword_list用于传入一个或多个搜索关键词start_page和end_page用于控制抓取页码范围
响应示例
{
"result": [
{
"content": {
"title": "An Evening With David Sedaris",
"link": "https://www.google.com/search?hl=en&q=an+evening+with+david+sedaris...",
"img_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQVmsREGRFxWn8TpraZip7bfdi36mqD0ud_r1tkeks&s",
"time": "17 Jul",
"describe": "The JPT Film & Event Center, 49 Touro St"
}
}
]
}参数说明
必填参数
| 参数 | 类型 | 说明 |
|---|---|---|
location | string | 指定请求地区。 |
keyword_list | array | 传入一个或多个搜索关键词。 |
start_page | number | 指定从第几页开始抓取。 |
end_page | number | 指定抓取到第几页结束。 |
参数补充说明
location默认值为USlocation支持多个地区值,例如US、HK、CA、GB、JPkeyword_list默认值为空数组,数组元素为搜索关键词start_page默认值为1end_page默认值为1
响应字段
响应数据位于 result[].content。
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 事件标题。 |
link | string | 事件结果链接。 |
img_url | string | 事件图片链接。 |
time | string | 事件时间。 |
describe | string | 事件地点或简要说明。 |
