主题
域名技术栈分析
POST /v3/domain_analytics/technologies/domain_technologies/live
本接口使用 POST 方法,请求路径为:
/v3/domain_analytics/technologies/domain_technologies/live
用于分析指定域名使用的技术栈,并返回网站基础信息、联系方式、社交媒体链接及按类别整理的技术明细。
计费说明
每次请求均会产生费用。参考价约 ¥0.0720 / 次。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求说明
- 请求方法:
POST - 请求头:
Content-Type: application/json - 请求体使用 UTF-8 编码的 JSON 数组。
- 每次 Live API 请求只能提交 1 个任务。 平台限流以认证说明中的 30/60/120 次/分钟规则为准。
target支持域名,结果只针对指定域名返回。
请求参数
请求体示例:
json
[
{
"target": "example.com"
}
]| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
target | string | 是 | 分析的网站域名,例如 example.com。结果针对该域名返回。 |
响应字段
接口返回 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 | 当前任务提交时使用的请求参数。 |
result | array | 域名技术栈分析结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 返回数据类型,固定为 domain_technology_item。 |
domain | string | 被分析的域名。 |
title | string | 网站页面的 Meta Title。 |
description | string | 网站页面的 Meta Description。 |
meta_keywords | array | 网站页面的 Meta Keywords。 |
domain_rank | string | 目标域名的反向链接排名指标。 |
last_visited | string | 爬虫最近访问该域名的时间,格式为 yyyy-mm-dd hh-mm-ss +00:00,例如 2022-10-10 12:57:46 +00:00。 |
country_iso_code | string | 根据域名判断的网站所属国家或地区 ISO 代码。 |
language_code | string | 与目标域名的语言代码。 |
content_language_code | string | 目标网站使用的语言代码。 |
phone_numbers | array | 网站中检测到的联系号码。 |
emails | array | 网站中检测到的电子邮箱地址。 |
social_graph_urls | array | 网站社交信息中检测到的社交媒体 URL 或账号链接。 |
technologies | object | 目标域名使用的技术栈,按技术组和类别组织。 |
technologies 对象中的键名表示技术组,例如:
web_development:Web 开发技术add_ons:扩展组件servers:服务器及基础设施content:管理技术media:媒体技术location:位置服务技术
技术名称及分类请参考技术列表文档。
请求示例
cURL
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/domain_analytics/technologies/domain_technologies/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"target": "example.com"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/domain_analytics/technologies/domain_technologies/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
# Live 接口每次只能提交一个任务
payload = [
{
"target": "example.com"
}
]
response = requests.post(url, headers=headers, json=payload)
if response.status_code == 200:
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"API 错误:Code=%s Message=%s"
% (result.get("status_code"), result.get("status_message"))
)
else:
print("HTTP 错误:", response.status_code, response.text)TypeScript
typescript
import axios from "axios";
const url =
"https://api.seermartech.cn/v3/domain_analytics/technologies/domain_technologies/live";
const payload = [
{
// Live 接口每次只能提交一个任务
target: "example.com",
},
];
axios
.post(url, payload, {
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(
`API 错误:Code=${result.status_code} Message=${result.status_message}`
);
}
})
.catch((error) => {
console.error("请求失败:", error.response?.data || error.message);
});PHP
php
<?php
$apiUrl = 'https://api.seermartech.cn';
$path = '/v3/domain_analytics/technologies/domain_technologies/live';
$payload = json_encode([
[
// Live 接口每次只能提交一个任务
'target' => 'example.com'
]
], JSON_UNESCAPED_UNICODE);
$ch = curl_init($apiUrl . $path);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer smt_live_YOUR_KEY',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => $payload
]);
$response = curl_exec($ch);
if ($response === false) {
echo '请求失败:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);响应示例
json
{
"version": "0.1.20220819",
"status_code": 20000,
"status_message": "Ok.",
"time": "1.2276 sec.",
"cost": 0.01,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "7f5b2f58-6f1e-4cd7-a1a5-123456789abc",
"status_code": 20000,
"status_message": "Ok.",
"time": "1.2276 sec.",
"cost": 0.01,
"result_count": 1,
"path": [
"v3",
"domain_analytics",
"technologies",
"domain_technologies",
"live"
],
"data": {
"api": "domain_analytics",
"function": "domain_technologies",
"se": "technologies",
"target": "example.com"
},
"result": [
{
"type": "domain_technology_item",
"domain": "example.com",
"title": "Example Domain",
"description": "Example website description",
"meta_keywords": [],
"domain_rank": "0",
"last_visited": "2022-10-10 12:57:46 +00:00",
"country_iso_code": "",
"language_code": "",
"content_language_code": "",
"phone_numbers": [],
"emails": [],
"social_graph_urls": [],
"technologies": {
"web_development": {
"javascript_libraries": [],
"programming_languages": []
},
"add_ons": {
"wordpress_plugins": []
},
"servers": {
"performance": [],
"cdn": [],
"databases": []
},
"content": {
"photo_galleries": [],
"cms": [],
"blogs": []
},
"media": {
"photo_galleries": []
},
"location": {
"maps": []
}
}
}
]
}
]
}错误处理
建议根据顶层和任务级别的 status_code、status_message 实现错误处理逻辑:
- 顶层
status_code用于判断整体请求是否成功。 tasks_error表示失败任务数量。- 任务级
status_code用于判断任务是否执行成功。 status_message用于定位错误原因。- 当
status_code不为20000时,应记录请求参数、任务 ID 和错误信息,并根据业务需要进行重试或告警。
实用场景
- 识别竞品网站技术栈:分析竞争对手使用的 CMS、JavaScript 库、CDN 和服务器技术,为技术选型与竞品研究提供依据。
- 盘点客户网站基础设施:批量获取客户网站的技术组件、联系邮箱和电话,支持 SEO 销售线索筛选与客户画像构建。
- 发现技术迁移机会:检测网站当前使用的 CMS、插件及性能组件,定位老旧或可替换技术,网站改版和迁移方案制定。
- 补 SEO 审计信息:结合 Meta 标题、描述、语言、国家及技术栈数据,完善站点级 SEO 审计报告。
- 构建技术栈市场分析:按技术类别汇总多个域名的使用,评估不同 CMS、CDN 或开发框架在目标行业中的渗透率。