Documentation / API / linkgraph_history

linkgraph_history

POSThttps://api.oppalerts.com/v1/linkgraph/history

The month-by-month PageRank and PRoT of one or more hosts, at three levels: the host itself, its www variant, and its registrable domain.

What it does

The tool returns the PageRank and the PRoT of each host in the list, month by month, at three levels: the host itself, its www variant, and its registrable domain. Each result also includes pr_newest, the newest PageRank of each level, and pr_change, the change in PageRank since the first month with a score.

It needs no campaign. hosts and sort are required, at most 100 hosts.

Authentication

Send a token in the Authorization: Bearer header. How to get a token.

Parameters

hostslist of strings, required, at most 100 items
Bare hosts, subdomains, or full URLs, at most 100. Only the host is kept; a leading www. is removed.
sortpr_domain | pr_host | pr_domain_change | as_sent, required
The order of the results: pr_domain is the newest domain PageRank, pr_host is the newest host PageRank, pr_domain_change is the change of the domain PageRank, and as_sent is the order the hosts were sent.

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/linkgraph/history \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"hosts": ["example-hotels.com", "grand-resorts.example"], "sort": "as_sent"}'

Response

The full sample answer.

{
  "results": [
    {
      "query": "example-hotels.com",
      "found": true,
      "first_month": "2020-01",
      "last_month": "2026-08",
      "pr_newest": {
        "domain": 58,
        "host": 31,
        "www": 56
      },
      "pr_change": {
        "domain": 12,
        "host": -18,
        "www": -7
      },
      "months": [
        {
          "month": "2020-01",
          "domain": {
            "pr": 46,
            "prot": 51
          },
          "host": {
            "pr": 49,
            "prot": 52
          },
          "www": null
        },
        {
          "month": "2026-08",
          "domain": {
            "pr": 58,
            "prot": 62
          },
          "host": {
            "pr": 31,
            "prot": 38
          },
          "www": {
            "pr": 56,
            "prot": 60
          }
        }
      ]
    },
    {
      "query": "grand-resorts.example",
      "found": false,
      "first_month": "",
      "last_month": "",
      "pr_newest": {
        "domain": null,
        "host": null,
        "www": null
      },
      "pr_change": {
        "domain": null,
        "host": null,
        "www": null
      },
      "months": []
    }
  ]
}

Response fields

  • results: one entry for each host that you sent.
query
The host as you sent it.
found
true when the link graph has the host, false when it does not.
first_month, last_month
The first and last months with a score, as YYYY-MM. Empty strings when the host is not found.
pr_newest
The newest PageRank at each level: domain, host, www. A level with no data is null.
pr_change
The change in PageRank since the first month with a score, at the same three levels. A level with no data is null.
months
One entry for each month. Each entry has month, and domain, host, and www as {"pr": n, "prot": n} or null. The list is empty when the host is not found.

Errors

  • bad_param (HTTP 400): a field is not a field of this tool, a required field is not sent, a value has the wrong type or is out of its range, or the hosts list is empty or has more than 100 items. 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 linkgraph_history gives the same data. See linkgraph_history in MCP.