Skip to content

点击流数据支持的地点与语言列表

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类型说明
AuthorizationstringBearer 认证令牌,格式为 Bearer smt_live_YOUR_KEY
Content-Typestring建议设置为 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 对象,主要字段如下。

顶层字段

字段类型说明
versionstring当前 API 版本
status_codeinteger请求级状态码
status_messagestring请求级状态信息
timestring请求执行耗时,单位为秒
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务数量
tasks_errorintegertasks 数组中返回错误的任务数量
tasksarray任务结果数组

任务字段

字段类型说明
idstring任务唯一标识,UUID 格式
status_codeinteger任务状态码,通常在 1000060000 范围
status_messagestring任务状态信息
timestring任务执行耗时,单位为秒
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的数量
patharray请求 URL 路径
dataobjectGET 请求路径中使用的接口参数
resultarray地点及语言结果数组

data 字段

字段类型示例说明
apistringkeywords_dataAPI 模块名称
functionstringlocations_and_languages接口功能名称
sestringclickstream_data数据源或搜索引擎类型

地点字段

字段类型说明
location_codeinteger地点代码
location_namestring地点完整名称
location_code_parentinteger / null上级地点代码。由于本接口支持 Country 类型,该字段通常为 null
country_iso_codestring地点对应的 ISO 国家/地区代码
location_typestring地点类型。目前支持 Country;部分返回数据可能标记为 Region
available_languagesarray当前地点支持的语言列表

available_languages 字段

字段类型说明
language_namestring语言名称
language_codestring根据 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_codelocation_typelanguage_code 的组合,降低无效请求比例。

统一入口:官网 · LLM API · 控制台