主题
Google 域名排名概览(实时)
POST /v3/dataforseo_labs/google/domain_rank_overview/live
本接口使用 POST 方法,路径为:
/v3/dataforseo_labs/google/domain_rank_overview/live
用于获取指定域名在 Google 自然搜索和付费搜索中的排名与流量数据 SERP 排名分布、预估月流量、流量价值以及排名变化。
数据每周更新,最新更新时间可通过状态接口查询。响应中的域名数据按以下顺序排列:
- 按
location_code数值升序排列,例如2840排在3000之前。 - 对于相同
location_code的数据,再按language_code字母升序排列,例如en排在es之前。
请求说明
- 请求方法:
POST - 请求地址:
https://api.seermartech.cn/v3/dataforseo_labs/google/domain_rank_overview/live - 请求格式:
application/json - 请求体:JSON 数组,每次调用最多 1 个任务 平台限流以认证说明中的 30/60/120 次/分钟规则为准
- 并发限制:同时最多发送 30 个请求
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
请求体中的每个数组代表一个任务。
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
target | string | 是 | 目标域名。请勿 https:// 或 www.,例如 example.com。 |
location_name | string | 否 | 地区名称,例如 United Kingdom。使用此参数时无需填写 location_code。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区。忽略该参数时,返回所有可用地区的数据。 |
location_code | integer | 否 | 地区代码,例如 2840。使用此参数时无需填写 location_name。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区代码。忽略该参数时,返回所有可用地区的数据。 |
language_name | string | 否 | 语言名称,例如 English。使用此参数时无需填写 language_code。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用语言。忽略该参数时,返回所有可用语言的数据。 |
language_code | string | 否 | 语言代码,例如 en。使用此参数时无需填写 language_name。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用语言代码。忽略该参数时,返回所有可用语言的数据。 |
ignore_synonyms | boolean | 否 | 是否忽略高度相似的。设为 true 时,排名和流量计算将排除高度相似使用同义词组中的主计算。默认值为 false。 |
limit | integer | 否 | 每个域名最多返回的结果数。默认值为 100,最大值为 1000。 |
offset | integer | 否 | 结果偏移量。默认值为 0。例如设置为 10 时,将跳过结果数组中的前 10 个 items。 |
tag | string | 否 | 用户自定义任务标识,最长 255 个字符。可用于识别任务并将请求与响应匹。提交的值会原样返回在响应的 data 对象中。 |
location_name 与 location_code 二选一;language_name 与 language_code 二选一。
请求示例
cURL
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/dataforseo_labs/google/domain_rank_overview/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"target": "example.com",
"location_name": "United States",
"language_name": "English",
"limit": 100
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/dataforseo_labs/google/domain_rank_overview/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
# 请求体是 JSON 数组
payload = [
{
"target": "example.com",
"location_name": "United States",
"language_name": "English",
}
]
response = requests.post(url, headers=headers, json=payload)
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 payload = [
{
target: "example.com",
location_name: "United States",
language_name: "English",
},
];
axios
.post(
"https://api.seermartech.cn/v3/dataforseo_labs/google/domain_rank_overview/live",
payload,
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
)
.then((response) => {
// 处理响应数据
console.log(response.data);
})
.catch((error) => {
console.error("请求失败:", error.response?.data || error.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 | 任务结果数组。 |
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 字段
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型,此接口为 google。 |
target | string | 请求中的目标域名。 |
location_code | integer | 地区代码。 |
language_code | string | 语言代码。 |
total_count | integer | 数据库中与请求条件的结果总数。 |
items_count | integer | items 数组返回的结果数。 |
items | array | 含排名和流量数据的结果列表。 |
items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
location_code | integer | 地区代码。 |
language_code | string | 语言代码。 |
metrics | object | 指定域名的排名和流量指标。 |
metrics.organic:自然搜索指标
organic 对象域名在自然搜索结果中的排名分布、流量和排名变化数据。
| 字段 | 类型 | 说明 |
|---|---|---|
pos_1 | integer | 域名排名第 1 的自然搜索结果数量。 |
pos_2_3 | integer | 域名排名第 2 至第 3 的自然搜索结果数量。 |
pos_4_10 | integer | 域名排名第 4 至第 10 的自然搜索结果数量。 |
pos_11_20 | integer | 域名排名第 11 至第 20 的自然搜索结果数量。 |
pos_21_30 | integer | 域名排名第 21 至第 30 的自然搜索结果数量。 |
pos_31_40 | integer | 域名排名第 31 至第 40 的自然搜索结果数量。 |
pos_41_50 | integer | 域名排名第 41 至第 50 的自然搜索结果数量。 |
pos_51_60 | integer | 域名排名第 51 至第 60 的自然搜索结果数量。 |
pos_61_70 | integer | 域名排名第 61 至第 70 的自然搜索结果数量。 |
pos_71_80 | integer | 域名排名第 71 至第 80 的自然搜索结果数量。 |
pos_81_90 | integer | 域名排名第 81 至第 90 的自然搜索结果数量。 |
pos_91_100 | integer | 域名排名第 91 至第 100 的自然搜索结果数量。 |
etv | float | 预估自然搜索月流量。该值根据域名排名的点击率(CTR)与搜索量计算得出。 |
count | integer | 含该域名的自然搜索结果总数。 |
estimated_paid_traffic_cost | float | 将预估自然流量通过搜索广告获取时的预估月度成本。该指标基于自然搜索 etv 与付费搜索 CPC 计算。 |
is_new | integer | 新增排名数量,即本次发现的新排名或结果数量。 |
is_up | integer | 排名上升的数量。 |
is_down | integer | 排名下降的数量。 |
is_lost | integer | 丢失排名的数量,即上次检查时出现在 SERP、本次检查未发现的数量。 |
metrics.paid:付费搜索指标
paid 对象域名在付费搜索结果中的排名分布、流量和排名变化数据。
| 字段 | 类型 | 说明 |
|---|---|---|
pos_1 | integer | 域名排名第 1 的付费搜索结果数量。 |
pos_2_3 | integer | 域名排名第 2 至第 3 的付费搜索结果数量。 |
pos_4_10 | integer | 域名排名第 4 至第 10 的付费搜索结果数量。 |
pos_11_20 | integer | 域名排名第 11 至第 20 的付费搜索结果数量。 |
pos_21_30 | integer | 域名排名第 21 至第 30 的付费搜索结果数量。 |
pos_31_40 | integer | 域名排名第 31 至第 40 的付费搜索结果数量。 |
pos_41_50 | integer | 域名排名第 41 至第 50 的付费搜索结果数量。 |
pos_51_60 | integer | 域名排名第 51 至第 60 的付费搜索结果数量。 |
pos_61_70 | integer | 域名排名第 61 至第 70 的付费搜索结果数量。 |
pos_71_80 | integer | 域名排名第 71 至第 80 的付费搜索结果数量。 |
pos_81_90 | integer | 域名排名第 81 至第 90 的付费搜索结果数量。 |
pos_91_100 | integer | 域名排名第 91 至第 100 的付费搜索结果数量。 |
etv | float | 预估付费搜索月流量。该值根据域名排名的点击率(CTR)与搜索量计算得出。 |
count | integer | 含该域名的付费搜索结果总数。 |
estimated_paid_traffic_cost | float | 基于 etv 与 CPC 估算的付费搜索月流量成本。 |
is_new | integer | 新增排名数量。 |
is_up | integer | 排名上升的数量。 |
is_down | integer | 排名下降的数量。 |
is_lost | integer | 丢失排名的数量,即上次检查时出现、本次检查未发现的数量。 |
响应示例
json
{
"version": "0.1.20220216",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2946 sec.",
"cost": 0.0101,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2500 sec.",
"cost": 0.0101,
"result_count": 1,
"path": [
"v3",
"dataforseo_labs",
"google",
"domain_rank_overview",
"live"
],
"data": {
"api": "dataforseo_labs",
"function": "domain_rank_overview",
"se_type": "google",
"target": "example.com",
"language_name": "English",
"location_code": 2840
},
"result": [
{
"se_type": "google",
"target": "example.com",
"location_code": 2840,
"language_code": "en",
"total_count": 1,
"items_count": 1,
"items": [
{
"se_type": "google",
"location_code": 2840,
"language_code": "en",
"metrics": {
"organic": {
"pos_1": 12,
"pos_2_3": 28,
"pos_4_10": 96,
"pos_11_20": 140,
"pos_21_30": 115,
"pos_31_40": 90,
"pos_41_50": 70,
"pos_51_60": 58,
"pos_61_70": 42,
"pos_71_80": 30,
"pos_81_90": 22,
"pos_91_100": 15,
"etv": 12500.5,
"count": 818,
"estimated_paid_traffic_cost": 3840.2,
"is_new": 35,
"is_up": 120,
"is_down": 78,
"is_lost": 21
},
"paid": {
"pos_1": 2,
"pos_2_3": 5,
"pos_4_10": 13,
"pos_11_20": 0,
"pos_21_30": 0,
"pos_31_40": 0,
"pos_41_50": 0,
"pos_51_60": 0,
"pos_61_70": 0,
"pos_71_80": 0,
"pos_81_90": 0,
"pos_91_100": 0,
"etv": 860.4,
"count": 20,
"estimated_paid_traffic_cost": 1120.8,
"is_new": 3,
"is_up": 7,
"is_down": 4,
"is_lost": 1
}
}
}
]
}
]
}
]
}如需处理异常,建议根据顶层 status_code、任务级 status_code 及对应的 status_message 实现错误处理逻辑。
实用场景
- 评估域名自然搜索表现:统计目标网站在各排名区间的数量和预估流量,定位首页覆盖率与流量增长空间。
- 对比自然搜索与付费搜索价值:结合
organic和paid指标,判断哪些适合持续 SEO,哪些需要通过广告补。 - 监控域名排名变化:使用
is_new、is_up、is_down和is_lost追踪排名波动,及时发现算法变化或表现异常。 - 分析不同市场的搜索表现:按地区和语言分别请求数据,比较网站在不同国家、地区及语言市场中的排名和流量潜力。
- 估算 SEO 流量的广告替代成本:使用
estimated_paid_traffic_cost估算获取同等搜索流量所需的广告预算,为 SEO 投资回报分析提供依据。