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

# Keyword Difficulty

> Batch keyword ranking-difficulty scores.

# Keyword Difficulty

```json theme={"system"}
{"keywords":["keyword research","seo tools"],"location_code":2840,"language_code":"en"}
```

Accepts up to 1,000 keywords and returns a 0鈥?00 difficulty score per available keyword.


## OpenAPI

````yaml zh/api-manual/agent-api/agent-api.json POST /v1/seo/keyword-difficulty
openapi: 3.1.0
info:
  title: SocQ Agent API 中文版
  version: v1-c8347f9103e7
  description: 根据 SocQ 能力目录生成的异步社交数据 API。
servers:
  - url: https://api.socq.ai
security: []
paths:
  /v1/seo/keyword-difficulty:
    post:
      tags:
        - seo
      summary: Keyword Difficulty
      description: Batch keyword ranking-difficulty scores.
      operationId: socq_seo_keyword_difficulty
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              additionalProperties: false
              properties:
                callback_url:
                  type: string
                  format: uri
                  description: 可选的任务完成回调 URL。
                keywords:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 80
                  description: Keywords to analyze in one batch，至少提供 1 项，最多提供 1000 项。
                language:
                  type: string
                  minLength: 1
                  description: 语言代码或语言筛选条件。
                language_code:
                  type: string
                  minLength: 2
                  maxLength: 10
                  description: 请求参数。
                location_code:
                  type: integer
                  minimum: 1
                  description: Search market location code.
                location_name:
                  type: string
                  minLength: 1
                  description: Search market location name.
                results_limit:
                  type: integer
                  minimum: 1
                  maximum: 2000
                  description: 最多保存的结果数，实际结果可能少于该值。
              required:
                - keywords
      responses:
        '200':
          description: 任务已受理
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSubmitResponse'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    AgentSubmitResponse:
      type: object
      properties:
        code:
          type: integer
          const: 200
          description: HTTP 业务状态码。
        data:
          type: object
          properties:
            task_id:
              type: string
              description: 任务 ID，用于查询任务状态和结果。
            status:
              type: string
              description: 任务当前状态。
            created_time:
              type:
                - string
                - 'null'
              description: 任务创建时间。
            idempotent_replay:
              type: boolean
              description: 是否复用了由相同 Idempotency-Key 创建的已有任务。false 表示新任务，true 表示重复提交返回原任务。
          required:
            - task_id
            - status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '使用 `Authorization: Bearer <token>` 请求头进行身份验证。'
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 也可以通过 `x-api-key` 请求头提供 API Key。

````