> ## 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.

# 历史关键词数据

> 此端点提供指定关键词的 Google 历史关键词数据，包括搜索量、每次点击费用、付费搜索竞争度值、月度……



## OpenAPI

````yaml openapi/zh/dataforseo.json POST /dataforseo/dataforseo_labs/google/historical_keyword_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/dataforseo_labs/google/historical_keyword_data/live:
    post:
      summary: 历史关键词数据
      description: >-
        此端点提供指定关键词的 Google
        历史关键词数据，包括搜索量、每次点击费用、付费搜索竞争度、月度搜索量和搜索量趋势。根据关键词以及位置和语言组合，您可以获取自 **2021 年
        8
        月**以来的历史关键词数据。支持的位置和语言列表可在[此处](https://docs.dataforseo.com/v3/dataforseo_labs/locations_and_languages.md)查看。
      operationId: post_dataforseo_dataforseo_labs_google_historical_keyword_data_live
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                keywords:
                  type: array
                  items:
                    type: string
                  description: >-
                    keywords 必填字段 可指定的关键词数量上限：700 每个关键词的字符数上限：80
                    每个关键词短语的单词数上限：10 指定的关键词将转换为小写格式，数据将在单独的数组中提供
                    请注意，如果此数组中指定的某些关键词未出现在返回结果中，则表示我们的数据库不包含这些关键词，因而无法返回其相关数据
                    未出现在结果中的关键词不会收费 有关 DataForSEO API 中 keyword 和 keywords
                    字段的规则与限制，请参阅此帮助中心文章
                location_name:
                  type: string
                  description: >-
                    位置的完整名称；未指定 location_code 时为必填字段。注意：必须指定 location_name 或
                    location_code 之一。您可以通过向
                    https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages
                    单独发送请求，获取包含 location_name 的可用位置列表；示例：United Kingdom
                location_code:
                  type: integer
                  description: >-
                    位置代码；如果未指定 location_name，则为必填字段。注意：必须指定 location_name 或
                    location_code 其中之一；可通过向
                    https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages
                    单独发起请求，获取可用位置及其 location_code 的列表；示例：2840
                language_name:
                  type: string
                  description: >-
                    语言的完整名称 如果未指定 language_code，则为必填字段 注意：必须指定 language_name 或
                    language_code 之一 可以通过向
                    https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages
                    单独发送请求，获取包含 language_name 的可用位置列表 示例：English
                language_code:
                  type: string
                  description: >-
                    语言代码；如果未指定 language_name，则此字段为必填字段。注意：必须指定 language_name 或
                    language_code 之一。您可以通过向
                    https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages
                    单独发送请求，获取可用位置及其 language_code 的列表。示例：en
                tag:
                  type: string
                  description: >-
                    用户定义的任务标识符。可选字段。字符数限制为 255。您可以使用此参数标识任务并将其与结果匹配；您将在响应的 data
                    对象中找到指定的 tag 值
              required:
                - keywords
                - location_name
                - location_code
                - language_name
                - language_code
      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.se_type:
                    type: string
                    description: 搜索引擎类型
                  tasks.result.location_code:
                    type: integer
                    description: POST 数组中的位置代码
                  tasks.result.language_code:
                    type: string
                    description: POST 数组中的语言代码
                  tasks.result.items_count:
                    type: integer
                    description: items 数组中返回的结果数量
                  tasks.result.items:
                    type: array
                    items:
                      type: string
                    description: 包含关键词及相关数据
                  tasks.result.items.se_type:
                    type: string
                    description: 搜索引擎类型
                  tasks.result.items.keyword:
                    type: string
                    description: keyword 关键词返回时会解码 %##（加号字符“+”将被解码为空格字符）
                  tasks.result.items.location_code:
                    type: integer
                    description: POST 数组中的位置代码；如果没有数据，则值为 null
                  tasks.result.items.language_code:
                    type: string
                    description: POST 数组中的语言代码
                  tasks.result.items.history:
                    type: array
                    items:
                      type: string
                    description: 包含该关键词历史数据的对象数组
                  tasks.result.items.history.year:
                    type: integer
                    description: 年
                  tasks.result.items.history.month:
                    type: integer
                    description: 月
                  tasks.result.items.history.keyword_info:
                    type: object
                    description: 关键词的历史数据
                  tasks.result.items.history.keyword_info.se_type:
                    type: string
                    description: 搜索引擎类型
                  tasks.result.items.history.keyword_info.last_updated_time:
                    type: string
                    description: >-
                      关键词数据更新时间，采用 UTC 格式：“yyyy-mm-dd hh-mm-ss
                      +00:00”；示例：2019-11-15 12:57:46 +00:00
                  tasks.result.items.history.keyword_info.competition:
                    type: number
                    description: 竞争度表示与给定关键词相关的相对竞争程度；该值基于 Google Ads 数据，取值范围为 0 到 1（含端点）
                  tasks.result.items.history.keyword_info.competition_level:
                    type: string
                    description: >-
                      竞争程度 表示给定关键词仅在付费 SERP 中的相对竞争程度；可能的值：LOW、MEDIUM、HIGH
                      如果竞争程度未知，则值为 null；有关该指标的更多信息，请参阅此帮助中心文章
                  tasks.result.items.history.keyword_info.cpc:
                    type: number
                    description: 每次点击费用，表示该关键词历史上每次点击的平均费用（USD）
                  tasks.result.items.history.keyword_info.search_volume:
                    type: integer
                    description: 平均月搜索量，表示给定关键词建议在 google.com 上的（近似）搜索次数
                  tasks.result.items.history.keyword_info.low_top_of_page_bid:
                    type: number
                    description: >-
                      广告在第一页顶部展示的最低出价，表示高于约 20% 的广告实际展示最低出价（基于 Google Ads
                      的广告主统计数据）。该值可能因 POST 请求中指定的位置而异
                  tasks.result.items.history.keyword_info.high_top_of_page_bid:
                    type: number
                    description: >-
                      广告在第一页顶部展示的最高出价，表示高于约 80% 的广告实际展示最低出价（基于 Google Ads
                      的广告主统计数据）。该值可能因 POST 请求中指定的位置而异
                  tasks.result.items.history.keyword_info.categories:
                    type: array
                    items:
                      type: string
                    description: 产品和服务类别；您可以下载完整的可选类别列表
                  tasks.result.items.history.keyword_info.monthly_searches:
                    type: array
                    items:
                      type: string
                    description: 月搜索量，表示指定地理位置中此关键词建议的（近似）搜索次数（可提供过去十二个月的数据）。
                  tasks.result.items.history.keyword_info.monthly_searches.year:
                    type: integer
                    description: 年
                  tasks.result.items.history.keyword_info.monthly_searches.month:
                    type: integer
                    description: 月
                  tasks.result.items.history.keyword_info.monthly_searches.search_volume:
                    type: integer
                    description: 月平均搜索量
                  tasks.result.items.history.keyword_info.search_volume_trend:
                    type: object
                    description: 搜索量趋势变化，表示与上一周期相比搜索量的百分比变化
                  tasks.result.items.history.keyword_info.search_volume_trend.monthly:
                    type: integer
                    description: 与上月相比的搜索量百分比变化
                  tasks.result.items.history.keyword_info.search_volume_trend.quarterly:
                    type: integer
                    description: 与上一季度相比的搜索量变化百分比
                  tasks.result.items.history.keyword_info.search_volume_trend.yearly:
                    type: integer
                    description: 与上一年相比的搜索量百分比变化
        '400':
          description: 错误请求
        '401':
          description: 未授权
        '429':
          description: 超出速率限制
        '500':
          description: 内部服务器错误
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````