主题
keywords_data/bing/keyword_performance/locations_and_languages
GET /v3/keywords_data/bing/keyword_performance/locations_and_languages
接口说明
GET /v3/keywords_data/bing/keyword_performance/locations_and_languages
本接口返回 Bing 效果数据接口支持的语言及可用地域。返回结果按语言分组,并列出每种语言支持的国家或地区。
计费说明
本接口调用,不产生接口费用。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求方式
本接口使用 GET 请求,无请求体。
请求头
| 请求头 | 类型 | 填 | 说明 |
|---|---|---|---|
Authorization | string | 是 | Bearer 认证,格式为 Bearer smt_live_YOUR_KEY |
Content-Type | string | 否 | 建议设置为 application/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 | 任务结果数组 |
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 | 请求路径信息 |
data | object | 本次请求使用的参数及接口标识 |
result | array | 语言及可用地域列表 |
tasks[].data 字段
| 字段 | 类型 | 说明 |
|---|---|---|
api | string | API 模块名称,固定为 keywords_data |
function | string | 接口名称,固定为 locations_and_languages |
se | string | 搜索引擎类型,固定为 bing |
se_type | string | 数据类型,固定为 keyword_performance |
tasks[].result[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
language_name | string | 语言名称 |
language_code | string | 语言代码 |
available_locations | array | 当前语言支持的地域列表 |
tasks[].result[].available_locations[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
location_code | string | 地域代码 |
location_name | string | 地域名称 |
country_iso_code | string | 地域对应的 ISO 国家或地区代码 |
location_type | string | 地域类型,可选值为 Country、Region |
请求示例
cURL
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/keywords_data/bing/keyword_performance/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/bing/keyword_performance/locations_and_languages"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
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";
async function getLocationsAndLanguages() {
const url =
"https://api.seermartech.cn/v3/keywords_data/bing/keyword_performance/locations_and_languages";
try {
const response = await axios.get(url, {
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
});
const result = response.data;
if (result.status_code === 20000) {
console.log(result);
} else {
console.error(
`请求失败,状态码:${result.status_code},消息:${result.status_message}`
);
}
} catch (error) {
console.error("请求异常:", error);
}
}
getLocationsAndLanguages();返回示例
json
{
"version": "0.1.20240626",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1337 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": " a3f2d8c1-7b4e-4b1f-9c3a-123456789abc",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1201 sec.",
"cost": 0,
"result_count": 10,
"path": [
"v3",
"keywords_data",
"bing",
"keyword_performance",
"locations_and_languages"
],
"data": {
"api": "keywords_data",
"function": "locations_and_languages",
"se": "bing",
"se_type": "keyword_performance"
},
"result": [
{
"language_name": "Dutch",
"language_code": "nl",
"available_locations": [
{
"location_code": "2756",
"location_name": "Australia",
"country_iso_code": "AU",
"location_type": "Country"
}
]
},
{
"language_name": "English",
"language_code": "en",
"available_locations": [
{
"location_code": "2840",
"location_name": "United States",
"country_iso_code": "US",
"location_type": "Country"
},
{
"location_code": "2826",
"location_name": "United Kingdom",
"country_iso_code": "GB",
"location_type": "Country"
}
]
}
]
}
]
}接口返回的语言列表可能:
- Dutch:
nl - English:
en - Finnish:
fi - French:
fr - German:
de - Italian:
it - Spanish:
es - Swedish:
sv - Chinese (Simplified):
zh-CN - Chinese (Traditional):
zh-TW
可用地域以接口实时返回的 available_locations 为准。
实用场景
- 获取支持的语言和地域组合,在创建效果查询任务前校验参数,因语言与地域不匹导致任务失败。
- 构建地域与语言选择器,为 SEO 分析平台生成 Bing 数据的可选,提升用户准确性。
- 同步地域代码和名称,维护国家、地区及 ISO 代码映射,便于统一管理跨市场数据。
- 筛选目标市场,根据语言和地域组合批量规划不同国家或地区的效果分析任务。
- 校验多语言 SEO置,识别简体中文、繁体中文及语言对应的可用市场范围,支持化搜索策略。