主题
dataforseo_labs/locations_and_languages:获取支持的地区和语言
GET /v3/dataforseo_labs/locations_and_languages
本接口使用 GET 方法,请求路径为:
/v3/dataforseo_labs/locations_and_languages
用于获取本平台数据分析 API 支持的完整地区与语言列表。目前支持的数据来源 Google、Bing 和 Amazon。需要注意,Amazon 与 Bing 当前支持美国地区和英语。
你也可以下载完整的地区列表 CSV 文件,文件最近更新时间为 2026-09-01。
> 注意:由于地区服务政策调整,俄罗斯和白俄罗斯的地区目前不再支持本平台各项服务。
请求
http
GET https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages该接口无需请求体。
计费
调用本接口不收取费用。
响应说明
接口返回 JSON 数据, tasks 数组以及可用地区、语言和数据来源信息。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 | 请求路径 |
data | object | GET 请求中使用的接口参数 |
result | array | 地区和语言结果数组 |
地区字段
| 字段 | 类型 | 说明 |
|---|---|---|
location_code | integer | 地区编码 |
location_name | string | 地区完整名称 |
location_code_parent | integer / null | 上级地区编码。由于本接口支持 Country 类型地区,因此该字段通常为 null |
country_iso_code | string | 地区的 ISO 国家/地区代码 |
location_type | string | 地区类型,目前支持 Country |
available_languages | array | 当前地区支持的语言列表 |
语言字段
语言对象位于 available_languages 数组中。
| 字段 | 类型 | 说明 |
|---|---|---|
available_sources | array | 当前地区与语言组合支持的数据来源 |
language_name | string | 语言名称 |
language_code | string | 按 ISO 639-1 标准定义的语言代码 |
keywords | integer | 当前地区和语言组合可用的数量 |
serps | integer | 当前地区和语言组合可用的 SERP 页面数量 |
available_sources 当前可能以下数据来源:
googlebingamazon
,Amazon 和 Bing 当前限美国/英语组合。
请求示例
cURL
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"PHP
php
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer smt_live_YOUR_KEY',
'Content-Type: application/json',
],
]);
$response = curl_exec($ch);
if ($response === false) {
echo '请求失败:' . curl_error($ch);
} else {
$result = json_decode($response, true);
if (($result['status_code'] ?? null) === 20000) {
print_r($result);
} else {
echo '错误码:' . ($result['status_code'] ?? '未知');
echo ',错误信息:' . ($result['status_message'] ?? '未知');
}
}
curl_close($ch);JavaScript / Axios
javascript
const axios = require('axios');
axios({
method: 'get',
url: 'https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages',
headers: {
'Authorization': 'Bearer smt_live_YOUR_KEY',
'Content-Type': 'application/json'
}
})
.then(function (response) {
// 处理响应数据
console.log(response.data);
})
.catch(function (error) {
console.error('请求失败:', error.message);
});Python
python
import requests
url = "https://api.seermartech.cn/v3/dataforseo_labs/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"))
)C#
csharp
using Newtonsoft.Json.Linq;
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
namespace SeerMarTechDemos
{
public static class Demos
{
public static async Task GetLocationsAndLanguages()
{
using var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "smt_live_YOUR_KEY");
var response = await httpClient.GetAsync(
"https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages"
);
var content = await response.Content.ReadAsStringAsync();
var result = JObject.Parse(content);
if ((int?)result["status_code"] == 20000)
{
Console.WriteLine(result);
}
else
{
Console.WriteLine(
$"错误码:{result["status_code"]},错误信息:{result["status_message"]}"
);
}
}
}
}响应示例
以下示例展示部分地区及可用语言。响应可能更多地区和语言。
json
{
"version": "0.1.20221214",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2517 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "8f7b4f3e-5c2a-4db2-9b4b-123456789abc",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2401 sec.",
"cost": 0,
"result_count": 5,
"path": [
"v3",
"dataforseo_labs",
"locations_and_languages"
],
"data": {
"api": "dataforseo_labs",
"function": "locations_and_languages"
},
"result": [
{
"location_code": 2840,
"location_name": "United States",
"location_code_parent": null,
"country_iso_code": "US",
"location_type": "Country",
"available_languages": [
{
"available_sources": [
"google",
"bing",
"amazon"
],
"language_name": "English",
"language_code": "en",
"keywords": 857610015,
"serps": 178274543
},
{
"available_sources": [
"google"
],
"language_name": "Spanish",
"language_code": "es",
"keywords": 101466536,
"serps": 5390600
}
]
},
{
"location_code": 2854,
"location_name": "Burkina Faso",
"location_code_parent": null,
"country_iso_code": "BF",
"location_type": "Country",
"available_languages": [
{
"available_sources": [
"google"
],
"language_name": "French",
"language_code": "fr",
"keywords": 3256536,
"serps": 216324
}
]
},
{
"location_code": 2858,
"location_name": "Uruguay",
"location_code_parent": null,
"country_iso_code": "UY",
"location_type": "Country",
"available_languages": [
{
"available_sources": [
"google"
],
"language_name": "Spanish",
"language_code": "es",
"keywords": 8872110,
"serps": 455072
}
]
},
{
"location_code": 2492,
"location_name": "Monaco",
"location_code_parent": null,
"country_iso_code": "MC",
"location_type": "Country",
"available_languages": [
{
"available_sources": [
"google"
],
"language_name": "French",
"language_code": "fr",
"keywords": 533383,
"serps": 188191
}
]
},
{
"location_code": 2008,
"location_name": "Albania",
"location_code_parent": null,
"country_iso_code": "AL",
"location_type": "Country",
"available_languages": [
{
"available_sources": [
"google"
],
"language_name": "Albanian",
"language_code": "sq",
"keywords": 865801,
"serps": 449402
}
]
}
]
}
]
}状态码
20000:请求成功。- 状态码:请求或任务执行失败,原因请结合
status_message判断。
实用场景
- 校验目标市场覆盖范围:根据地区编码、语言代码和数据来源筛选可用组合,提交不受支持的研究任务。
- 规划多地区数据库:读取各地区可用的数量,评估市场规模并确定优拓展的国家或地区。
- 选择合适的数据来源:判断指定地区和语言是否支持 Google、Bing 或 Amazon,匹不同搜索渠道的 SEO 分析需求。
- 构建化 SEO置:将
location_code、country_iso_code和language_code写项目,统一管理多国家、多语言排名监控任务。 - 评估 SERP 数据覆盖度:使用
serps字段判断地区和语言组合的 SERP 数据规模,为竞品分析和搜索结果研究选择数据范围。