Skip to content

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 数组以及可用地区、语言和数据来源信息。

顶层字段

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

任务字段

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

地区字段

字段类型说明
location_codeinteger地区编码
location_namestring地区完整名称
location_code_parentinteger / null上级地区编码。由于本接口支持 Country 类型地区,因此该字段通常为 null
country_iso_codestring地区的 ISO 国家/地区代码
location_typestring地区类型,目前支持 Country
available_languagesarray当前地区支持的语言列表

语言字段

语言对象位于 available_languages 数组中。

字段类型说明
available_sourcesarray当前地区与语言组合支持的数据来源
language_namestring语言名称
language_codestring按 ISO 639-1 标准定义的语言代码
keywordsinteger当前地区和语言组合可用的数量
serpsinteger当前地区和语言组合可用的 SERP 页面数量

available_sources 当前可能以下数据来源:

  • google
  • bing
  • amazon

,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_codecountry_iso_codelanguage_code 写项目,统一管理多国家、多语言排名监控任务。
  • 评估 SERP 数据覆盖度:使用 serps 字段判断地区和语言组合的 SERP 数据规模,为竞品分析和搜索结果研究选择数据范围。

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