主题
SERP Seznam 支持语言列表
GET /v3/serp/seznam/languages
GET /v3/serp/wp/languages
获取 SERP 语言列表。本接口返回指定搜索引擎支持的语言名称及 ISO 639-1 语言代码。
> 注意:Seznam 搜索引擎支持捷语(cs)。
> 路径中的 /wp/ 为容 API 路径的一部分,调用时原样保留。
计费
调用本接口不收费。
请求
http
GET https://api.seermartech.cn/v3/serp/wp/languages
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json本接口无需请求体。
curl 示例
bash
curl --location --request GET "https://api.seermartech.cn/v3/serp/wp/languages" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python 示例
python
import requests
url = "https://api.seermartech.cn/v3/serp/wp/languages"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
# 获取搜索引擎支持的语言列表
response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
result = response.json()
if result["status_code"] == 20000:
print(result)
else:
print(
f"请求失败:{result['status_code']} - "
f"{result['status_message']}"
)TypeScript 示例
typescript
const response = await fetch(
"https://api.seermartech.cn/v3/serp/wp/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 对象 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 | GET 请求路径中传或解析出的参数。 |
result | array | 语言列表结果。 |
result 对象字段
| 字段 | 类型 | 说明 |
|---|---|---|
language_name | string | 语言名称。 |
language_code | string | 符合 ISO 639-1 标准的语言代码。 |
响应示例
json
{
"version": "3.20191128",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1773 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "12345678-1234-1234-1234-123456789abc",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1773 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"serp",
"wp",
"languages"
],
"data": {
"api": "serp",
"function": "languages",
"se": "wp"
},
"result": [
{
"language_name": "Czech",
"language_code": "cs"
}
]
}
]
}实用场景
- 校验任务语言:在创建 Seznam SERP 查询任务前确认可用语言代码,因传不支持的语言参数导致任务失败。
- 限制捷市场采集范围:识别该搜索引擎支持
cs,在多国家 SEO 平台中自动隐藏无效的语言选项。 - 生成搜索引擎表:拉取语言能力数据并写中心,为排名监控任务提供参数校验依据。
- 优化跨市场调研:将捷语与对应搜索引擎绑定,确保 SERP 数据采集使用正确的语言环境。