主题
domain_analytics/technologies/languages:获取技术识别语言列表
GET /v3/domain_analytics/technologies/languages
本接口使用 GET 方法,请求路径为:
/v3/domain_analytics/technologies/languages
用于获取域名技术分析支持的语言列表。当前调用不收取接口费用;如需核对扣费,请以响应头 X-SeerMarTech-Charge-CNY 为准。
请求信息
- 请求方法:
GET - 请求 URL:
https://api.seermartech.cn/v3/domain_analytics/technologies/languages - 请求参数:无
- 认证方式:Bearer Token
响应结构
接口返回 JSON 数据,顶层任务执行状态以及 tasks 任务数组。
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码,20000 表示请求成功 |
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 | 请求路径 |
data | object | 请求路径中的接口参数信息 |
result | array | 语言列表 |
result 语言字段
| 字段 | 类型 | 说明 |
|---|---|---|
language_name | string | 语言名称 |
language_code | string | 语言代码,遵循 ISO 639-1 标准 |
请求示例
cURL
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/domain_analytics/technologies/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/domain_analytics/technologies/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);TypeScript
typescript
import axios from "axios";
axios
.get(
"https://api.seermartech.cn/v3/domain_analytics/technologies/languages",
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
)
.then((response) => {
const result = response.data;
if (result.status_code === 20000) {
console.log("语言列表:", result);
} else {
console.error(
`错误码:${result.status_code},错误信息:${result.status_message}`
);
}
})
.catch((error) => {
console.error("请求失败:", error.message);
});Python
python
import requests
url = "https://api.seermartech.cn/v3/domain_analytics/technologies/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 System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
namespace SeerMarTechDemos
{
public static class Demos
{
public static async Task GetDomainAnalyticsLanguages()
{
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/domain_analytics/technologies/languages"
);
var result = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
Console.WriteLine("语言列表:");
Console.WriteLine(result);
}
else
{
Console.WriteLine($"HTTP 请求失败:{response.StatusCode}");
Console.WriteLine(result);
}
}
}
}响应示例
json
{
"version": "3.20191128",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1773 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "a1b2c3d4-e5f6-47a8-9012-abcdef123456",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1200 sec.",
"cost": 0,
"result_count": 2,
"path": [
"v3",
"domain_analytics",
"technologies",
"languages"
],
"data": {
"api": "domain_analytics",
"function": "languages",
"se": "technologies"
},
"result": [
{
"language_name": "英语",
"language_code": "en"
},
{
"language_name": "中文",
"language_code": "zh"
}
]
}
]
}状态码说明
20000:请求成功- 状态码:请求或任务执行失败,原因请结合
status_code与status_message判断。
实用场景
- 获取支持的语言代码,在技术分析任务中动态生成合法语言参数,因语言代码不受支持导致请求失败。
- 构建多语言 SEO 分析,根据接口返回的语言列表为不同市场创建统一的分析选项。
- 校验站点语言数据,将域名技术识别结果中的语言代码与标准 ISO 639-1 编码进行匹。
- 维护语言筛选器,在 SEO 数据平台或运营后台中自动展示最新的可用语言选项。
- 规范化跨区域报表维度,使用标准语言代码统一多个国家或语言市场的域名分析数据。