Skip to content

批量流量预估

接口说明

该接口用于批量获取最多 1,000 个目标的月度预估流量数据,目标类型支持:

  • 域名
  • 子域名
  • 网页 URL

除自然搜索流量预估外,响应中还会分别返回以下结果类型的流量数据:

  • 付费搜索
  • 精选摘要(featured snippet)
  • 本地(local pack)

流量值 etv 的计算逻辑为:目标在对应搜索结果类型中参与排名的点击率(CTR)与搜索量的乘积累加所得。

请求地址

POST https://api.seermartech.cn/v3/dataforseo_labs/google/bulk_traffic_estimation/live

计费说明

该接口按请求计费。

由于参考文档未提供固定单价,无法换算固定人民币参考价。扣费以响应头 X-SeerMarTech-Charge-CNY 为准

请求限制

  • POST 数据需使用 JSON(UTF-8 编码)
  • 请求体格式为 JSON 数组:[{ ... }]
  • 每分钟最多可发送 2000 次 API 调用
  • 最大并发请求数为 30

请求参数

以下为任务对象中的可用字段说明。

字段名类型说明
targetsarray。目标域名、子域名或网页列表。域名和子域名不要 https://www.;网页使用完整绝对 URL,并 https://www.。最多可设置 1000 个目标。
location_namestring地区完整名称。使用该字段时无需再传 location_code。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区列表。忽略该字段则返回所有可用地区的数据。示例:United Kingdom
location_codeinteger地区编码。使用该字段时无需再传 location_name。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区列表。忽略该字段则返回所有可用地区的数据。示例:2840
language_namestring语言完整名称。使用该字段时无需再传 language_code。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用语言列表。忽略该字段则返回所有可用语言的数据。示例:English
language_codestring语言编码。使用该字段时无需再传 language_name。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用语言列表。忽略该字段则返回所有可用语言的数据。示例:en
item_typesarray可选。指定响应中的搜索结果类型。注意: 如果数组中非 organic 的类型,结果会按数组中的第一个类型排序。
ignore_synonymsboolean可选。是否忽略高度相似。设为 true 时返回核心数据,排除高度相似。默认值:false
tagstring可选。用户自定义任务标识,最长 255 个字符。可用于在结果中标记和匹任务;响应的 data 对象中会返回该值。

item_types 可选值

原始文档该处示例缺失,结合接口语义,常见结果类型:

  • organic
  • paid
  • featured_snippet
  • local_pack

响应结构

接口返回 JSON 编码数据,顶层 tasks 数组。

顶层字段

字段名类型说明
versionstring当前 API 版本
status_codeinteger通用状态码,完整列表参见 /v3/appendix/errors
status_messagestring通用信息描述,完整列表参见 /v3/appendix/errors
timestring执行耗时,单位秒
costfloat本次请求总费用,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorinteger返回错误的任务数量
tasksarray任务数组

tasks[] 字段

字段名类型说明
idstring任务唯一标识,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000,完整列表参见 /v3/appendix/errors
status_messagestring任务信息描述
timestring任务执行耗时,单位秒
costfloat该任务费用,单位 USD
result_countintegerresult 数组中的数量
patharrayURL 路径
dataobject与请求中提交的参数基本一致
resultarray结果数组

result[] 字段

字段名类型说明
se_typestring搜索引擎类型
location_codeinteger请求中的地区编码;如无数据则为 null
language_codestring请求中的语言编码;如无数据则为 null
total_countinteger数据库中与请求的结果总数
items_countintegeritems 数组返回的结果数量
itemsarray流量预估数据列表

items[] 字段

字段名类型说明
se_typestring搜索引擎类型
targetstring请求中的目标域名 / 子域名 / 页面
metricsobject该目标的流量指标数据

metrics 字段

organic

字段名类型说明
etvfloat自然搜索月预估流量
countinteger含该目标的自然搜索 SERP 总数
字段名类型说明
etvfloat付费搜索月预估流量
countinteger含该目标的付费搜索 SERP 总数
字段名类型说明
etvfloat精选摘要带来的月预估流量
countinteger含该目标的精选摘要结果总数

local_pack

字段名类型说明
etvfloat本地结果带来的月预估流量
countinteger含该目标的本地结果总数

请求示例

cURL

bash
curl --location --request POST "https://api.seermartech.cn/v3/dataforseo_labs/google/bulk_traffic_estimation/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
 {
 "targets": [
 "cnn.com",
 "forbes.com",
 "https://www.example.com/page"
 ],
 "location_code": 2840,
 "language_code": "en",
 "item_types": [
 "organic",
 "paid",
 "featured_snippet",
 "local_pack"
 ],
 "ignore_synonyms": false,
 "tag": "bulk-traffic-check-001"
 }
]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/dataforseo_labs/google/bulk_traffic_estimation/live"
headers = {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
}

payload = [
 {
 "targets": [
 "本平台.com",
 "cnn.com",
 "forbes.com"
 ],
 "location_name": "United States",
 "language_name": "English",
 "item_types": [
 "organic",
 "paid"
 ]
 }
]

response = requests.post(url, json=payload, headers=headers)
print(response.json)

TypeScript

typescript
import axios from "axios";

const postArray = [
 {
 targets: [
 "cnn.com",
 "forbes.com",
 "https://www.example.com/page"
 ],
 location_name: "United States",
 language_name: "English",
 item_types: ["organic", "paid"]
 }
];

axios({
 method: "post",
 url: "https://api.seermartech.cn/v3/dataforseo_labs/google/bulk_traffic_estimation/live",
 headers: {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
 },
 data: postArray
})
 .then((response) => {
 // 输出接口响应
 console.log(response.data);
 })
 .catch((error) => {
 console.error(error);
 });

响应示例

原始文档示例存在结构缺失,以下示例根据字段说明整理为可读格式。

json
{
 "version": "0.1.20210917",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.2930 sec.",
 "cost": 0.0103,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "id": "12345678-1234-1234-1234-1234567890ab",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.2811 sec.",
 "cost": 0.0103,
 "result_count": 1,
 "path": [
 "v3",
 "dataforseo_labs",
 "google",
 "bulk_traffic_estimation",
 "live"
 ],
 "data": {
 "api": "dataforseo_labs",
 "function": "bulk_traffic_estimation",
 "se_type": "google",
 "targets": [
 "cnn.com",
 "forbes.com",
 "https://www.example.com/page"
 ],
 "location_code": 2840,
 "language_code": "en",
 "item_types": [
 "organic",
 "paid"
 ]
 },
 "result": [
 {
 "se_type": "google",
 "location_code": 2840,
 "language_code": "en",
 "total_count": 3,
 "items_count": 3,
 "items": [
 {
 "se_type": "google",
 "target": "cnn.com",
 "metrics": {
 "organic": {
 "etv": 124530.44,
 "count": 18421
 },
 "paid": {
 "etv": 2034.15,
 "count": 388
 },
 "featured_snippet": {
 "etv": 512.67,
 "count": 94
 },
 "local_pack": {
 "etv": 0,
 "count": 0
 }
 }
 },
 {
 "se_type": "google",
 "target": "forbes.com",
 "metrics": {
 "organic": {
 "etv": 98411.76,
 "count": 15309
 },
 "paid": {
 "etv": 1488.27,
 "count": 201
 },
 "featured_snippet": {
 "etv": 603.92,
 "count": 110
 },
 "local_pack": {
 "etv": 0,
 "count": 0
 }
 }
 },
 {
 "se_type": "google",
 "target": "https://www.example.com/page",
 "metrics": {
 "organic": {
 "etv": 213.48,
 "count": 29
 },
 "paid": {
 "etv": 0,
 "count": 0
 },
 "featured_snippet": {
 "etv": 12.41,
 "count": 2
 },
 "local_pack": {
 "etv": 0,
 "count": 0
 }
 }
 }
 ]
 }
 ]
 }
 ]
}

错误处理

建议对以下字段建立统一错误处理机制:

  • 顶层 status_code / status_message
  • 任务级 tasks[].status_code / tasks[].status_message

完整错误码与说明请参考:

  • /v3/appendix/errors

常见处理建议:

  • 20000:请求成功
  • 20000:根据状态码记录日志、重试或提示参数错误
  • tasks_error 大于 0:说明部分任务执行失败,应逐个检查 tasks[]

使用要点

  1. targets 中的域名和子域名不要带协议头与 www.
  2. 页面 URL须为完整绝对地址
  3. 如同时传 location_namelocation_code,通常只需保留一
  4. 如未指定地区或语言,接口会尝试返回所有可用范围的数据
  5. item_types 中第一个值不是 organic 时,结果排序将优依据该类型

实用场景

  • 批量评估竞品站点流量规模:一次性比较多个竞品域名在自然搜索、付费搜索中的预估流量,快速判断市场份额与投放强度。
  • 筛选高价值子域或栏目页:按子域名或页面维度拉取流量预估,定位最有 SEO 价值的板块,资源分。
  • 识别 SERP 版位机会:分别查看 featured_snippetlocal_pack 的流量贡献,判断是否值得优化精选摘要或本地化排名。
  • 监控投放与自然流量结构:同时对比 organicpaidetvcount,识别品牌是更依赖 SEO 还是 SEM 获取流量。
  • 构建批量域名评分模型:将流量预估、出现次数与地区语言维度结合,用于域名挖掘、渠道评估或潜在合作站点筛选。

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