> ## 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”任务

> 此端点将提供来自 DataForSEO Trends 的关键词热度数据。



## 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: >-
        此端点将提供 DataForSEO Trends 的关键词热度数据。你可以查看 Google Search、Google News 和
        Google Shopping 的关键词趋势。
      operationId: post_dataforseo_keywords_data_dataforseo_trends_explore_live
      requestBody:
        required: true
        content:
          application/json:
            schema:
              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

````