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

# Compare Domains

> Keyword gap analysis between 2-5 domains — find shared keywords, keywords unique to your domain, or untapped keywords competitors rank for that you don't

Keyword gap analysis between 2-5 domains — find shared keywords, keywords unique to your domain, or untapped keywords competitors rank for that you don't. Semrush requires a Markifact connection using an API key from a Semrush Business or Enterprise subscription.

|                      |                           |
| -------------------- | ------------------------- |
| **App**              | SEMrush                   |
| **Operation ID**     | `semrush_compare_domains` |
| **Type**             | Action                    |
| **Connection**       | `semrush` (required)      |
| **Credits per run**  | Free                      |
| **Agent / MCP tool** | Yes                       |

## Inputs

| Field            | Type                                | Required | Default  | Description                                                                                                                                                                                                                     |
| ---------------- | ----------------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `domains`        | array of string or string           | Yes      | -        | 2 to 5 domains to compare. Accepts a list or a newline/comma-separated string. The first domain is treated as 'your' domain for the unique and untapped modes.                                                                  |
| `mode`           | string or SelectItem                | No       | `shared` | Comparison mode: 'shared' (keywords all domains rank for), 'all' (keywords any domain ranks for), 'unique' (keywords only the first domain ranks for), 'untapped' (keywords competitors rank for but the first domain doesn't). |
| `keyword_type`   | string or SelectItem                | No       | `or`     | Compare 'or' (organic) or 'ad' (paid) keywords.                                                                                                                                                                                 |
| `database`       | string                              | No       | `us`     | Regional database (country code). E.g. us, uk, ca, au, de, fr, es, it, br. Defaults to 'us'.                                                                                                                                    |
| `export_columns` | array of string or SelectableOption | No       | -        | List of columns to return. Available: Ph (keyword), P0-P4 (position of each compared domain, in input order), Nq (search volume), Cp (CPC), Co (competition), Nr (SERP results), Kd (keyword difficulty), Td (trends).          |
| `limit`          | integer                             | No       | -        | Maximum number of rows to return.                                                                                                                                                                                               |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `List[Dict]`

Returns one row per keyword with: keyword, domain1Position-domain5Position (position of each compared domain, in input order), searchVolume, cpc, competition, keywordDifficulty.

**Fields**: `keyword`, `domain1Position`, `domain2Position`, `searchVolume`, `cpc`, `competition`, `keywordDifficulty`

**Example**:

```json theme={"dark"}
[
  {
    "keyword": "seo tools",
    "domain1Position": 4,
    "domain2Position": 1,
    "searchVolume": 18100,
    "cpc": 12.5,
    "keywordDifficulty": 72
  }
]
```
