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

> List the individual backlinks pointing to a domain, subdomain or page from DataForSEO, with the linking URL and page title, anchor text, dofollow, source rank and spam score, and first and last see...

List the individual backlinks pointing to a domain, subdomain or page from DataForSEO, with the linking URL and page title, anchor text, dofollow, source rank and spam score, and first and last seen dates. Filter to new, lost or broken links. Needs the DataForSEO Backlinks subscription.

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

## Inputs

| Field                        | Type                       | Required | Default        | Description                                                                                                                                                                                                                                                                                                                                                             |
| ---------------------------- | -------------------------- | -------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target`                     | string                     | Yes      | -              | Domain, subdomain or page to analyse. Domains go in bare (example.com, blog.example.com); a single page needs its full URL (`https://example.com/pricing`).                                                                                                                                                                                                             |
| `include_subdomains`         | boolean                    | No       | `True`         | Count links to subdomains of the target as well. Defaults to true.                                                                                                                                                                                                                                                                                                      |
| `exclude_internal_backlinks` | boolean                    | No       | `True`         | Leave out links coming from the target's own subdomains. Defaults to true.                                                                                                                                                                                                                                                                                              |
| `backlinks_status_type`      | string or SelectableOption | No       | `live`         | Which backlinks to count: 'live' (default, found on the last crawl), 'all' (live and lost together) or 'lost' (only links that disappeared).                                                                                                                                                                                                                            |
| `rank_scale`                 | string or SelectableOption | No       | `one_thousand` | Scale for the rank, domain\_from\_rank and page\_from\_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).                                                                                                                                                              |
| `mode`                       | string or SelectableOption | No       | `as_is`        | 'as\_is' (default) returns every backlink, 'one\_per\_domain' one backlink per referring domain, 'one\_per\_anchor' one backlink per anchor text.                                                                                                                                                                                                                       |
| `filters`                    | array of FilterItem        | No       | -              | Up to 8 filters on backlink fields, e.g. dofollow EQUALS true, domain\_from\_rank GREATER\_THAN 500, is\_new EQUALS true, anchor CONTAINS 'seo tools', backlink\_spam\_score LESS\_THAN 30, page\_from\_language EQUALS en.                                                                                                                                             |
| `orders`                     | array of OrderItem         | No       | -              | Sort by up to 3 backlink fields, e.g. domain\_from\_rank DESC or first\_seen DESC.                                                                                                                                                                                                                                                                                      |
| `limit`                      | integer                    | No       | `100`          | Maximum number of backlinks to return (1 to 1000). Defaults to 100.                                                                                                                                                                                                                                                                                                     |
| `offset`                     | integer                    | No       | -              | Number of backlinks to skip, for paging.                                                                                                                                                                                                                                                                                                                                |
| `fields`                     | string or array of string  | No       | -              | Result columns to keep, e.g. url\_from, url\_to, anchor, dofollow, domain\_from\_rank, page\_from\_rank, backlink\_spam\_score, first\_seen, last\_seen, is\_new, is\_lost, is\_broken, tld\_from, domain\_from\_country, page\_from\_title, text\_pre, text\_post, links\_count, semantic\_location. Leave empty for the default set listed in the output description. |

### 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]`

Returns one row per backlink. Default columns: url\_from, url\_to, anchor, dofollow, domain\_from\_rank, page\_from\_rank, backlink\_spam\_score, tld\_from, domain\_from\_country, page\_from\_title, links\_count, is\_new, is\_lost, is\_broken, first\_seen, last\_seen. Other columns available through fields include text\_pre, text\_post, semantic\_location, attributes, item\_type, page\_from\_language, page\_from\_size, page\_from\_external\_links, url\_to\_status\_code, url\_to\_spam\_score, is\_indirect\_link and ranked\_keywords\_info.

**Fields**: `url_from`, `url_to`, `anchor`, `dofollow`, `domain_from_rank`, `backlink_spam_score`, `first_seen`

**Example**:

```json theme={"dark"}
[
  {
    "url_from": "https://blog.example.com/seo-tools",
    "url_to": "https://ahrefs.com/",
    "anchor": "Ahrefs",
    "dofollow": true,
    "domain_from_rank": 412,
    "first_seen": "2024-03-11 08:12:04 +00:00"
  }
]
```
