Documentation / API / backlinks_link_gap

backlinks_link_gap

POSThttps://api.oppalerts.com/v1/backlinks/link_gap

The link gap: sites that link to the sites named and do not link to any of your excluded sites.

What it does

The tool finds the link gap: the sites that link to the sites you name and do not link to any of your own sites. It returns the results of backlinks, minus every linker you already have. Put your competitors in sites and your own sites in exclude_sites.

The answer adds excluded_resolved, your own sites that were resolved, and excluded_count, the number of linkers that were dropped. Each row has site, pr (the PageRank), backlinks, outbound, and links_to, as in backlinks.

sites, exclude_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.

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 shows the calls that are left today.

Authentication

Send a token in the Authorization: Bearer header. Authentication and Limits explains the tokens.

Parameters

siteslist of strings, required, 2 to 10 items
The sites to find linkers for, 2 to 10 sites. Your competitors go here.
exclude_siteslist of strings, required, 1 to 10 items
Your own sites, 1 to 10 sites. A linker that already links to one of these is not in the answer.
links_to_count_minint, optional, 2 to 10
The minimum number of sites in the sites list that a linking site must link to, a whole number from 2 to the number of sites that you send. A larger number is refused. Not sent: every linker, which links to one or more of the sites.
leveldomain | host, required
domain: a row is a whole domain. host: a row is one host.
sortpr | 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_limitint, 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_minint, 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_maxint, 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_minint, 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_maxint, 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_minint, 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_maxint, 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 answer is HTTP 400 with the error code bad_param. The error names the field: "<field> is not a field of this tool." The old name of a renamed field is refused in the same way.
  • 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, or a value that is not in its 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

Request

curl -X POST https://api.oppalerts.com/v1/backlinks/link_gap \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sites": ["grand-resorts.example", "cozyinns.example"], "exclude_sites": ["example-hotels.com"], "level": "domain", "sort": "pr", "results_limit": 100}'

Response

The full sample answer.

{
  "level": "domain",
  "resolved": [
    "grand-resorts.example",
    "cozyinns.example"
  ],
  "not_found": [
    "unresolvable.example"
  ],
  "excluded_resolved": [
    "example-hotels.com"
  ],
  "excluded_count": 1873,
  "groups": [
    {
      "links_to_count": 2,
      "total": 508,
      "returned": 100,
      "sites": [
        {
          "site": "cityguide-example.org",
          "pr": 61,
          "backlinks": 20411,
          "outbound": 9310,
          "links_to": [
            "grand-resorts.example",
            "cozyinns.example"
          ]
        }
      ]
    },
    {
      "links_to_count": 1,
      "total": 6120,
      "returned": 100,
      "sites": [
        {
          "site": "roadtripjournal.example",
          "pr": 42,
          "backlinks": 3120,
          "outbound": 1804,
          "links_to": [
            "cozyinns.example"
          ]
        }
      ]
    }
  ]
}

Errors

  • bad_param (HTTP 400): 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): the data server did not answer, or its answer could not be read. Try again in a few minutes.
  • daily_limit (HTTP 429): the account has used all its calls for this tool today. 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 tool in MCP

The MCP tool is backlinks_link_gap. Read the MCP page.