Skip to content

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"
  }
]

任务参数

参数类型说明
keywordsarray目标数组,使用 UTF-8 编码。最多可提交 1,000 个。会自动转换为小写。
language_namestring条件填语言完整名称。未指定 language_code 时填。
language_codestring条件填语言代码。未指定 language_name 时填。
tagstring自定义任务标识,用于识别任务并与响应结果匹,最多 255 个字符。提交的值会原样返回在响应的 data 对象中。

language_namelanguage_code 至少需要指定一个。

可通过以下接口获取支持的语言及名称、代码:

GET https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages

支持的语言

语言名称语言代码
Arabicar
Chinese (Traditional)zh-TW
Czechcs
Danishda
Dutchnl
Englishen
Finnishfi
Frenchfr
Germande
Hebrewhe
Hindihi
Italianit
Japaneseja
Koreanko
Malayms
Norwegian (Bokmål)nb
Polishpl
Portuguesept
Romanianro
Russianru
Spanishes
Swedishsv
Thaith
Ukrainianuk
Vietnamesevi
Bulgarianbg
Croatianhr
Serbiansr
Sloveniansl
Bosnianbs
Greekel
Hungarianhu
Slovaksk
Turkishtr

示例:

json
{
  "language_name": "English",
  "language_code": "en"
}

响应结构

接口返回 JSON 数据 tasks 数组。

顶层字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger请求级状态码。完整错误码请参考错误码文档。
status_messagestring请求级状态说明。
timestring请求执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务总数。
tasks_errorintegertasks 数组中返回错误的任务数。
tasksarray任务结果数组。

任务字段

字段类型说明
idstring任务唯一标识,UUID 格式。
status_codeinteger任务状态码,通常在 1000060000 范围。
status_messagestring任务状态说明。
timestring任务执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的结果数量。
patharray请求路径信息。
dataobject创建任务时提交的参数。
resultarray任务结果数组。

result 字段

字段类型说明
language_codestring请求中使用的语言代码。无数据时为 null
items_countintegeritems 数组中的结果数量。
itemsarray搜索意图结果数组。

items 字段

字段类型说明
keywordstring请求中提交的目标。
keyword_intentobject当前的主要搜索意图。
secondary_keyword_intentsarray当前的可能搜索意图。

keyword_intentsecondary_keyword_intents 字段

字段类型说明
labelstring搜索意图类型,可选值为 informationalnavigationalcommercialtransactional
probabilityfloat搜索意图概率,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 自动分类流程:将搜索意图结果写管理系统或工作流,自动生成页面标签、优级和运营任务。

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