Skip to content

content_analysis/locations

GET /v3/content_analysis/locations

#分析 API 支持地区列表

接口说明

该接口用于获取分析 API 支持的地区列表。

  • 请求方式:GET
  • 请求地址:https://api.seermartech.cn/v3/content_analysis/locations
  • 计费:,不会产生账户扣费
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准

注意:俄罗斯和白俄罗斯的地区已不再被支持,且这一限制适用于服务。

接口返回为 JSON 数据,顶层 tasks 数组,每个任务本次请求的执行结果。

响应结构

顶层字段

字段名类型说明
versionstring当前 API 版本
status_codeinteger通用状态码,完整列表见 /v3/appendix/errors
status_messagestring通用状态说明,完整列表见 /v3/appendix/errors
timestring执行耗时,单位秒
costfloat本次请求总成本,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorintegertasks 数组中返回错误的任务数量
tasksarray任务数组

tasks[] 字段

字段名类型说明
idstring任务唯一标识,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000,完整列表见 /v3/appendix/errors
status_messagestring任务状态说明,完整列表见 /v3/appendix/errors
timestring任务执行耗时,单位秒
costfloat当前任务成本,单位 USD
result_countintegerresult 数组中的数量
patharrayURL 路径
dataobjectGET 请求 URL 中传的参数
resultarray结果数组

result[] 字段

字段名类型说明
location_namestring地区完整名称
country_iso_codestring地区所属国家的 ISO 国家代码

请求示例

cURL

bash
curl --location --request GET "https://api.seermartech.cn/v3/content_analysis/locations" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"

Python

python
import requests

url = "https://api.seermartech.cn/v3/content_analysis/locations"
headers = {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
}

# 获取分析支持的地区列表
response = requests.get(url, headers=headers)
print(response.json)

TypeScript

typescript
import axios from "axios";

async function getContentAnalysisLocations {
 const response = await axios.get(
 "https://api.seermartech.cn/v3/content_analysis/locations",
 {
 headers: {
 Authorization: "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json",
 },
 }
 );

 // 输出接口结果
 console.log(response.data);
}

getContentAnalysisLocations.catch(console.error);

响应示例

json
{
 "version": "3.20191128",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.4305 sec.",
 "cost": 0,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "data": {
 "api": "content_analysis",
 "function": "locations"
 },
 "result": []
 }
 ]
}

状态码说明

  • 顶层 status_code 表示整个请求的处理状态
  • tasks[].status_code 表示单个任务的执行状态
  • 完整错误码与状态说明请参考 /v3/appendix/errors

使用说明

调用该接口后,可获得当前分析功能可用的地区列表。通常可用于:

  • 在提交分析任务前,校验地区是否受支持
  • 构建地区下拉选择器或页
  • 同步本平台支持地区数据,提交无效参数

实用场景

  • 校验投放地区:在创建分析任务前拉取可用地区,因地区不支持导致请求失败。
  • 生成地区选择器:将返回的 location_namecountry_iso_code 用于前端下拉菜单,提升效率。
  • 同步地区字:定期拉取支持地区列表,维护 SEO 工的地区映射表。
  • 过滤无效国家:在跨国家监测中,自动排除暂不支持的国家,减少无效任务提交。
  • 统一多业务参数源:将该接口返回结果作为分析、地域监测、市场研究等模块的标准地区数据源。

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