主题
Google AI Mode 实时 SERP 高级接口
POST /v3/serp/google/ai_mode/live/advanced
本接口使用 POST 方法,请求路径为:
POST https://api.seermartech.cn/v3/serp/google/ai_mode/live/advanced
用于获取 Google 搜索 AI Mode 功能返回的完整搜索结果 AI 概览、搜索细化选项、购物结果、广告、引用来源、图片、视频、表格及像素坐标等高级结果数据。
所有 POST 请求体使用 UTF-8 编码的 JSON 格式,并将任务对象放最外层数组中。每次调用最多提交 1 个任务;平台限流以认证说明中的 30/60/120 次/分钟规则为准。
计费说明
每个任务单独计费。
参考价约 ¥0.0288 / 次。启用 calculate_rectangles=true 后,该任务费用将按 2 倍计算。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
###填参数
| 参数 | 类型 | 说明 |
|---|---|---|
keyword | string | 搜索,填,最长 700 个字符。请求中的 %## 编码会被解码,字符 + 会被解码为空格。如果中需要使用 %,请写为 %25;如果需要使用 +,请写为 %2B。 |
location_code | integer | 搜索位置代码。当未指定 location_name 或 location_coordinate 时填。使用此参数后,无需再传递位置参数。可通过 GET /v3/serp/google/locations 获取可用位置。请确认目标国家或地区是否已开放 AI Mode。 |
language_code | string | 搜索语言代码。当未指定 language_name 时填。使用此参数后,无需再传递 language_name。可通过 GET /v3/serp/google/ai_mode/languages 获取可用语言。 |
基础可选参数
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
device | string | desktop | 设备类型。可选值:desktop、mobile。 |
位置与语言参数
location_code、location_name 和 location_coordinate 三只能选择一个。
| 参数 | 类型 | 说明 |
|---|---|---|
location_name | string | 搜索位置的完整名称。当未指定 location_code 或 location_coordinate 时填。可通过 GET /v3/serp/google/locations 获取可用位置名称。 |
location_coordinate | string | GPS 坐标,格式为 latitude,longitude,zoom。例如:52.6178549,-155.352142,18z。未指定 zoom 时默认为 9z;经纬度最多保留 7 位小数;缩放级别范围为 4z 至 18z。 |
language_name | string | 搜索语言完整名称。当未指定 language_code 时填。可通过 GET /v3/serp/google/ai_mode/languages 获取可用语言名称。 |
设备与结果参数
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
os | string | 根据设备类型确定 | 设备操作系统。device=desktop 时可选 windows、macos,默认 windows;device=mobile 时可选 android、ios,默认 android。 |
tag | string | - | 用户自定义任务标识,最长 255 个字符。该值会原样返回在响应的 data 对象中,可用于请求与结果。 |
calculate_rectangles | boolean | false | 是否计算 SERP素的像素排名及坐标。像素排名表示结果摘要距离屏幕左上角的距离。设为 true 后任务费用按 2 倍计算。 |
browser_screen_width | integer | 见下文 | 浏览器屏幕宽度,取值范围 240-9999。启用 calculate_rectangles=true 后生效。默认值:桌面端 1920;Android 移动端 360;iOS 移动端 375。 |
browser_screen_height | integer | 见下文 | 浏览器屏幕高度,取值范围 240-9999。启用 calculate_rectangles=true 后生效。默认值:桌面端 1080;Android 移动端 640;iOS 移动端 812。 |
browser_screen_resolution_ratio | number | 见下文 | 浏览器屏幕分辨率比例,取值范围 0.5-3。启用 calculate_rectangles=true 后生效。默认值:桌面端 1;Android 和 iOS 移动端 3。 |
请求示例
cURL
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/serp/google/ai_mode/live/advanced" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"language_code": "en",
"location_code": 2840,
"keyword": "what is google ai mode",
"device": "desktop",
"os": "windows",
"tag": "ai-mode-demo"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/serp/google/ai_mode/live/advanced"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
# 每次调用只能提交
## 实用场景
- 待补充具体业务场景