主题
按 HTML 词项查询域名(实时)
POST /v3/domain_analytics/technologies/domains_by_html_terms/live
接口说明
本接口使用 POST 方法,路径为:
text
POST https://api.seermartech.cn/v3/domain_analytics/technologies/domains_by_html_terms/live接口根据网站首页 HTML 中使用的标签、属性、属性值或文本查找符合条件的域名,并返回域名的技术画像、所属国家和语言,以及页面数据、联系方式、社交媒体链接等信息。
所有请求体使用 UTF-8 编码的 JSON 格式。请求参数需放在通用 POST 数组中。每平台限流以认证说明中的 30/60/120 次/分钟规则为准。
你可以通过参数设置:
- 目标 HTML 搜索词;
- 标题、描述或
meta keywords中的; - 搜索匹模式;
- 结果过滤与排序规则;
- 返回数量及分页位置。
计费说明
本接口按请求计费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
任务参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
search_terms | array | 是 | 目标 HTML 搜索词。可指定 HTML素、标签、属性、属性,或上述的组合。指定多个搜索词时返回首页 HTML 中同时搜索词的域名。最多支持 10 个搜索词。 |
keywords | array | 否 | 目标域名页面标题、描述或 meta keywords 中的。使用 UTF-8 编码,最多支持 10 个。 |
mode | string | 否 | 搜索模式。可选值:strict_entry、entry。默认值为 entry。 |
filters | array | 否 | 结果过滤条件。最多支持 8 个过滤条件。多个条件之间使用逻辑运算符 and 或 or。 |
order_by | array | 否 | 结果排序规则。最多支持 3 条排序规则。 |
limit | integer | 否 | 返回的最大域名数量。默认值为 100,最大值为 10000。 |
offset | integer | 否 | 结果数组的偏移量。默认值为 0。最大值为 9999,且 limit + offset 不得 10000。 |
offset_token | string | 否 | 后续请求使用的分页令牌。该值由上一次响应返回。使用此参数时,请求参数与上一次请求保持一致。 |
search_terms
该参数用于匹域名首页 HTML 中的目标,例如:
json
["data-attrid"]如果指定多个搜索词:
json
["data-attrid", "application/ld+json"]接口返回首页 HTML 同时这两个搜索词的域名。
mode
| 值 | 说明 |
|---|---|
strict_entry | 严格匹搜索词的顺序、间隔和分隔符。 |
entry | 忽略搜索词的顺序、间隔和分隔符进行匹。 |
filters
支持的比较运算符:
text
<、<=、>、>=、=、<>、in、not_in、like、not_like在 like 和 not_like 中,可以使用 % 匹任意长度的字符串空字符串。
示例:
json
[
["domain_rank", ">=", 100],
"and",
["country_iso_code", "in", ["US", "GB"]]
]多个条件可以组合:
json
[
["domain_rank", ">", 100],
"and",
[
["country_iso_code", "=", "US"],
"or",
["country_iso_code", "=", "CA"]
]
]order_by
可排序字段:
domain_rankdomainlast_visitedcountry_iso_codelanguage_codecontent_language_code
排序格式为:
text
字段名,排序方向排序方向:
asc:升序;desc:降序。
示例:
json
["domain_rank,desc", "last_visited,desc"]最多支持 3 条排序规则。
分页
使用 offset
例如:
json
{
"limit": 100,
"offset": 10
}表示跳过前 10 条结果,从第 11 条开始返回。
使用 offset_token
当需要获取后续结果时,使用响应中返回的 offset_token:
json
{
"search_terms": ["data-attrid"],
"limit": 100,
"offset_token": "返回结果中的分页令牌"
}使用 offset_token 时,除 offset_token 外的参数与原始请求一致。分页令牌针对每个后续任务唯一。
请求示例
curl
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/domain_analytics/technologies/domains_by_html_terms/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"search_terms": ["data-attrid"],
"keywords": ["analytics"],
"mode": "entry",
"order_by": ["last_visited,desc"],
"limit": 10,
"offset": 0
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/domain_analytics/technologies/domains_by_html_terms/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
payload = [
{
"search_terms": ["data-attrid"],
"order_by": ["last_visited,desc"],
"limit": 10,
"offset": 0,
}
]
response = requests.post(url, headers=headers, json=payload, timeout=60)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"请求失败,错误码:{},错误信息:{}".format(
result.get("status_code"),
result.get("status_message"),
)
)TypeScript
typescript
import axios from "axios";
const response = await axios.post(
"https://api.seermartech.cn/v3/domain_analytics/technologies/domains_by_html_terms/live",
[
{
search_terms: ["data-attrid"],
order_by: ["last_visited,desc"],
limit: 10,
offset: 0,
},
],
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
},
);
if (response.data.status_code === 20000) {
console.log(response.data);
} else {
console.error(
`请求失败,错误码:${response.data.status_code},错误信息:${response.data.status_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 | 任务结果数组。 |
任务字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 | 本次 POST 请求中提交的参数。 |
result | array | 任务结果数组。 |
完整状态码及错误信息请参考错误码文档。
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
total_count | integer | 数据库中符合条件的项目总数。 |
items_count | integer | 当前响应中返回的项目数量。 |
offset | integer | 本次请求使用的偏移量。 |
offset_token | string | 用于获取后续结果的分页令牌。 |
items | array | 域名结果数组。 |
items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 项目类型,固定为 domain_technology_item。 |
domain | string | 域名。 |
title | string | 域名首页的页面标题。 |
description | string | 域名首页的页面描述。 |
meta_keywords | array | 域名首页的 meta keywords。 |
domain_rank | string / integer / null | 目标域名的反向链接排名指标。 |
last_visited | string | 爬虫最近访问该域名的时间,使用 UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
country_iso_code | string / null | 根据域名判断的所属国家或地区 ISO 代码。 |
language_code | string / null | 根据域名判断的语言代码。 |
content_language_code | string / null | 目标域名页面所使用的语言代码。 |
phone_numbers | array / null | 网站中检测到的联系电话。 |
emails | array / null | 网站中检测到的电子邮箱地址。 |
social_graph_urls | array / null | 网站社交图谱中检测到的社交媒体链接或账号。 |
technologies | object | 目标域名使用的技术及技术分类信息。 |
last_visited 示例:
text
2022-10-10 12:57:46 +00:00technologies 对象可能以下技术分类:
servers:服务器、反向代理、数据库等;web_development:前端框架、JavaScript 库、页面构建器、编程语言等;analytics:分析、标签管理器等;content:CMS、博客、翻译等;add_ons:插件、主题等;marketing:SEO、广告、营销自动化、邮件营销等;sales:电子商务技术;location:地图服务;media:图片库、视频播放器等;communication:通信及邮件;other:组件。
响应示例
json
{
"version": "0.1.20221214",
"status_code": 20000,
"status_message": "Ok.",
"time": "2.7783 sec.",
"cost": 0.01,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status_code": 20000,
"status_message": "Ok.",
"time": "2.7783 sec.",
"cost": 0.01,
"result_count": 1,
"path": [
"v3",
"domain_analytics",
"technologies",
"domains_by_html_terms",
"live"
],
"data": {
"api": "domain_analytics",
"function": "domains_by_html_terms",
"se": "technologies",
"search_terms": [
"data-attrid"
],
"order_by": [
"last_visited,desc"
],
"limit": 10,
"offset": 0
},
"result": [
{
"total_count": 1234,
"items_count": 1,
"offset": 0,
"offset_token": "example_offset_token",
"items": [
{
"type": "domain_technology_item",
"domain": "example.com",
"title": "Example Website",
"description": "Example website description.",
"meta_keywords": [
"example",
"technology"
],
"domain_rank": 199,
"last_visited": "2022-12-29 03:13:49 +00:00",
"country_iso_code": "US",
"language_code": "en",
"content_language_code": "en",
"phone_numbers": null,
"emails": null,
"social_graph_urls": null,
"technologies": {
"servers": {
"web_servers": [
{
"name": "Example Web Server",
"version": "1.0"
}
]
},
"web_development": {
"javascript_libraries": [
{
"name": "Example Library",
"version": "1.0"
}
]
},
"analytics": {
"analytics": [
{
"name": "Example Analytics",
"version": null
}
]
}
}
}
]
}
]
}
]
}实用场景
- 定位使用特定 HTML 标签或属性的域名,批量发现采用目标技术或页面组件的网站,为竞品研究和技术市场分析提供样本。
- 筛选使用指定的域名,从页面标题、描述或中识别目标行业网站,支持潜在客户挖掘与外链资源拓展。
- 按技术画像整理目标网站,结合
technologies、语言和国家字段构建细分网站库,化 SEO 市场调研。 - 按域名排名和最近访问时间排序结果,优分析活跃度较高或反向链接价值较高的网站,提高 SEO 线索筛选效率。
- 使用分页令牌获取大规模结果,持续拉取单次返回上限的域名数据,支持网站技术普查和长期数据监测。