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

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



## OpenAPI

````yaml openapi/zh/dataforseo.json POST /dataforseo/keywords_data/dataforseo_trends/merged_data/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/merged_data/live:
    post:
      summary: 设置实时“DataForSEO Trends Merged Data”任务
      description: >-
        此端点将为您提供 DataForSEO Trends
        的关键词热度数据。除了给定时间范围内的关键词热度比率外，您还将获得特定位置的关键词热度数据，以及每个指定词的关键词热度人口统计细分和比较值。
      operationId: post_dataforseo_keywords_data_dataforseo_trends_merged_data_live
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                keywords:
                  type: array
                  items:
                    type: string
                  description: >-
                    keywords，必填字段。最多可指定 5 个关键词。请避免使用符号和特殊字符（例如 UTF
                    符号、表情符号）；如果指定非拉丁字符，将获得使用这些字符的国家/地区的数据。有关 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: 元素类型 = ‘demography’
                  tasks.result.items.keywords:
                    type: array
                    items:
                      type: string
                    description: >-
                      相关关键词 demography 和 demography_comparison
                      中包含的数据基于此数组中列出的关键词
                  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: 整个时间范围内关键词热度值的平均值
                  tasks.result.items.interests:
                    type: array
                    items:
                      type: string
                    description: 每个指定词条的次区域关键词热度数据
                  tasks.result.items.interests.keyword:
                    type: string
                    description: 相关关键词，values 元素中包含的数据基于此关键词
                  tasks.result.items.interests.values:
                    type: array
                    items:
                      type: string
                    description: 包含按国家或地区划分的关键词相对热度数据
                  tasks.result.items.interests.values.geo_id:
                    type: string
                    description: >-
                      位置标识符；可使用此字段将获取的结果与请求中指定的位置参数进行匹配；可在此处查看包含 geo_id
                      的完整可用位置列表，或向
                      https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations
                      单独发出请求获取该列表；示例：US-NY
                  tasks.result.items.interests.values.geo_name:
                    type: string
                    description: >-
                      位置名称；可使用此字段将获取的结果与请求中指定的位置参数进行匹配；可在此处查看包含 geo_name
                      的完整可用位置列表，或向
                      https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations
                      单独发出请求获取该列表；示例：Andorra
                  tasks.result.items.interests.values.value:
                    type: integer
                    description: >-
                      给定位置的相对关键词热度表示指定时间范围内特定位置的关键词热度；使用此值可以了解某个关键词在一个位置与另一个位置相比的受欢迎程度；计算方式：我们确定相关关键词在所有位置中的最高热度值，然后将所有其他值表示为该最高值（100）的百分比；值为
                      100 表示该词的热度最高，值为 50 表示该词的热度为最高热度的一半，值为 0 表示没有足够的该词相关数据
                  tasks.result.items.interests_comparison:
                    type: object
                    description: 指定参数下各子区域关键词热度的数据对比；如果仅指定了一个关键词，该值将为 null
                  tasks.result.items.interests_comparison.items:
                    type: array
                    items:
                      type: string
                    description: 各位置的关键词热度值；此数组中的值表示相对于各区域内最大值的百分比
                  tasks.result.items.interests_comparison.items.geo_id:
                    type: string
                    description: >-
                      位置标识符；可使用此字段将获取的结果与请求中指定的位置参数进行匹配；可在此处查看包含 geo_id
                      的完整可用位置列表，或向
                      https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations
                      单独发出请求获取该列表；示例：US-NY
                  tasks.result.items.interests_comparison.items.geo_name:
                    type: string
                    description: >-
                      位置名称；可使用此字段将获取的结果与请求中指定的位置参数进行匹配；可在此处查看包含 geo_name
                      的完整可用位置列表，或向
                      https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations
                      单独发出请求获取该列表；示例：Andorra
                  tasks.result.items.interests_comparison.items.values:
                    type: array
                    items:
                      type: string
                    description: >-
                      指定位置内的关键词热度。表示指定时间范围内特定于位置的关键词热度；使用这些值，可以了解指定关键词中哪些在相关位置更受欢迎；数组中的第一个值对应
                      keywords
                      数组中的第一个词，第二个值对应第二个关键词，以此类推；计算方式：我们确定指定位置内所有指定关键词中的最高热度值，然后将每个关键词的热度表示为最高值（100）的百分比；值
                      100 表示该词达到热度峰值，值 50 表示该词的热度为峰值的一半，值 0 表示没有足够的该词数据
                  tasks.result.items.interests_comparison.absolute_items:
                    type: array
                    items:
                      type: string
                    description: 所有位置的关键词热度；此数组中的值表示相对于所有位置中最大值的百分比
                  tasks.result.items.interests_comparison.absolute_items.geo_id:
                    type: string
                    description: >-
                      位置标识符；可使用此字段将获取的结果与请求中指定的位置参数进行匹配；可在此处查看包含 geo_id
                      的完整可用位置列表，或向
                      https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations
                      单独发出请求获取该列表；示例：US-NY
                  tasks.result.items.interests_comparison.absolute_items.geo_name:
                    type: string
                    description: >-
                      位置名称；可使用此字段将获取的结果与请求中指定的位置参数进行匹配；可在此处查看包含 geo_name
                      的完整可用位置列表，或向
                      https://api.dataforseo.com/v3/keywords_data/dataforseo_trends/locations
                      单独发出请求获取该列表；示例：Andorra
                  tasks.result.items.interests_comparison.absolute_items.values:
                    type: array
                    items:
                      type: string
                    description: >-
                      相对于所有位置的关键词热度比率，表示指定时间范围内特定位置的关键词热度；使用这些值，您可以了解每个关键词与所有位置的其他所有关键词相比的热度；数组中的第一个值对应
                      keywords
                      数组中的第一个词，第二个值对应第二个关键词，以此类推；计算方式：我们确定所有位置所有关键词中的最高热度值，然后将其他所有值表示为该最高值（100）的百分比；值
                      100 表示该词的热度峰值，值 50 表示该词的热度为峰值的一半，值 0 表示没有足够的该词数据
                  tasks.result.items.demography:
                    type: object
                    description: 每个指定术语的关键词热度数据人口统计细分，包含按年龄和性别划分的关键词热度数据
                  tasks.result.items.demography.age:
                    type: array
                    items:
                      type: string
                    description: 按年龄划分的关键词热度分布
                  tasks.result.items.demography.age.keyword:
                    type: string
                    description: 提供人口统计数据的相关关键词
                  tasks.result.items.demography.age.values:
                    type: array
                    items:
                      type: string
                    description: 包含年龄范围及对应的关键词热度值
                  tasks.result.items.demography.age.values.type:
                    type: string
                    description: 年龄范围可取以下值：18-24、25-34、35-44、45-54、55-64
                  tasks.result.items.demography.age.values.value:
                    type: integer
                    description: >-
                      指定年龄范围内的关键词热门程度。通过此值，你可以了解关键词在各年龄范围内的热门程度。计算方式：我们确定相关关键词在所有年龄组中的最高热门程度值，然后将所有其他值表示为该最高值（100）的百分比。值为
                      100 表示该词的热门程度最高；值为 0 表示该词的数据不足。
                  tasks.result.items.demography.gender:
                    type: array
                    items:
                      type: string
                    description: 关键词热度的性别分布
                  tasks.result.items.demography.gender.keyword:
                    type: string
                    description: 提供人口统计数据的相关关键词
                  tasks.result.items.demography.gender.values:
                    type: array
                    items:
                      type: string
                    description: 包含 gender 及对应的关键词热度值
                  tasks.result.items.demography.gender.values.type:
                    type: string
                    description: gender 类别可取以下值：female、male
                  tasks.result.items.demography.gender.values.value:
                    type: integer
                    description: >-
                      关键词在指定性别类别中的热度；通过此值可以了解关键词在各性别类别中的受欢迎程度；计算方式：确定相关关键词在所有性别类别中的最高热度值，然后将所有其他值表示为该最高值（100）的百分比；值
                      100 表示该词的最高热度；值 0 表示该词没有足够的数据。
                  tasks.result.items.demography_comparison:
                    type: object
                    description: >-
                      比较指定参数下关键词热度的人口统计数据，包含按年龄和性别划分的关键词热度数据。如果仅指定一个关键词，该值将为
                      null
                  tasks.result.items.demography_comparison.age:
                    type: object
                    description: 按年龄比较关键词热度数据
                  tasks.result.items.demography_comparison.age.$18-24:
                    type: array
                    items:
                      type: string
                    description: >-
                      表示年龄范围，并包含对应的关键词热度值 包含指定年龄范围内指定搜索词的关键词热度对比 variable
                      可取以下值：18-24, 18-24, 25-34, 35-44, 45-54,
                      55-64；通过此数组中的值，您可以了解哪些指定关键词在相关年龄范围内更受欢迎；数组中的第一个值对应
                      keywords
                      数组中的第一个搜索词，第二个值对应第二个关键词，以此类推；计算方法：我们确定每个年龄范围内所有关键词的总热度值，然后将所有其他值表示为总值（100）的百分比；值
                      100 表示该搜索词的最高热度 值 0 表示该搜索词没有足够的数据
                  tasks.result.items.demography_comparison.gender:
                    type: object
                    description: 按性别比较关键词热度数据
                  tasks.result.items.demography_comparison.gender.female:
                    type: array
                    items:
                      type: string
                    description: >-
                      表示性别类别，并包含相应的关键词热度值。包含指定词在指定性别类别中的关键词热度比较；使用此数组中的值，可以了解指定关键词中哪些在相关性别类别中更受欢迎；数组中的第一个值对应
                      keywords
                      数组中的第一个词，第二个值对应第二个关键词，以此类推；计算方式：我们确定每个性别类别中所有关键词的总热度值，然后将所有其他值表示为总值（100）的百分比；值
                      100 表示该词的最高热度，值 0 表示没有足够的该词数据
                  tasks.result.items.demography_comparison.gender.male:
                    type: array
                    items:
                      type: string
                    description: >-
                      表示性别类别，并包含相应的关键词热度值。包含指定词在指定性别类别中的关键词热度比较；使用此数组中的值，可以了解指定关键词中哪些在相关性别类别中更受欢迎；数组中的第一个值对应
                      keywords
                      数组中的第一个词，第二个值对应第二个关键词，以此类推；计算方式：我们确定每个性别类别中所有关键词的总热度值，然后将所有其他值表示为总值（100）的百分比；值
                      100 表示该词的最高热度，值 0 表示没有足够的该词数据
        '400':
          description: 错误请求
        '401':
          description: 未授权
        '429':
          description: 超出速率限制
        '500':
          description: 内部服务器错误
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````