Skip to content

Google Events SERP 地点列表

本接口用于获取 Google Events SERP 支持的地点信息。

请求方式: GET
请求路径: /v3/serp/google/events/locations

本接口不收取调用费用。支持的地点列表可能会更新,请以接口实时返回结果为准。当前不支持俄罗斯和白俄罗斯境的地点。

请求

cURL

bash
curl --location --request GET \
  "https://api.seermartech.cn/v3/serp/google/events/locations" \
  --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/serp/google/events/locations',
    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);
    print_r($result);
}

curl_close($ch);

TypeScript

typescript
import axios from 'axios';

axios({
  method: 'get',
  url: 'https://api.seermartech.cn/v3/serp/google/events/locations',
  headers: {
    Authorization: 'Bearer smt_live_YOUR_KEY',
    'Content-Type': 'application/json',
  },
})
  .then((response) => {
    // 接口返回数据
    console.log(response.data);
  })
  .catch((error) => {
    console.error('请求失败:', error.response?.data || error.message);
  });

Python

python
import requests

url = "https://api.seermartech.cn/v3/serp/google/events/locations"

headers = {
    "Authorization": "Bearer smt_live_YOUR_KEY",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)

if response.ok:
    result = response.json()
    print(result)
else:
    print(f"请求失败,HTTP 状态码:{response.status_code}")
    print(response.text)

C#

csharp
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

public static class Demo
{
    public static async Task GetGoogleEventsLocations()
    {
        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/serp/google/events/locations"
        );

        var content = await response.Content.ReadAsStringAsync();
        Console.WriteLine(content);
    }
}

响应说明

接口返回 JSON 数据 tasks 数组本次请求的任务结果。

顶层字段

字段类型说明
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 字段

字段类型说明
apistringAPI 类型,固定为 serp
functionstring接口功能,固定为 locations
sestring搜索引擎,固定为 google
se_typestringSERP 类型,固定为 events

result 地点字段

字段类型说明
location_codeinteger地点编码
location_namestring地点完整名称
location_code_parentinteger上级地点编码
country_iso_codestring地点所属国家或地区的 ISO 代码
location_typestring地点类型

location_code_parent 用于表示地点层级。例如:

json
{
  "location_code": 9041134,
  "location_name": "Vienna International Airport,Lower Austria,Austria",
  "location_code_parent": 20044
}

location_code_parent20044,对应的上级地点可能为:

json
{
  "location_code": 20044,
  "location_name": "Lower Austria,Austria"
}

响应示例

json
{
  "version": "3.20191128",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.4305 sec.",
  "cost": 0,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.1000 sec.",
      "cost": 0,
      "result_count": 0,
      "path": [
        "v3",
        "serp",
        "google",
        "events",
        "locations"
      ],
      "data": {
        "api": "serp",
        "function": "locations",
        "se": "google",
        "se_type": "events"
      },
      "result": []
    }
  ]
}

状态码与费用

  • status_code: 20000 表示请求成功。
  • tasks_error 表示任务级错误数量。
  • 详细错误码和错误信息请参考错误码文档。
  • 本接口不收取调用费用;接口的扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

实用场景

  • 获取可用地点编码:为 Google Events SERP 查询准备标准化地点参数,因地点名称不规范导致任务提交失败。
  • 构建地点选择器:按国家、地区和城市层级生成 SEO 工中的地点下拉选项,支持用户精确选择搜索区域。
  • 匹地点层级:利用 location_code_parent 将机场、城市和行政区起来,完善本地搜索数据的层级分析。
  • 统一多地区:通过 country_iso_codelocation_type 批量筛选目标市场,为不同国家或地区创建一致的 SERP 监测。
  • 校验本地 SEO 任务参数:在提交 Google Events SERP 任务前验证地点编码是否受支持,降低无效任务和数据缺失风险。

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