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

# 设置“Keywords For Keywords”任务

> 此端点将为指定的词条选择相关关键词。



## OpenAPI

````yaml openapi/zh/dataforseo.json POST /dataforseo/keywords_data/bing/keywords_for_keywords/task_post
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/bing/keywords_for_keywords/task_post:
    post:
      summary: 设置“Keywords For Keywords”任务
      description: >-
        此端点将为指定术语选择相关关键词。最多设置 200 个关键词，并获取 Bing Ads 针对你的查询建议的结果。使用此功能最多可获得 3000
        个关键词建议。
      operationId: post_dataforseo_keywords_data_bing_keywords_for_keywords_task_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                keywords:
                  type: array
                  items:
                    type: string
                  description: >-
                    关键词 必填字段 最多可指定 200 个关键词，每个关键词不得超过 100
                    个字符；指定的关键词将转换为小写，数据将在单独的数组中提供；有关 DataForSEO API 中 keyword 和
                    keywords 字段的规则与限制，请参阅此帮助中心文章
                location_name:
                  type: string
                  description: >-
                    搜索引擎位置的完整名称。如果未指定 location_code 或
                    location_coordinate，则此字段为必填字段。如果使用此字段，则无需指定 location_code 或
                    location_coordinate。您可以单独请求
                    https://api.dataforseo.com/v3/keywords_data/bing/locations，获取搜索引擎的可用位置及其
                    location_name 列表。示例：London,England,United Kingdom
                location_code:
                  type: integer
                  description: >-
                    搜索引擎位置代码。如果未指定 location_name 或
                    location_coordinate，则为必填字段。如果使用此字段，则无需指定 location_name 或
                    location_coordinate。可通过向
                    https://api.dataforseo.com/v3/keywords_data/bing/locations
                    单独发送请求，获取搜索引擎的可用位置及其 location_code。示例：2840
                location_coordinate:
                  type: string
                  description: >-
                    位置的 GPS 坐标；如果未指定 location_name 或
                    location_code，则为必填字段；如果使用此字段，则无需指定 location_name 或
                    location_code；location_coordinate
                    参数应采用“latitude,longitude”格式；将提供指定坐标所属国家/地区的数据；示例：52.6178549,-155.352142
                language_name:
                  type: string
                  description: >-
                    搜索引擎语言的全名。如果未指定 language_code，则此字段为必填字段。如果使用此字段，则无需指定
                    language_code。支持的语言：英语、法语、德语
                language_code:
                  type: string
                  description: >-
                    搜索引擎语言代码。如果未指定 language_name，则此字段为必填字段；如果使用此字段，则无需指定
                    language_name。支持的语言：en、fr、de
                sort_by:
                  type: string
                  description: >-
                    结果排序参数，可选字段。使用这些参数可按 search_volume、cpc、competition 或
                    relevance 对结果进行降序排序。默认值：relevance
                keywords_negative:
                  type: array
                  items:
                    type: string
                  description: >-
                    否定关键词数组，可选字段；这些关键词将在结果数组中被忽略；最多可以指定 200
                    个要从结果中排除的词；指定的关键词将转换为小写格式
                device:
                  type: string
                  description: >-
                    设备类型，可选字段。如果要获取特定设备类型的数据，请指定此字段；可能的值：all、mobile、desktop、tablet；默认值：all
                date_from:
                  type: string
                  description: >-
                    时间范围的起始日期；可选字段；最小值：自今天起向前 24 个月；如果未指定此字段，将提供最近 12
                    个月的数据；日期格式："yyyy-mm-dd"；示例："2020-01-01"；注意：不建议对过去一年的日期使用自定义时间范围
                date_to:
                  type: string
                  description: >-
                    时间范围的结束日期；可选字段。如果未指定此字段，将提供过去 12
                    个月的数据；最小值：自今天起向前两年；最大值：自今天起一个月；日期格式："yyyy-mm-dd"；示例："2020-03-15"。注意：不建议对过去一年的日期使用自定义时间范围
                search_partners:
                  type: boolean
                  description: >-
                    Bing 搜索合作伙伴类型，可选字段。如果指定 true，则会返回 Bing、Yahoo、AOL
                    的自有、运营及联合网络，以及托管 Bing、AOL 和 Yahoo 搜索的合作伙伴网站的结果。默认值：false –
                    返回 Bing、AOL 和 Yahoo 搜索网络的结果
                postback_url:
                  type: string
                  description: >-
                    用于发送任务结果的 URL，可选字段；任务完成后，我们会向指定的 postback_url 发送 POST
                    请求，其结果采用 gzip 格式压缩；可以使用字符串 ‘$id’ 作为 $id 变量，并使用 ‘$tag’ 作为经过
                    URL 编码的 $tag
                    变量。我们会在发送请求前设置必要的值。示例：http://your-server.com/postbackscript?id=$id
                    http://your-server.com/postbackscript?id=$id&tag=$tag
                    注意：postback_url 中的特殊字符将经过 URL 编码；例如，# 字符将被编码为
                    %23；有关更多信息，请参阅我们的帮助中心
                pingback_url:
                  type: string
                  description: >-
                    已完成任务的通知 URL。可选字段。任务完成后，我们将通过向您指定的 URL 发送 GET
                    请求来通知您。您可以使用字符串 ‘$id’ 作为 $id 变量，并使用 ‘$tag’ 作为经过 urlencoded
                    编码的 $tag
                    变量。我们会在发送请求前设置必要的值。示例：http://your-server.com/pingscript?id=$id
                    http://your-server.com/pingscript?id=$id&tag=$tag
                    注意：pingback_url 中的特殊字符将经过 urlencoded 编码；例如，# 字符将被编码为
                    %23。请在我们的帮助中心了解更多信息
                tag:
                  type: string
                  description: >-
                    用户定义的任务标识符。可选字段。字符数限制为 255。您可以使用此参数标识任务并将其与结果匹配；您将在响应的 data
                    对象中找到指定的 tag 值
              required:
                - keywords
                - location_name
                - location_code
                - location_coordinate
                - 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: 结果数组；在此情况下，该值将为 null
        '400':
          description: 错误请求
        '401':
          description: 未授权
        '429':
          description: 超出速率限制
        '500':
          description: 内部服务器错误
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````