> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Find organic competitors and export a competitor keyword gap list

> Identify true organic competitors with POST /v1/seo/competitors, export their ranking terms with POST /v1/seo/ranked-keywords, and diff against your own domain to build a sourced keyword gap list.

To find high-intent keywords that organic competitors already rank for while your site does not, identify true commercial competitors with `POST /v1/seo/competitors`, pull bounded slices of their `POST /v1/seo/ranked-keywords`, and diff those terms locally against your own site's ranked keywords.

## Prerequisites and cost scope

* **Inputs:** Your own `domain` (full URLs are normalized automatically), one target `country` + `language`, and an optional topic word for `contains`.
* **Cost control:** Both `competitors` and `ranked-keywords` bill `$0.018` per call plus `$0.0003` per returned row. Pulling 20 competitors (`~$0.024`) plus 100 ranked keywords for 2 shortlisted competitors (`~$0.096`) stays under `$0.15` total. See [BeatAPI pricing](https://beatapi.io/pricing).

## 1. Find real organic competitors in your market

With [BeatAPI MCP](https://beatapi.io/integrations) connected in Claude Code or Cursor, you can delegate the full gap analysis in one prompt:

> Run BeatAPI `data:seo.competitors` for `yourdomain.com` (`country: "us"`, `language: "en"`, `limit: 20`), shortlist 2 direct product competitors, and pull 50 `data:seo.ranked_keywords` for each plus `yourdomain.com`. Output a CSV of keywords where a competitor ranks `position <= 20` and we are missing or below 20, keeping `position_seen_at` and total `usage.price_usd`.

To run step 1 over HTTP (`limit` supports `1–999`; general mega-sites like `youtube.com` and `wikipedia.org` are excluded automatically):

```bash
curl -sS https://api.beatapi.io/v1/seo/competitors \
  -H "Authorization: Bearer $BEATAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: seo-competitors-yourdomain-2026-11-23" \
  -d '{"domain":"yourdomain.com","country":"us","language":"en","limit":20}' \
  -o competitors.json
```

Shortlist 2–3 direct product competitors based on `shared_keywords`, `avg_position`, and `search_traffic_estimate`. Skip broad news or directory domains even if they share many informational queries.

## 2. Pull bounded ranked keywords for each competitor

Call `POST https://api.beatapi.io/v1/seo/ranked-keywords` for each shortlisted competitor. Use `contains` (plain text only—no `%` or `_`) when you want to audit one product line first:

```json
{
  "domain": "competitor.com",
  "contains": "api",
  "country": "us",
  "language": "en",
  "limit": 50,
  "offset": 0
}
```

Save `keyword`, `position`, `absolute_position`, `url`, `title`, `search_volume`, `keyword_difficulty`, `intent`, `search_traffic_estimate`, and `position_seen_at`. Paginate with `offset: 50`, `100`, etc. only while rows remain relevant.

```json
{
  "object": "seo.ranked_keywords",
  "request_id": "task_xxx",
  "domain": "competitor.com",
  "results": [
    {
      "keyword": "redis cluster",
      "search_volume": 590,
      "keyword_difficulty": 15,
      "intent": "informational",
      "position": 1,
      "absolute_position": 2,
      "url": "https://competitor.com/docs/cluster/",
      "position_seen_at": "2026-09-14 04:53:47 +00:00"
    }
  ],
  "billed_rows": 50,
  "usage": { "price_usd": "0.0330" }
}
```

## Example cost breakdown

| Step                           | Endpoint                       | Example volume      | Cost          |
| ------------------------------ | ------------------------------ | ------------------- | ------------- |
| Discover competitors           | `POST /v1/seo/competitors`     | 1 call, 20 rows     | `$0.0240`     |
| Pull 2 competitors + your site | `POST /v1/seo/ranked-keywords` | 3 calls × 50 rows   | `$0.0990`     |
| **Total**                      | **4 calls**                    | **170 billed rows** | **`$0.1230`** |

## 3. Diff locally against your own site

Run one matching `POST /v1/seo/ranked-keywords` query for `yourdomain.com` in the same `country` and `language` (with the same `contains` filter if used). Locally in Python or a spreadsheet:

1. Lowercase `keyword` and deduplicate by `(domain, keyword)`.
2. Flag terms where the competitor ranks in positions `1–20` (`position <= 20`) and your domain is absent or ranks below position `20`.
3. Keep `position_seen_at` on every row—rankings are recorded snapshots, not live SERPs.

## 4. Deliver the keyword gap table

Export a CSV with `keyword`, `competitor_domain`, `competitor_position`, `competitor_url`, `your_position` (blank if absent), `search_volume`, `keyword_difficulty`, `intent`, and `position_seen_at`, plus a footer recording total `billed_rows` and `usage.price_usd`.

## Related

* [BeatAPI SEO Data API](https://beatapi.io/seo)
* [SEO API reference](/seo)
* [Organic competitors FAQ](/faq/seo-find-competitors)
* [Ranking keywords FAQ](/faq/seo-ranking-keywords)