主题
domain_analytics/technologies/locations:获取技术分析位置列表
GET /v3/domain_analytics/technologies/locations
本接口使用 GET 方法,请求路径为:
/v3/domain_analytics/technologies/locations
用于获取域名技术分析 API 支持的位置列表位置名称和对应的 ISO 国家代码。
> 计费说明:调用本接口不收费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
> 注意:由于服务政策调整,俄罗斯和白俄罗斯的所有位置目前均不再支持。
请求
HTTP 请求
http
GET https://api.seermartech.cn/v3/domain_analytics/technologies/locations
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json本接口无需请求参数,也无需请求体。
curl
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/domain_analytics/technologies/locations" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
url = "https://api.seermartech.cn/v3/domain_analytics/technologies/locations"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
result = response.json()
print(result)
else:
print(f"HTTP 请求失败:{response.status_code}")
print(response.text)TypeScript
typescript
import axios from "axios";
axios
.get(
"https://api.seermartech.cn/v3/domain_analytics/technologies/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);
});响应结构
服务端返回 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 | 任务对象数组 |
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 | 请求 URL 路径 |
data | object | GET 请求中使用的接口参数信息 |
result | array | 位置结果数组 |
result 位置字段
| 字段名 | 类型 | 说明 |
|---|---|---|
location_name | string | 位置的完整名称 |
country_iso_code | string | 位置所属国家或地区的 ISO 代码 |
响应示例
json
{
"version": "3.20191128",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.4305 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "082c1fще-0000-0000-0000-000000000000",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1200 sec.",
"cost": 0,
"result_count": 2,
"path": [
"v3",
"domain_analytics",
"technologies",
"locations"
],
"data": {
"api": "domain_analytics",
"function": "locations",
"se": "technologies"
},
"result": [
{
"location_name": "United States",
"country_iso_code": "US"
},
{
"location_name": "United Kingdom",
"country_iso_code": "GB"
}
]
}
]
}> id 示例用于展示字段格式。响应中的任务标识由本平台生成。
状态码
20000:请求成功。- 状态码:表示请求或任务执行异常。请结合
status_code和status_message判断原因。
实用场景
- 加载支持的位置列表:在 SEO 数据平台中动态展示可选国家和地区,前端使用过期或不受支持的位置数据。
- 校验分析请求参数:提交域名技术分析任务前,使用位置名称和 ISO 代码校验用户,降低参数错误率。
- 构建国家维度筛选器:按
country_iso_code生成国家筛选条件,支持按市场区域查看域名技术栈分布。 - 同步位置基础数据:定期获取最新位置列表并缓存到业务数据库,减少重复请求并提升查询性能。
- 规范化市场数据:使用标准 ISO 国家代码统一不同 SEO 报表中的地区标识,便于跨项目汇总和对比分析。