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

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

# linkgraph_history

`POST https://mcp.oppalerts.com/mcp tool: 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.

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

**`hosts`list 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.

**`sort`pr_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 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." 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

### Call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "linkgraph_history",
    "arguments": {
      "hosts": [
        "example-hotels.com",
        "grand-resorts.example"
      ],
      "sort": "as_sent"
    }
  }
}
```

### Response

The full sample answer.

```json
{
  "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

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, 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 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/linkgraph/history HTTP/1.1
Host: api.oppalerts.com
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{"hosts": ["example-hotels.com", "grand-resorts.example"], "sort": "as_sent"}
```

See [POST /v1/linkgraph/history in the API](https://oppalerts.com/docs/api/linkgraph_history).

## Related pages

- [POST /v1/linkgraph/history in the API](https://oppalerts.com/docs/api/linkgraph_history)
- [Link Graph: Site in the web app](https://oppalerts.com/docs/app/siteinfo/linkgraph_site)
- [Link Graph: Multi-Site in the web app](https://oppalerts.com/docs/app/siteinfo/linkgraph_multisite)
- [account_calls_left: the calls left today](https://oppalerts.com/docs/mcp/account_calls_left)
