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

# Keyword Gaps

> Find keywords your competitors rank for but you don't

Discover keyword opportunities by analyzing gaps between your domain and competitors.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.agenticpencil.com/v1/keywords/gaps" \
    -H "Authorization: Bearer ap_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "domain": "sonant.ai",
      "competitors": ["smith.ai", "ruby.com"],
      "country": "us",
      "limit": 20
    }'
  ```
</RequestExample>

## Authorization

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer ap_your_api_key`
</ParamField>

## Request Body

<ParamField body="domain" type="string" required>
  Your website domain
</ParamField>

<ParamField body="competitors" type="string[]" required>
  Competitor domains to compare against (1-3)
</ParamField>

<ParamField body="country" type="string">
  Two-letter country code (default: "us")
</ParamField>

<ParamField body="limit" type="integer">
  Maximum gaps to return (default: 50)
</ParamField>

## Response

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "data": {
      "domain": "sonant.ai",
      "competitors": ["smith.ai"],
      "gaps": [
        {
          "keyword": "virtual receptionist service",
          "search_volume": 3600,
          "keyword_difficulty": 45,
          "competitor_positions": { "smith.ai": 5 }
        }
      ],
      "total_gaps": 1
    },
    "meta": {
      "credits_used": 10,
      "credits_remaining": 990,
      "request_id": "abc-123"
    }
  }
  ```
</ResponseExample>

<Info>**Credit Cost**: 10 credits per request</Info>
