主题
Google 搜索意图实时分析
POST /v3/dataforseo_labs/google/search_intent/live
接口说明
POST https://api.seermartech.cn/v3/dataforseo_labs/google/search_intent/live
本接口用于获取最多 1,000 个的搜索意图数据。提交任务后,接口会返回每个的主要搜索意图及概率,同时返回可能的搜索意图及对应概率。
本平台根据数据和搜索结果数据识别以下四种搜索意图:
informational:信息型navigational:导航型commercial:商业调研型transactional:交易型
每次请求均会产生费用。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求体使用 UTF-8 编码的 JSON 格式。POST 请求体为数组,每次 Live API 请求只能一个任务对象。
- 每分钟最多可发送 2,000 次 API 请求
- 单次请求最多 1 个任务
- 同时发送的请求数最多为 30 个
keywords数组最多 1,000 个- 会被转换为小写格式
请求参数
请求体格式:
json
[
{
"keywords": [
"login page",
"audi a7",
"elon musk",
"milk store new york"
],
"language_name": "English",
"tag": "intent-analysis-demo"
}
]任务参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
keywords | array | 是 | 目标数组,使用 UTF-8 编码。最多可提交 1,000 个。会自动转换为小写。 |
language_name | string | 条件填 | 语言完整名称。未指定 language_code 时填。 |
language_code | string | 条件填 | 语言代码。未指定 language_name 时填。 |
tag | string | 否 | 自定义任务标识,用于识别任务并与响应结果匹,最多 255 个字符。提交的值会原样返回在响应的 data 对象中。 |
language_name 与 language_code 至少需要指定一个。
可通过以下接口获取支持的语言及名称、代码:
GET https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages
支持的语言
| 语言名称 | 语言代码 |
|---|---|
| Arabic | ar |
| Chinese (Traditional) | zh-TW |
| Czech | cs |
| Danish | da |
| Dutch | nl |
| English | en |
| Finnish | fi |
| French | fr |
| German | de |
| Hebrew | he |
| Hindi | hi |
| Italian | it |
| Japanese | ja |
| Korean | ko |
| Malay | ms |
| Norwegian (Bokmål) | nb |
| Polish | pl |
| Portuguese | pt |
| Romanian | ro |
| Russian | ru |
| Spanish | es |
| Swedish | sv |
| Thai | th |
| Ukrainian | uk |
| Vietnamese | vi |
| Bulgarian | bg |
| Croatian | hr |
| Serbian | sr |
| Slovenian | sl |
| Bosnian | bs |
| Greek | el |
| Hungarian | hu |
| Slovak | sk |
| Turkish | tr |
示例:
json
{
"language_name": "English",
"language_code": "en"
}响应结构
接口返回 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 | 请求路径信息。 |
data | object | 创建任务时提交的参数。 |
result | array | 任务结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
language_code | string | 请求中使用的语言代码。无数据时为 null。 |
items_count | integer | items 数组中的结果数量。 |
items | array | 搜索意图结果数组。 |
items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 请求中提交的目标。 |
keyword_intent | object | 当前的主要搜索意图。 |
secondary_keyword_intents | array | 当前的可能搜索意图。 |
keyword_intent 与 secondary_keyword_intents 字段
| 字段 | 类型 | 说明 |
|---|---|---|
label | string | 搜索意图类型,可选值为 informational、navigational、commercial、transactional。 |
probability | float | 搜索意图概率,1 表示概率最高。 |
请求示例
cURL
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/dataforseo_labs/google/search_intent/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"keywords": [
"login page",
"audi a7",
"elon musk",
"milk store new york"
],
"language_name": "English",
"tag": "intent-analysis-demo"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/dataforseo_labs/google/search_intent/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
post_data = [
{
"keywords": [
"login page",
"audi a7",
"elon musk",
"milk store new york",
],
"language_name": "English",
"tag": "intent-analysis-demo",
}
]
response = requests.post(url, headers=headers, json=post_data)
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 postData = [
{
keywords: [
"login page",
"audi a7",
"elon musk",
"milk store new york",
],
language_name: "English",
tag: "intent-analysis-demo",
},
];
axios
.post(
"https://api.seermartech.cn/v3/dataforseo_labs/google/search_intent/live",
postData,
{
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
{
"version": "0.1.20221214",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1285 sec.",
"cost": 0.0098,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": " ಎರಡು7f7d8e1-3c13-4c79-a7e9-4d6d8f8a1b22",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1120 sec.",
"cost": 0.0098,
"result_count": 1,
"path": [
"v3",
"dataforseo_labs",
"google",
"search_intent",
"live"
],
"data": {
"api": "dataforseo_labs",
"function": "search_intent",
"se_type": "google",
"language_name": "English",
"language_code": "en",
"keywords": [
"login page",
"audi a7",
"elon musk",
"milk store new york"
],
"tag": "intent-analysis-demo"
},
"result": [
{
"language_code": "en",
"items_count": 4,
"items": [
{
"keyword": "login page",
"keyword_intent": {
"label": "navigational",
"probability": 0.98
},
"secondary_keyword_intents": [
{
"label": "informational",
"probability": 0.02
}
]
},
{
"keyword": "audi a7",
"keyword_intent": {
"label": "commercial",
"probability": 0.72
},
"secondary_keyword_intents": [
{
"label": "informational",
"probability": 0.2
},
{
"label": "transactional",
"probability": 0.08
}
]
}
]
}
]
}
]
}> 示例中的任务 ID 用于展示响应结构,返回值会由系统动态生成。
状态码与错误处理
建议客户端同时检查以下字段:
- 顶层
status_code - 任务级
tasks[].status_code - 顶层或任务级
status_message tasks_error是否大于0
当请求失败、参数不合法或部分任务处理异常时,应根据状态码进行重试、修正参数或记录错误。完整错误码请参考 /v3/appendix/errors。
实用场景
- 划分搜索意图:将分为信息型、导航型、商业调研型和交易型,指导选题与页面类型规划。
- 筛选高转化:识别交易型和商业调研型,优落地页、产品页和转化页面的 SEO 资源。
- 优化集群结构:根据意图概率组织信息文章、评测、品牌页和购买页面,提升站点主题覆盖完整度。
- 评估库质量:批量分析已有单,发现意图与目标页面不匹的词,减少无效建设。
- 构建 SEO 自动分类流程:将搜索意图结果写管理系统或工作流,自动生成页面标签、优级和运营任务。