Skip to content

Domain Analytics Technologies 可用筛选器

本文说明 Domain Analytics Technologies API 可使用的筛选条件,以及筛选器的写法与字段规则。

需要注意:

  • 筛选条件是基于响应中 result 数组的对象定义的,使用时需与对应端点返回的数据结构保持一致;
  • 可通过获取可用筛选器接口查看完整字段列表;
  • 本接口不收费,扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

获取可用筛选器

请求方式: GET请求地址:

https://api.seermartech.cn/v3/domain_analytics/technologies/available_filters

该接口返回 Domain Analytics Technologies 端点支持的筛选参数列表。返回结果会按可使用的端点进行分组。

响应结构

接口返回标准 JSON 数据,顶层 tasks 数组。

字段名类型说明
versionstringAPI 当前版本
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任务状态信息
timestring任务执行时间,单位秒
costfloat该任务费用,单位 USD
result_countintegerresult 数组中的数量
patharray请求路径
dataobjectGET 请求 URL 中传的参数
resultarray可用于数据筛选的完整参数列表

筛选器写法

Domain Analytics Technologies API 中的 filters 参数为数组,用于定义结果过滤条件。

字段名类型说明
filtersarray结果过滤参数数组

基本规则

  • 最多可同时传 8 个筛选条件
  • 当有多个条件时,在条件之间逻辑运算符:
  • and
  • or

结构示例

json
"filters": [
 ["domain_rank", ">", 1000],
 "and",
 ["country_iso_code", "=", "US"]
]

每个筛选条件通常由以下三部分组成:

类型说明
filtered_fieldstring支持筛选的字段名
filter_operatorstring筛选运算符
filter_valuemixed筛选值,格式需与字段类型一致

支持筛选的字段

可用于筛选的字段:

  • domain_rank
  • last_visited
  • country_iso_code
  • language_code
  • content_language_code

此外,domain 字段在特定端点支持,见下文说明。

运算符说明

1)数值类型 num

适用于如 domain_rank 之类的数值字段。

支持的运算符:

  • <
  • <=
  • >
  • >=
  • =
  • <>
  • in
  • not_in

如果使用 innot_in,则 filter_value须为数组。

示例:

json
"filters": [
 ["domain_rank", "in", [100, 200, 300]]
]

2)字符串类型 str

适用于如国家代码、语言代码、域名等字符串字段。

支持的运算符:

  • like
  • not_like
  • =
  • <>
  • regex
  • not_regex

说明:

  • likenot_like 支持使用 % 作为通符,匹 0 个或多个任意字符;
  • regexnot_regex 支持使用字符串值,并遵循 RE2 正则语法。

示例:

json
"filters": [
 ["domain", "like", "%.edu"]
]

3)时间类型 time

适用于 last_visited

支持的运算符:

  • <
  • >

时间格式为:

yyyy-mm-dd hh-mm-ss +00:00

示例:

2021-01-29 15:02:37 +00:00

示例筛选:

json
"filters": [
 ["last_visited", ">", "2021-01-29 15:02:37 +00:00"]
]

可用筛选字段详解

domain_rank

  • 类型:num
  • 含义:域名的外链权重排名
  • 支持运算符:<, <=, >, >=, =, <>, in, not_in

示例:

json
"filters": [
 ["domain_rank", ">", 1000]
]

domain

  • 类型:str
  • 含义:域名
  • 限制: /v3/domain_analytics/technologies/domains_by_html_terms/live/ 端点中支持
  • 支持运算符:=, <>, like, not_like

说明:

  • 可合 % 使用模糊匹。

示例:

json
"filters": [
 ["domain", "like", "%.gov"]
]

last_visited

  • 类型:time
  • 含义:本平台爬虫最近一次访问该域名的时间
  • 支持运算符:<, >

时间格式:

yyyy-mm-dd hh-mm-ss +00:00

示例:

json
"filters": [
 ["last_visited", ">", "2021-01-29 15:02:37 +00:00"]
]

country_iso_code

  • 类型:str
  • 含义:域名所属国家的 ISO 代码
  • 支持运算符:=, <>, like, not_like

示例:

json
"filters": [
 ["country_iso_code", "=", "US"]
]

language_code

  • 类型:str
  • 含义:域名语言
  • 支持运算符:=, <>, like, not_like

示例:

json
"filters": [
 ["language_code", "=", "en"]
]

content_language_code

  • 类型:str
  • 含义:页面语言
  • 支持运算符:=, <>, like, not_like

示例:

json
"filters": [
 ["content_language_code", "=", "en"]
]

代码示例

cURL

bash
curl --location --request GET "https://api.seermartech.cn/v3/domain_analytics/technologies/available_filters" \
--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/available_filters"
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(f'error. Code: {result.get("status_code")} Message: {result.get("status_message")}')

TypeScript

typescript
import axios from "axios";

// 获取 Domain Analytics Technologies 支持的可用筛选器
axios({
 method: "get",
 url: "https://api.seermartech.cn/v3/domain_analytics/technologies/available_filters",
 headers: {
 Authorization: "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
 }
})
 .then(function (response) {
 const result = response.data;
 console.log(result);
 })
 .catch(function (error) {
 console.log(error);
 });

响应示例

以下为获取可用筛选器时的响应结构示例:

json
{
 "version": "0.1.20221214",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.0352 sec.",
 "cost": 0,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "data": {
 "api": "domain_analytics",
 "function": "available_filters",
 "se": "technologies"
 },
 "result": []
 }
 ]
}

错误码说明

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

常见判断方式:

  • 20000:请求成功;
  • 状态码:表示请求参数、权限、额度或服务处理存在异常。

使用建议

  • 在接查询端点前,调用 /v3/domain_analytics/technologies/available_filters 获取该类接口支持的筛选字段;
  • 构造多条件筛选时,优明确字段类型,再选择对应的运算符;
  • 使用 time 类型字段时,务传 UTC 时间字符串;
  • 使用 in / not_in 时,筛选值使用数组;
  • domain 字段不是所有端点都可用限指定端点使用。

实用场景

  • 筛选高价值技术站点:按 domain_rank 过滤高权重域名,快速锁定更有参考价值的竞品或潜在合作网站。
  • 限定目标国家市场:按 country_iso_code 过滤特定国家站点,用于区域化 SEO 研究和本地化市场分析。
  • 识别特定语言网站:按 language_codecontent_language_code 过滤语言类型,支持多语种布局与搜索策略制定。
  • 控制数据新鲜度:按 last_visited 筛选最近被抓取过的域名,优分析更新更及时的技术栈数据。
  • 缩小特定域名集合:在支持的端点中按 domain 做精确或模糊匹,快速定位某类站群、教育站、政府站等样本集合。

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