主题
点击流数据支持的地点与语言列表
GET /v3/keywords_data/clickstream_data/locations_and_languages
本接口使用 GET 方法,请求路径为:
/v3/keywords_data/clickstream_data/locations_and_languages
用于获取点击流数据接口支持的地点和语言。返回结果地点代码、地点名称、ISO 国家/地区代码、地点类型,以及每个地点支持的语言列表。
> 注意: 俄罗斯和白俄罗斯的所有地点目前均不支持点击流数据服务。
计费说明
调用本接口不产生费用,响应中的 cost 通常为 0。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求方式
请求头
| Header | 类型 | 填 | 说明 |
|---|---|---|---|
Authorization | string | 是 | Bearer 认证令牌,格式为 Bearer smt_live_YOUR_KEY |
Content-Type | string | 否 | 建议设置为 application/json |
请求示例
curl
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/keywords_data/clickstream_data/locations_and_languages" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
url = "https://api.seermartech.cn/v3/keywords_data/clickstream_data/locations_and_languages"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
response.raise_for_status()
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
const response = await fetch(
"https://api.seermartech.cn/v3/keywords_data/clickstream_data/locations_and_languages",
{
method: "GET",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
);
const result = await response.json();
if (result.status_code === 20000) {
console.log(result);
} else {
console.error(
`请求失败,错误码:${result.status_code},错误信息:${result.status_message}`
);
}响应结构
接口返回 JSON 对象,主要字段如下。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 请求级状态码 |
status_message | string | 请求级状态信息 |
time | string | 请求执行耗时,单位为秒 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | tasks 数组中返回错误的任务数量 |
tasks | array | 任务结果数组 |
任务字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 | GET 请求路径中使用的接口参数 |
result | array | 地点及语言结果数组 |
data 字段
| 字段 | 类型 | 示例 | 说明 |
|---|---|---|---|
api | string | keywords_data | API 模块名称 |
function | string | locations_and_languages | 接口功能名称 |
se | string | clickstream_data | 数据源或搜索引擎类型 |
地点字段
| 字段 | 类型 | 说明 |
|---|---|---|
location_code | integer | 地点代码 |
location_name | string | 地点完整名称 |
location_code_parent | integer / null | 上级地点代码。由于本接口支持 Country 类型,该字段通常为 null |
country_iso_code | string | 地点对应的 ISO 国家/地区代码 |
location_type | string | 地点类型。目前支持 Country;部分返回数据可能标记为 Region |
available_languages | array | 当前地点支持的语言列表 |
available_languages 字段
| 字段 | 类型 | 说明 |
|---|---|---|
language_name | string | 语言名称 |
language_code | string | 根据 ISO 639-1 标准定义的语言代码 |
响应示例
json
{
"version": "0.1.20240801",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2685 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "เส000000-0000-0000-0000-000000000000",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1200 sec.",
"cost": 0,
"result_count": 3,
"path": [
"v3",
"keywords_data",
"clickstream_data",
"locations_and_languages"
],
"data": {
"api": "keywords_data",
"function": "locations_and_languages",
"se": "clickstream_data"
},
"result": [
{
"location_code": 2024,
"location_name": "Angola",
"location_code_parent": null,
"country_iso_code": "AO",
"location_type": "Country",
"available_languages": [
{
"language_name": "Portuguese",
"language_code": "pt"
}
]
},
{
"location_code": 2032,
"location_name": "Argentina",
"location_code_parent": null,
"country_iso_code": "AR",
"location_type": "Country",
"available_languages": [
{
"language_name": "Spanish",
"language_code": "es"
}
]
},
{
"location_code": 2840,
"location_name": "United States",
"location_code_parent": null,
"country_iso_code": "US",
"location_type": "Country",
"available_languages": [
{
"language_name": "English",
"language_code": "en"
},
{
"language_name": "Spanish",
"language_code": "es"
}
]
}
]
}
]
}> 示例展示部分地点。响应中的 result 数组会返回当前版本支持的完整地点列表及语言信息。
状态码
| 状态码 | 说明 |
|---|---|
20000 | 请求成功 |
| 状态码 | 请求或任务处理失败,原因请结合 status_message 判断 |
实用场景
- 校验目标市场是否可用:在提交数据任务前检查地点代码是否受支持,因地点不可用导致任务失败。
- 匹地点与语言参数:根据
available_languages自动选择目标国家/地区对应的语言代码,提升多语言分析的准确性。 - 构建市场中心:定期同步地点和语言列表,为 SEO 项目、客户账户或站点生成可选市场单。
- 规划化研究:筛选支持特定语言的国家/地区,评估不同市场的覆盖范围和扩展优级。
- 防止非法参数提交:在前端或任务调度系统中预校验
location_code、location_type和language_code的组合,降低无效请求比例。