> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 设置实时“DataForSEO Trends Explore”任务

> 最多五个 keywords 的兴趣曲线，即 Google Trends。

最多五个 `keywords` 的兴趣曲线，即 Google Trends。返回 `keywords`、`type`、`location_code`、`language_code`、`datetime`、`items_count` 和 `items`。`type` 选 web / news / images / youtube / shopping，`date_from`、`date_to` 设窗口。实测 21.7 KB。响应包在信封里：数据在 `tasks[0].result`，成败在 `tasks[0].status_code`——请求被拒时 HTTP 仍是 200。 Trends 给的是相对热度不是绝对量；要具体数字用 `post_dataforseo_keywords_gads_search_volume_live`。

## 示例

<CodeGroup>
  ```bash REST theme={null}
  curl -X POST "https://api.aisa.one/apis/v1/dataforseo/keywords_data/dataforseo_trends/explore/live" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '[{"keywords": "...", "location_name": "...", "location_code": "..."}]'
  ```

  ```jsonc MCP theme={null}
  // 把整段复制给 Claude Code、Codex、Cursor 或任意 coding agent。
  // 连接、授权、跑通这个例子需要的东西都在里面 ——
  // 不用粘贴任何 key，浏览器里点一次 Allow 就好。
  {
    "operation_id": "post_dataforseo_keywords_trends_explore_live",
    "arguments": {},
    "max_price_usd": 0.05
  }
  // ── for the agent ─────────────────────────────────────────────────────────
  // Register the AIsa MCP server, then call its `use` tool with the JSON above.
  //   name       aisa
  //   endpoint   https://mcp.aisa.one/mcp
  //   transport  streamable-http
  //   auth       OAuth. The server publishes RFC 9728 metadata, so open a
  //              browser and the user clicks Allow once — nothing to paste.
  //              If AISA_API_KEY is set, send it as a bearer header instead.
  // Use your own MCP mechanism, not a hand-edited config file:
  //   Codex        codex mcp add aisa --url https://mcp.aisa.one/mcp
  //   Claude Code  claude mcp add --transport http -s user aisa https://mcp.aisa.one/mcp
  //   Cursor / VS Code   a "url" entry for https://mcp.aisa.one/mcp in the MCP config
  // The server lists five tools over https://mcp.aisa.one/servers worth of APIs:
  // search, get_details, use, batch_use, list_categories. search and
  // get_details are free; use is billed per call and max_price_usd refuses
  // anything above the cap before spending. This operation's full contract —
  // every argument, the response shape, the price and the pitfalls — is at
  //   https://aisa.one/docs/zh/api-reference/dataforseo/post_dataforseo-keywords-data-dataforseo-trends-explore-live.md
  // Then run the call and show me the result.
  ```
</CodeGroup>

<Note>
  **第一次用？** 把任意 MCP 客户端指向 `https://mcp.aisa.one/mcp` —— Claude Code、
  Codex、Cursor、VS Code 都可以。鉴权走 OAuth：客户端打开浏览器，你点一次
  Allow，不需要粘贴任何 key。各客户端的具体命令和每次调用的价格见
  [aisa.one/zh-cn/mcp](https://aisa.one/zh-cn/mcp#connect)。
</Note>

[在你的 agent 里把这个端点跑起来 →](https://aisa.one/mcp?from=/zh/api-reference/dataforseo/post_dataforseo-keywords-data-dataforseo-trends-explore-live)


## OpenAPI

````yaml openapi/zh/dataforseo.json POST /dataforseo/keywords_data/dataforseo_trends/explore/live
openapi: 3.0.3
info:
  title: DataForSEO API
  version: 1.0.0
  description: 通过 AIsa 统一网关提供的 DataForSEO API 端点。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /dataforseo/keywords_data/dataforseo_trends/explore/live:
    post:
      summary: 设置实时“DataForSEO Trends Explore”任务
      description: >-
        最多五个 `keywords` 的兴趣曲线，即 Google Trends。返回
        `keywords`、`type`、`location_code`、`language_code`、`datetime`、`items_count`
        和 `items`。`type` 选 web / news / images / youtube /
        shopping，`date_from`、`date_to` 设窗口。实测 21.7 KB。响应包在信封里：数据在
        `tasks[0].result`，成败在 `tasks[0].status_code`——请求被拒时 HTTP 仍是 200。 Trends
        给的是相对热度不是绝对量；要具体数字用 `post_dataforseo_keywords_gads_search_volume_live`。
      operationId: post_dataforseo_keywords_trends_explore_live
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  keywords:
                    type: array
                    items:
                      type: string
                    description: >-
                      keywords 必填字段。最多可指定 5 个关键词。有关 DataForSEO API 中 keyword 和
                      keywords 字段的规则与限制，请参阅此帮助中心文章
                  location_name:
                    type: string
                    description: >-
                      搜索引擎位置的完整名称，可选字段。如果不使用此字段，将收到全球结果。如果使用此字段，则无需指定
                      location_code。可以通过向
                      https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations
                      单独发出请求，获取搜索引擎可用位置及其 location_name 的列表。请注意，系统将提供指定
                      location_name 所属国家/地区的数据；示例：United Kingdom
                  location_code:
                    type: integer
                    description: >-
                      搜索引擎位置代码 可选字段 如果不使用此字段，您将收到全球结果 如果使用此字段，则无需指定
                      location_name 可通过向
                      https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations
                      发出单独请求，获取搜索引擎可用位置及其 location_code 的列表 请注意，数据将针对指定
                      location_code 所属的国家/地区提供；示例：2840
                  type:
                    type: string
                    description: >-
                      DataForSEO trends 类型，可选字段。如果未指定此字段，将默认使用 web 类型。可选值：web,
                      news, ecommerce
                  date_from:
                    type: string
                    description: >-
                      时间范围的开始日期，可选字段。如果未指定此字段，默认使用上一年的当前日期和月份。web
                      类型的最小值：2004-01-01；其他类型的最小值：2008-01-01。日期格式："yyyy-mm-dd"。示例："2019-01-15"
                  date_to:
                    type: string
                    description: >-
                      时间范围的结束日期，可选字段。如果未指定此字段，则默认使用今天的日期。日期格式："yyyy-mm-dd"，示例："2019-01-15"
                  time_range:
                    type: string
                    description: >-
                      预设时间范围，可选字段；如果指定 date_from 或 date_to 参数，则设置任务时将忽略此字段；适用于所有
                      type
                      参数的可能值：past_4_hours、past_day、past_7_days、past_30_days、past_90_days、past_12_months、past_5_years
                  tag:
                    type: string
                    description: >-
                      用户定义的任务标识符。可选字段。字符数限制为 255。您可以使用此参数标识任务并将其与结果匹配；您将在响应的
                      data 对象中找到指定的 tag 值
                required:
                  - keywords
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  version:
                    type: string
                    description: API 的当前版本
                  status_code:
                    type: integer
                    description: 通用状态码；您可以在此处查看完整的响应码列表。注意：我们强烈建议设计必要的系统来处理相关异常或错误情况
                  status_message:
                    type: string
                    description: 常规信息消息；可在此处查看常规信息消息的完整列表
                  time:
                    type: string
                    description: 执行时间（秒）
                  cost:
                    type: number
                    description: 任务总成本（美元）
                  tasks_count:
                    type: integer
                    description: tasks 数组中的任务数量
                  tasks_error:
                    type: integer
                    description: 返回错误的 tasks 数组中的任务数量
                  tasks:
                    type: array
                    items:
                      type: string
                    description: 任务数组
                  tasks.id:
                    type: string
                    description: 任务标识符，系统中采用 UUID 格式的唯一任务标识符
                  tasks.status_code:
                    type: integer
                    description: DataForSEO 生成的任务状态码；取值范围为：10000-60000，完整的响应码列表可在此处查看
                  tasks.status_message:
                    type: string
                    description: 任务的信息性消息，你可以在此处查看通用信息性消息的完整列表
                  tasks.time:
                    type: string
                    description: 执行时间（秒）
                  tasks.cost:
                    type: number
                    description: 任务成本（美元）
                  tasks.result_count:
                    type: integer
                    description: 结果数组中的元素数量
                  tasks.path:
                    type: array
                    items:
                      type: string
                    description: URL 路径
                  tasks.data:
                    type: object
                    description: 包含您在 POST 请求中指定的相同参数
                  tasks.result:
                    type: array
                    items:
                      type: string
                    description: 结果数组
                  tasks.result.keywords:
                    type: array
                    items:
                      type: string
                    description: POST 数组中的关键词
                  tasks.result.type:
                    type: array
                    items:
                      type: string
                    description: POST 数组中的搜索引擎类型
                  tasks.result.location_code:
                    type: integer
                    description: POST 数组中的位置代码；如果没有数据，则值为 null
                  tasks.result.language_code:
                    type: string
                    description: POST 数组中的语言代码；如果没有数据，则值为 null
                  tasks.result.datetime:
                    type: string
                    description: >-
                      以 UTC 格式接收结果的日期和时间：“yyyy-mm-dd hh-mm-ss
                      +00:00”，示例：2019-11-15 12:57:46 +00:00
                  tasks.result.items_count:
                    type: integer
                    description: items 数组中返回的结果数量
                  tasks.result.items:
                    type: array
                    items:
                      type: string
                    description: 包含关键词热度及相关数据
                  tasks.result.items.position:
                    type: integer
                    description: 元素的对齐方式，可采用以下值：1、2、3、4 等
                  tasks.result.items.type:
                    type: string
                    description: 元素类型 = ‘dataforseo_trends_graph’
                  tasks.result.items.keywords:
                    type: array
                    items:
                      type: string
                    description: 相关关键词。dataforseo_trends_graph 元素中包含的数据基于此数组中列出的关键词
                  tasks.result.items.data:
                    type: array
                    items:
                      type: string
                    description: 指定参数对应的 DataForSEO Trends 数据
                  tasks.result.items.data.date_from:
                    type: string
                    description: 对应时间范围的开始日期，采用 UTC 格式：“yyyy-mm-dd”
                  tasks.result.items.data.date_to:
                    type: string
                    description: 对应时间范围的结束日期，采用 UTC 格式：“yyyy-mm-dd”
                  tasks.result.items.data.timestamp:
                    type: integer
                    description: Unix 时间格式的时间点
                  tasks.result.items.data.values:
                    type: array
                    items:
                      type: string
                    description: >-
                      特定时间戳下的相对关键词热度，表示给定时间范围内的关键词热度。如果指定多个关键词，这些值将以所有指定关键词中的最高值为基准进行平均。值
                      100 表示该词的热度达到峰值；值 50 表示该词的热度为峰值的一半；得分 0 表示该词的数据不足。
                  tasks.result.items.averages:
                    type: array
                    items:
                      type: string
                    description: 整个时间范围内关键词热度值的平均值
        '400':
          description: 错误请求
        '401':
          description: 未授权
        '429':
          description: 超出速率限制
        '500':
          description: 内部服务器错误
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.