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

# Get Backlink Gap

> Link intersect and link gap from DataForSEO: the referring domains or pages that up to 20 sites have in common, with each target's metrics side by side

Link intersect and link gap from DataForSEO: the referring domains or pages that up to 20 sites have in common, with each target's metrics side by side. Only domains linking to EVERY target are returned, so put competitors in targets and your own site in exclude\_targets to list only the prospects you are missing. Needs the DataForSEO Backlinks subscription.

|                      |                               |
| -------------------- | ----------------------------- |
| **App**              | DataForSEO                    |
| **Operation ID**     | `dataforseo_get_backlink_gap` |
| **Type**             | Action                        |
| **Connection**       | `dataforseo` (required)       |
| **Credits per run**  | Free                          |
| **Agent / MCP tool** | Yes                           |

## Inputs

| Field                        | Type                       | Required | Default        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------------------- | -------------------------- | -------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `targets`                    | array of string or string  | Yes      | -              | Two to 20 domains, subdomains or pages, as a list or newline/comma-separated text. Only the referring domains or pages that link to EVERY target are returned, so put the competitors whose common links you want here. Domains go in bare (example.com); a single page needs its full URL. The per-target columns follow this order.                                                                                                                                         |
| `comparison`                 | string or SelectableOption | No       | `domains`      | 'domains' (default): one row per referring domain that links to every target, with each target's metrics side by side. 'pages': one row per referring page, with the exact link it points at each target.                                                                                                                                                                                                                                                                     |
| `intersection_mode`          | string or SelectableOption | No       | `all`          | Which backlinks the per-target metrics are based on: 'all' (default) counts every backlink each target has from that referring domain, 'partial' counts only the intersecting ones. It does not change which rows are returned.                                                                                                                                                                                                                                               |
| `exclude_targets`            | string or array of string  | No       | -              | Up to 10 domains, subdomains or pages to subtract: any referring domain or page that also links to one of these is dropped. Put your own site here to turn the report into a link gap, listing only the prospects your competitors have and you do not.                                                                                                                                                                                                                       |
| `backlinks_status_type`      | string or SelectableOption | No       | `live`         | Which backlinks to count: 'live' (default), 'all' or 'lost'.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `include_subdomains`         | boolean                    | No       | `True`         | Count links to subdomains of the targets as well. Defaults to true.                                                                                                                                                                                                                                                                                                                                                                                                           |
| `include_indirect_links`     | boolean                    | No       | `True`         | Count links that reach a target through a redirect or a canonical. Defaults to true.                                                                                                                                                                                                                                                                                                                                                                                          |
| `exclude_internal_backlinks` | boolean                    | No       | `True`         | Leave out links coming from a target's own subdomains. Defaults to true.                                                                                                                                                                                                                                                                                                                                                                                                      |
| `rank_scale`                 | string or SelectableOption | No       | `one_thousand` | Scale for the rank values: 'one\_thousand' (DataForSEO's default, 0 to 1000) or 'one\_hundred' (0 to 100, comparable to the domain ratings other SEO tools show).                                                                                                                                                                                                                                                                                                             |
| `filters`                    | array of FilterItem        | No       | -              | Up to 8 filters, addressing a target by its position in the targets list: 1.rank GREATER\_THAN 300, 2.backlinks GREATER\_THAN 5 (domains comparison) or 1.dofollow EQUALS true, 1.anchor CONTAINS review (pages comparison).                                                                                                                                                                                                                                                  |
| `orders`                     | array of OrderItem         | No       | -              | Sort by up to 3 of the same fields, e.g. 1.rank DESC.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `limit`                      | integer                    | No       | `100`          | Maximum number of rows to return (1 to 1000). Defaults to 100.                                                                                                                                                                                                                                                                                                                                                                                                                |
| `offset`                     | integer                    | No       | -              | Number of rows to skip, for paging.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `top_n`                      | integer                    | No       | `5`            | domains comparison: how many entries to keep in each distribution per row, 1 to 10. Defaults to 5.                                                                                                                                                                                                                                                                                                                                                                            |
| `fields`                     | string or array of string  | No       | -              | Per-target result columns to keep, addressing a target by its position in the targets list: domain\_intersection.1.rank, domain\_intersection.1.backlinks, domain\_intersection.2.rank (domains comparison) or page\_intersection.1.url\_to, page\_intersection.1.anchor, page\_intersection.1.dofollow (pages comparison). The referring\_domain, referring\_page and intersections\_count columns are always returned. Leave empty for a compact set covering every target. |

### FilterItem

| Field      | Type                       | Required | Default | Description                                                                                                                                                                                                                                                                                 |
| ---------- | -------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `field`    | string or SelectableOption | Yes      | -       | The field to filter on, must be one of the current selected metrics or dimensions.                                                                                                                                                                                                          |
| `operator` | string                     | Yes      | -       | The operator to use for filtering. Must be one of the supported values. Use REGEXP\_MATCH to search/filter by multiple OR values like '.*(summer\|holiday).*'                                                                                                                               |
| `value`    | string                     | Yes      | -       | The value to filter by, always as a string: text, a number, or a regex. For IN\_LIST and NOT\_IN\_LIST, pass the values as one comma-separated string such as 'a,b,c', not as an array. For regex values, escape backslashes once in the JSON string: write \b for a word boundary, not \b. |

### OrderItem

| Field       | Type                       | Required | Default | Description                                                                      |
| ----------- | -------------------------- | -------- | ------- | -------------------------------------------------------------------------------- |
| `field`     | string or SelectableOption | Yes      | -       | The field to sort by. must be one of the current selected metrics or dimensions. |
| `direction` | string                     | Yes      | -       | The order to sort by, must be one of 'ASC', 'DESC'                               |

### SelectableOption

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

## Output

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

Every row starts with referring\_domain, referring\_page (pages comparison only) and intersections\_count, followed by one block of columns per compared target, numbered by its position in the targets list. domains comparison: domain\_intersection.N.rank, .backlinks, .referring\_pages, .first\_seen. pages comparison: page\_intersection.N.url\_to, .anchor, .dofollow, .domain\_from\_rank, .first\_seen. The full per-target profile and the referring\_links\_\* maps are available through fields.

**Fields**: `referring_domain`, `intersections_count`, `domain_intersection.1.rank`, `domain_intersection.1.backlinks`, `domain_intersection.2.rank`, `domain_intersection.2.backlinks`

**Example**:

```json theme={"dark"}
[
  {
    "referring_domain": "blog.example.com",
    "intersections_count": 2,
    "domain_intersection.1.backlinks": 4,
    "domain_intersection.2.backlinks": 11
  }
]
```
