<!-- The markdown copy of https://oppalerts.com/docs/mcp/backlinks . All pages: https://oppalerts.com/docs/llms.txt -->

[Documentation](https://oppalerts.com/docs/) / [MCP](https://oppalerts.com/docs/mcp/) / backlinks

# backlinks

`POST https://mcp.oppalerts.com/mcp tool: backlinks`

The sites that link to one or more of the sites named, from the stored link graph, with the PageRank, the backlink count, and the outbound link count of each linking site.

## What it does

The tool lists the sites that link to one or more of the sites you name, 1 to 10 sites. It reads the stored link graph. It groups the linkers by how many of the named sites each linker links to. With 1 site, there is one group. A site that links to several of your competitors is a site that links out in your market.

The answer has `level`, `resolved`, the named sites that were found, `not_found`, the named sites that could not be resolved, and `groups`. Each group has `links_to_count`, the number of named sites that its linkers link to, then `total`, `returned`, and `sites`. Each site has `site`, `pr` (the PageRank), `backlinks`, `outbound`, and `links_to`, the named sites that it links to.

`sites`, `level`, and `sort` are required. `links_to_count_min` above the number of sites that you send is refused, and so is a minimum above its maximum. A field that you do not send applies no condition. The one default is `results_limit`: 100 rows in each group when you do not send it.

For the linkers of one site, send 1 site in `sites`.

This tool has its own daily count. It is not an index search, so it is not part of the shared count of the `news_` and `prospects_` tools. [account_calls_left](https://oppalerts.com/docs/mcp/account_calls_left) shows the calls that are left today.

## Connect

```bash
claude mcp add --transport http oppalerts https://mcp.oppalerts.com/mcp
```

The first call opens a browser window for the OppAlerts login. [Connect an AI Agent](https://oppalerts.com/docs/mcp/) has the details.

## Parameters

**`sites`list of strings, required, 1 to 10 items**

The sites to find linkers for, 1 to 10 sites. Each site is a domain or a host of at most 255 characters.

**`links_to_count_min`int, optional, 1 to 10**

The minimum number of sites in the sites list that a linking site must link to, a whole number from 1 to the number of sites that you send. A larger number is refused. 1 is every linker. Not sent: every linker, which links to one or more of the sites.

**`level`domain | host, required**

domain: a row is a whole domain. host: a row is one host.

**`sort`pr | backlinks | name, required**

The order of the rows: pr is by PageRank, backlinks is by the backlink count, and name is by the site name. When more rows match than `results_limit`, the order also determines which rows are returned.

**`results_limit`int, optional, 1 to 5000**

The maximum number of rows to return in each group, a whole number from 1 to 5000. Not sent: 100.

**`pr_min`int, optional, 0 to 100**

Keep the rows whose PageRank is at least this value, a whole number from 0 to 100. 0 applies no minimum. Not sent: no minimum. Refused when it is above `pr_max`.

**`pr_max`int, optional, 0 to 100**

Keep the rows whose PageRank is at most this value, a whole number from 0 to 100. Not sent: no maximum.

**`backlinks_min`int, optional, 0 to 4294967295**

Keep the rows whose backlink count is at least this value, a whole number from 0 to 4294967295. 0 applies no minimum. Not sent: no minimum. Refused when it is above `backlinks_max`.

**`backlinks_max`int, optional, 0 to 4294967295**

Keep the rows whose backlink count is at most this value, a whole number from 0 to 4294967295. Not sent: no maximum.

**`outbound_min`int, optional, 0 to 4294967295**

Keep the rows whose outbound link count is at least this value, a whole number from 0 to 4294967295. 0 applies no minimum. Not sent: no minimum. Refused when it is above `outbound_max`.

**`outbound_max`int, optional, 0 to 4294967295**

Keep the rows whose outbound link count is at most this value, a whole number from 0 to 4294967295. A very high outbound count is often a link farm. Not sent: no maximum.

## Strict Rules

- A field that is not in the list above is refused. The result then has `isError` true, and its text starts with `bad_param`. The error names the field: "<field> is not a field of this tool."
- A bad value is refused, and the error names the field. A bad value is a value of the wrong type, a number with a fraction for a whole-number field, a value out of its range, a value that is not in its list, or an empty text or list. A required field that you do not send is refused too. The tool never changes a value that you send.
- An error about the format of a call, such as a refused field, names the field. Its message ends with one sentence: "Read the documentation at https://oppalerts.com/docs for the correct format." Every other error has only its own sentence.

## Example

### Call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "backlinks",
    "arguments": {
      "sites": [
        "grand-resorts.example",
        "cozyinns.example",
        "urban-suites.example"
      ],
      "links_to_count_min": 2,
      "level": "domain",
      "sort": "pr",
      "results_limit": 100
    }
  }
}
```

### Response

The full sample answer.

```json
{
  "level": "domain",
  "resolved": [
    "grand-resorts.example",
    "cozyinns.example",
    "urban-suites.example"
  ],
  "not_found": [
    "unresolvable.example"
  ],
  "groups": [
    {
      "links_to_count": 3,
      "total": 412,
      "returned": 100,
      "sites": [
        {
          "site": "travelweekly-example.com",
          "pr": 74,
          "backlinks": 189204,
          "outbound": 88012,
          "links_to": [
            "grand-resorts.example",
            "cozyinns.example",
            "urban-suites.example"
          ]
        }
      ]
    },
    {
      "links_to_count": 2,
      "total": 2381,
      "returned": 100,
      "sites": [
        {
          "site": "cityguide-example.org",
          "pr": 61,
          "backlinks": 20411,
          "outbound": 9310,
          "links_to": [
            "grand-resorts.example",
            "urban-suites.example"
          ]
        }
      ]
    }
  ]
}
```

## Errors

An error returns as a tool result with `isError` true. Its text starts with the error code, except for `daily_limit`, whose text is only the sentence. The HTTP status shown for each code is its API status.

- `bad_param` (HTTP 400 in the API): a field is not a field of this tool, a required field is not sent, or a value has the wrong type or is out of its range. The error names the field.
- `backend_error` (HTTP 502 in the API): the data server did not answer, or its answer could not be read. Try again in a few minutes.
- `daily_limit` (HTTP 429 in the API): the account has used all its calls for this tool today. [account_calls_left](https://oppalerts.com/docs/mcp/account_calls_left) shows when the count resets.

This tool has its own daily count. Calls through the API, MCP, and the web app use this count. It is not an index search, so it does not use the shared count of the `news_` and `prospects_` tools, and the error `one_at_a_time` does not apply to it.

## Same data in the API

```http
POST /v1/backlinks HTTP/1.1
Host: api.oppalerts.com
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{"sites": ["grand-resorts.example", "cozyinns.example", "urban-suites.example"], "links_to_count_min": 2, "level": "domain", "sort": "pr", "results_limit": 100}
```

The API page is [POST /v1/backlinks](https://oppalerts.com/docs/api/backlinks).

## Related pages

- [POST /v1/backlinks in the API](https://oppalerts.com/docs/api/backlinks)
- [Backlinks DB: Site in the web app](https://oppalerts.com/docs/app/siteinfo/backlinks_site)
- [Backlinks DB: Multi-Site in the web app](https://oppalerts.com/docs/app/siteinfo/backlinks_multisite)
- [backlinks_link_gap: the same search minus your own linkers](https://oppalerts.com/docs/mcp/backlinks_link_gap)
- [Use case: find competitor backlink gaps](https://oppalerts.com/docs/how-to/find-competitor-backlink-gaps)
