主题
Clickstream Global Search Volume 实时查询
POST /v3/keywords_data/clickstream_data/global_search_volume/live
本接口使用 POST 方法,请求路径为:
/v3/keywords_data/clickstream_data/global_search_volume/live
本接口用于实时获取的点击流搜索量数据。单次请求最多支持 1000 个,并返回各可用国家或地区的搜索量分布及占搜索量的比例。
接口信息
- 请求方法:
POST - 请求地址:
https://api.seermartech.cn/v3/keywords_data/clickstream_data/global_search_volume/live - Content-Type:
application/json - 请求体格式:JSON 数组
- 单次请求任务数:1
- 每分钟最大 API 调用数:以认证说明中的 30/60/120 次/分钟规则为准
- 最大并发请求数:30
所有请求参数放在通用请求数组中,例如:
json
[
{
"keywords": [
"you tube",
"youtube",
"youtub"
],
"tag": "test-tag"
}
]计费说明
本接口按请求计费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
keywords | array | 是 | 目标数组。使用 UTF-8 编码,最多 1000 个。每个至少 3 个字符。平台会将转换为小写格式。部分符号和字符不受支持,例如部分 Unicode 字符和表符号。 |
tag | string | 否 | 用户自定义任务标识,用于匹请求与响应结果。最大长度为 255 个字符。提交的值会原样返回在响应的 data 对象中。 |
keywords 参数限制
- 最多提交 1000 个。
- 每个至少 3 个字符。
- 会自动转换为小写。
- 不支持部分特殊符号、Unicode 字符和表符号。
- 建议在提交前完成洗、去重和长度校验。
响应结构
服务端返回 JSON 数据 tasks 数组。
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 请求级状态码。20000 表示请求成功。 |
status_message | string | 请求级状态说明。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | tasks 数组中返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,采用 UUID 格式。 |
status_code | integer | 任务状态码,通常位于 10000 至 60000 范围。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。 |
path | array | 当前请求的 URL 路径信息。 |
data | object | 请求中提交的参数。 |
result | array | 搜索量结果数组。 |
result 与 items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
items_count | integer | items 数组中的结果数量。 |
items | array | 含及搜索量数据。 |
keyword | string | 。经过 URL 编码的会被解码,+ 会被解码为空格。 |
search_volume | integer | 基于点击流数据估算的月均搜索量,表示该的大致搜索次数。 |
country_distribution | array | 按国家或地区划分的点击流搜索量分布。 |
country_iso_code | string | 国家或地区的 ISO 代码。 |
search_volume | integer | 该国家或地区的搜索量。 |
percentage | float | 该国家或地区搜索量占搜索量的比例。 |
country_distribution 位于每个结果对象中结构如下:
json
{
"country_iso_code": "US",
"search_volume": 123456,
"percentage": 12.34
}请求示例
cURL
bash
curl --location 'https://api.seermartech.cn/v3/keywords_data/clickstream_data/global_search_volume/live' \
--header 'Authorization: Bearer smt_live_YOUR_KEY' \
--header 'Content-Type: application/json' \
--data '[
{
"tag": "test-tag",
"keywords": [
"you tube",
"youtube",
"youtub"
]
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/keywords_data/clickstream_data/global_search_volume/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
post_data = [
{
"tag": "test-tag",
"keywords": [
"you tube",
"youtube",
"youtub",
],
}
]
response = requests.post(url, headers=headers, json=post_data)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"请求失败。状态码:%s,消息:%s"
% (result.get("status_code"), result.get("status_message"))
)TypeScript
typescript
import axios from "axios";
const postData = [
{
tag: "test-tag",
keywords: ["you tube", "youtube", "youtub"],
},
];
axios
.post(
"https://api.seermartech.cn/v3/keywords_data/clickstream_data/global_search_volume/live",
postData,
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
)
.then((response) => {
// 处理响应数据
console.log(response.data);
})
.catch((error) => {
console.error("请求失败:", error.response?.data || error.message);
});PHP
php
<?php
$url = 'https://api.seermartech.cn/v3/keywords_data/clickstream_data/global_search_volume/live';
$postData = [
[
'tag' => 'test-tag',
'keywords' => [
'you tube',
'youtube',
'youtub'
]
]
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer smt_live_YOUR_KEY',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($postData, JSON_UNESCAPED_UNICODE)
]);
$response = curl_exec($ch);
if ($response === false) {
throw new Exception(curl_error($ch));
}
curl_close($ch);
$result = json_decode($response, true);
if (($result['status_code'] ?? null) === 20000) {
print_r($result);
} else {
echo '请求失败。状态码:'
. ($result['status_code'] ?? '未知')
. ',消息:'
. ($result['status_message'] ?? '未知');
}响应示例
json
{
"version": "0.1.20240801",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.8803 sec.",
"cost": 0.15,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "7f8c1f2a-8f0e-4a1b-9b22-123456789abc",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.8501 sec.",
"cost": 0.15,
"result_count": 1,
"path": [
"v3",
"keywords_data",
"clickstream_data",
"global_search_volume",
"live"
],
"data": {
"api": "keywords_data",
"function": "global_search_volume",
"se": "clickstream_data",
"tag": "test-tag",
"keywords": [
"you tube",
"youtube",
"youtub"
]
},
"result": [
{
"items_count": 3,
"items": [
{
"keyword": "you tube",
"search_volume": 18575928,
"country_distribution": [
{
"country_iso_code": "US",
"search_volume": 1234567,
"percentage": 6.64
}
]
},
{
"keyword": "youtube",
"search_volume": 18575928,
"country_distribution": [
{
"country_iso_code": "US",
"search_volume": 1234567,
"percentage": 6.64
}
]
},
{
"keyword": "youtub",
"search_volume": 2081434,
"country_distribution": [
{
"country_iso_code": "US",
"search_volume": 234567,
"percentage": 11.27
}
]
}
]
}
]
}
]
}状态码与错误处理
status_code既可能出现在顶层响应,也可能出现在单个任务对象中。20000表示请求或任务处理成功。- 应同时检查顶层
status_code、tasks_error以及每个任务的status_code。 - 当部分任务失败时,应根据对应任务的
status_message记录并处理异常。 - 生产环境建议实现重试、时、限流和错误日志机制。
实用场景
- 评估需求:对目标获取月均搜索量,帮助制定 SEO优级。
- 识别重点市场:分析
country_distribution,定位搜索需求集中的国家或地区,支持市场和本地化决策。 - 规划多地区:比较同一在不同国家的搜索量占比,为语言版本、地区页面和本地布局提供依据。
- 筛选高潜力:批量提交最多 1000 个,根据点击流搜索量快速建立优级单。
- 校验变体价值:对拼写变体、品牌词和长尾词进行搜索量对比,确定页面标题、主题和链接策略。