> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Ahrefs

> Ahrefs API v3: Domain Rating, backlinks, referring domains, organic keywords, top pages and keyword metrics.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/ahrefs.svg?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=e33ec560ac24d3916aa8db2e3081cc54)

[Web Catalog · SEO](https://docs.webrouter.net/data-apis.md?category=seo)

Needs&#x20;

`AHREFS_API_KEY`

Endpoints

10

Auth

Key in header

[Vendor docs](https://docs.ahrefs.com/api/docs/introduction.md)

&#x20;·&#x20;

[Pricing](https://ahrefs.com/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `AHREFS_API_KEY` | required | An Ahrefs API v3 key (Account settings > API keys; workspace owners and admins only). Sent as a Bearer token. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* API access needs an eligible paid plan; other plans only get a limited set of free test queries.
* Billing is in API units: each request costs max(50, per-row cost x rows), where a field costs 1 unit by default and some metrics 5 or 10. Select few columns and set limit.
* 60 requests per minute by default; 429 also comes from load-based throttling.
* Most site-explorer and keyword calls require select (columns) and date; dates are YYYY-MM-DD.

## Endpoints

GET

Get Domain Rating

Domain Rating (0-100) and Ahrefs Rank of a domain on a date.

[Open](#ahrefs-domain-rating)

GET

Get site organic and paid metrics

Organic keywords, traffic and value, plus paid metrics, for a domain or URL.

[Open](#ahrefs-metrics)

GET

Get backlink totals

Live and all-time backlink and referring-domain counts for a target.

[Open](#ahrefs-backlinks-stats)

GET

List backlinks

Backlinks to a target with the columns you select.

[Open](#ahrefs-backlinks)

GET

List referring domains

Domains linking to a target, with the columns you select.

[Open](#ahrefs-refdomains)

GET

List organic keywords

Keywords a target ranks for in organic search, with position, volume and traffic.

[Open](#ahrefs-organic-keywords)

GET

List top pages by traffic

A target's pages ranked by organic traffic.

[Open](#ahrefs-top-pages)

GET

Get keyword metrics

Volume, difficulty, CPC, clicks and other metrics for given keywords.

[Open](#ahrefs-keywords-overview)

GET

Find matching keyword ideas

Keyword ideas containing the seed keywords' words, with metrics.

[Open](#ahrefs-matching-terms)

GET

Get API limits and usage

The subscription's API unit limit and usage.

[Open](#ahrefs-limits)

### Get Domain Rating

GET

`/site-explorer/domain-rating`

`ahrefs.domain_rating`

Domain Rating (0-100) and Ahrefs Rank of a domain on a date.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`date` required</td><td>string</td><td>query</td><td>Date to report on, YYYY-MM-DD. Example `2026-11-01`</td></tr>
    <tr><td>`target` required</td><td>string</td><td>query</td><td>Domain or URL. Example `ahrefs.com`</td></tr>
    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `csv`, `xml`, `php`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/reference/site-explorer.json) · Same job: [DataForSEO](https://docs.webrouter.net/data-apis/dataforseo.md#dataforseo-labs-domain-rank-overview), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-links-metrics), [Semrush](https://docs.webrouter.net/data-apis/semrush.md#semrush-overview-domain-rank), [Similarweb](https://docs.webrouter.net/data-apis/similarweb.md#similarweb-rank-global)

```python Python theme={null}
router.call_data_api("ahrefs.domain_rating", {'date': '2026-11-01', 'target': 'ahrefs.com'})
```

```text MCP theme={null}
call_data_api(endpoint="ahrefs.domain_rating", params={"date": "2026-11-01", "target": "ahrefs.com"})
```

### Get site organic and paid metrics

GET

`/site-explorer/metrics`

`ahrefs.metrics`

Organic keywords, traffic and value, plus paid metrics, for a domain or URL.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`date` required</td><td>string</td><td>query</td><td>Date to report on, YYYY-MM-DD. Example `2026-11-01`</td></tr>
    <tr><td>`target` required</td><td>string</td><td>query</td><td>Domain or URL. Example `ahrefs.com`</td></tr>
    <tr><td>`mode`</td><td>string</td><td>query</td><td>Scope of the target. One of `exact`, `prefix`, `domain`, `subdomains`</td></tr>
    <tr><td>`protocol`</td><td>string</td><td>query</td><td>Protocol of the target. One of `both`, `http`, `https`</td></tr>
    <tr><td>`country`</td><td>string</td><td>query</td><td>Two-letter country code (ISO 3166-1 alpha-2). Example `us`</td></tr>
    <tr><td>`volume_mode`</td><td>string</td><td>query</td><td>Search volume mode; affects volume, traffic and traffic value. One of `monthly`, `average`</td></tr>
    <tr><td>`traffic_mode`</td><td>string</td><td>query</td><td>Organic traffic mode. One of `static`, `adaptive`</td></tr>
    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `csv`, `xml`, `php`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/reference/site-explorer.json) · Same job: [Adyntel](https://docs.webrouter.net/data-apis/adyntel.md#adyntel-domain-keywords), [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-company-traffic), [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-company-web-traffic), [Keywords Everywhere](https://docs.webrouter.net/data-apis/keywordseverywhere.md#keywordseverywhere-domain-traffic), [Majestic](https://docs.webrouter.net/data-apis/majestic.md#majestic-index-item-info), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-site-overview)

```python Python theme={null}
router.call_data_api("ahrefs.metrics", {'date': '2026-11-01', 'target': 'ahrefs.com', 'country': 'us'})
```

```text MCP theme={null}
call_data_api(endpoint="ahrefs.metrics", params={"date": "2026-11-01", "target": "ahrefs.com", "country": "us"})
```

### Get backlink totals

GET

`/site-explorer/backlinks-stats`

`ahrefs.backlinks_stats`

Live and all-time backlink and referring-domain counts for a target.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`date` required</td><td>string</td><td>query</td><td>Date to report on, YYYY-MM-DD. Example `2026-11-01`</td></tr>
    <tr><td>`target` required</td><td>string</td><td>query</td><td>Domain or URL. Example `ahrefs.com`</td></tr>
    <tr><td>`mode`</td><td>string</td><td>query</td><td>Scope of the target. One of `exact`, `prefix`, `domain`, `subdomains`</td></tr>
    <tr><td>`protocol`</td><td>string</td><td>query</td><td>Protocol of the target. One of `both`, `http`, `https`</td></tr>
    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `csv`, `xml`, `php`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/reference/site-explorer.json) · Same job: [DataForSEO](https://docs.webrouter.net/data-apis/dataforseo.md#dataforseo-backlinks-summary), [Semrush](https://docs.webrouter.net/data-apis/semrush.md#semrush-backlinks-overview), [SE Ranking](https://docs.webrouter.net/data-apis/seranking.md#seranking-backlinks-summary), [Serpstat](https://docs.webrouter.net/data-apis/serpstat.md#serpstat-backlinks-summary)

```python Python theme={null}
router.call_data_api("ahrefs.backlinks_stats", {'date': '2026-11-01', 'target': 'ahrefs.com'})
```

```text MCP theme={null}
call_data_api(endpoint="ahrefs.backlinks_stats", params={"date": "2026-11-01", "target": "ahrefs.com"})
```

### List backlinks

GET

`/site-explorer/all-backlinks`

`ahrefs.backlinks`

Backlinks to a target with the columns you select.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `select`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated columns to return (see the response schema in the reference).
      </td>
    </tr>

    <tr>
      <td>
        `where`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filter expression; syntax at docs.ahrefs.com/api/docs/filter-syntax.md. Its column names differ from select.
      </td>
    </tr>

    <tr>
      <td>
        `order_by`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Columns to order by, with optional :asc/:desc.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Rows to return.
      </td>
    </tr>

    <tr>
      <td>
        `timeout`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Manual timeout in seconds.
      </td>
    </tr>

    <tr><td>`aggregation`</td><td>string</td><td>query</td><td>Grouping: similar\_links, 1\_per\_domain or all. One of `similar_links`, `1_per_domain`, `all`</td></tr>

    <tr>
      <td>
        `history`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Add lost links: live (none), since:\<YYYY-MM-DD>, or all\_time.
      </td>
    </tr>

    <tr><td>`target` required</td><td>string</td><td>query</td><td>Domain or URL. Example `ahrefs.com`</td></tr>
    <tr><td>`mode`</td><td>string</td><td>query</td><td>Scope of the target. One of `exact`, `prefix`, `domain`, `subdomains`</td></tr>
    <tr><td>`protocol`</td><td>string</td><td>query</td><td>Protocol of the target. One of `both`, `http`, `https`</td></tr>
    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `csv`, `xml`, `php`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/reference/site-explorer.json) · Same job: [Bing Webmaster Tools](https://docs.webrouter.net/data-apis/bing-webmaster.md#bing-webmaster-links-counts), [Keywords Everywhere](https://docs.webrouter.net/data-apis/keywordseverywhere.md#keywordseverywhere-domain-backlinks), [Majestic](https://docs.webrouter.net/data-apis/majestic.md#majestic-backlinks-list), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-links-list), [Moz](https://docs.webrouter.net/data-apis/moz.md#moz-links-links), [Semrush](https://docs.webrouter.net/data-apis/semrush.md#semrush-backlinks-list)

> [!NOTE]
>
> * Cost grows with rows x columns: select only the columns needed and set limit.

### List referring domains

GET

`/site-explorer/refdomains`

`ahrefs.refdomains`

Domains linking to a target, with the columns you select.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `select`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated columns to return (see the response schema in the reference).
      </td>
    </tr>

    <tr>
      <td>
        `where`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filter expression; syntax at docs.ahrefs.com/api/docs/filter-syntax.md. Its column names differ from select.
      </td>
    </tr>

    <tr>
      <td>
        `order_by`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Columns to order by, with optional :asc/:desc.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Rows to return.
      </td>
    </tr>

    <tr>
      <td>
        `timeout`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Manual timeout in seconds.
      </td>
    </tr>

    <tr>
      <td>
        `history`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Add lost links: live (none), since:\<YYYY-MM-DD>, or all\_time.
      </td>
    </tr>

    <tr><td>`target` required</td><td>string</td><td>query</td><td>Domain or URL. Example `ahrefs.com`</td></tr>
    <tr><td>`mode`</td><td>string</td><td>query</td><td>Scope of the target. One of `exact`, `prefix`, `domain`, `subdomains`</td></tr>
    <tr><td>`protocol`</td><td>string</td><td>query</td><td>Protocol of the target. One of `both`, `http`, `https`</td></tr>
    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `csv`, `xml`, `php`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/reference/site-explorer.json) · Same job: [Majestic](https://docs.webrouter.net/data-apis/majestic.md#majestic-backlinks-refdomains), [Moz](https://docs.webrouter.net/data-apis/moz.md#moz-links-linking-root-domains), [Semrush](https://docs.webrouter.net/data-apis/semrush.md#semrush-backlinks-refdomains), [SE Ranking](https://docs.webrouter.net/data-apis/seranking.md#seranking-backlinks-refdomains), [Similarweb](https://docs.webrouter.net/data-apis/similarweb.md#similarweb-traffic-referrals)

### List organic keywords

GET

`/site-explorer/organic-keywords`

`ahrefs.organic_keywords`

Keywords a target ranks for in organic search, with position, volume and traffic.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `select`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated columns to return (see the response schema in the reference).
      </td>
    </tr>

    <tr>
      <td>
        `where`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filter expression; syntax at docs.ahrefs.com/api/docs/filter-syntax.md. Its column names differ from select.
      </td>
    </tr>

    <tr>
      <td>
        `order_by`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Columns to order by, with optional :asc/:desc.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Rows to return.
      </td>
    </tr>

    <tr>
      <td>
        `timeout`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Manual timeout in seconds.
      </td>
    </tr>

    <tr><td>`volume_mode`</td><td>string</td><td>query</td><td>Search volume mode; affects volume, traffic and traffic value. One of `monthly`, `average`</td></tr>
    <tr><td>`traffic_mode`</td><td>string</td><td>query</td><td>Organic traffic mode. One of `static`, `adaptive`</td></tr>
    <tr><td>`date` required</td><td>string</td><td>query</td><td>Date to report on, YYYY-MM-DD. Example `2026-11-01`</td></tr>

    <tr>
      <td>
        `date_compared`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Date to compare with, YYYY-MM-DD.
      </td>
    </tr>

    <tr><td>`country`</td><td>string</td><td>query</td><td>Two-letter country code (ISO 3166-1 alpha-2). Example `us`</td></tr>
    <tr><td>`target` required</td><td>string</td><td>query</td><td>Domain or URL. Example `ahrefs.com`</td></tr>
    <tr><td>`mode`</td><td>string</td><td>query</td><td>Scope of the target. One of `exact`, `prefix`, `domain`, `subdomains`</td></tr>
    <tr><td>`protocol`</td><td>string</td><td>query</td><td>Protocol of the target. One of `both`, `http`, `https`</td></tr>
    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `php`, `xml`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/reference/site-explorer.json) · Same job: [Keywords Everywhere](https://docs.webrouter.net/data-apis/keywordseverywhere.md#keywordseverywhere-domain-keywords), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-domain-keywords), [Semrush](https://docs.webrouter.net/data-apis/semrush.md#semrush-domain-organic-keywords), [Serpstat](https://docs.webrouter.net/data-apis/serpstat.md#serpstat-domain-keywords)

### List top pages by traffic

GET

`/site-explorer/top-pages`

`ahrefs.top_pages`

A target's pages ranked by organic traffic.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `select`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated columns to return (see the response schema in the reference).
      </td>
    </tr>

    <tr>
      <td>
        `where`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filter expression; syntax at docs.ahrefs.com/api/docs/filter-syntax.md. Its column names differ from select.
      </td>
    </tr>

    <tr>
      <td>
        `order_by`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Columns to order by, with optional :asc/:desc.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Rows to return.
      </td>
    </tr>

    <tr>
      <td>
        `timeout`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Manual timeout in seconds.
      </td>
    </tr>

    <tr><td>`volume_mode`</td><td>string</td><td>query</td><td>Search volume mode; affects volume, traffic and traffic value. One of `monthly`, `average`</td></tr>
    <tr><td>`traffic_mode`</td><td>string</td><td>query</td><td>Organic traffic mode. One of `static`, `adaptive`</td></tr>
    <tr><td>`date` required</td><td>string</td><td>query</td><td>Date to report on, YYYY-MM-DD. Example `2026-11-01`</td></tr>

    <tr>
      <td>
        `date_compared`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Date to compare with, YYYY-MM-DD.
      </td>
    </tr>

    <tr><td>`country`</td><td>string</td><td>query</td><td>Two-letter country code (ISO 3166-1 alpha-2). Example `us`</td></tr>
    <tr><td>`target` required</td><td>string</td><td>query</td><td>Domain or URL. Example `ahrefs.com`</td></tr>
    <tr><td>`mode`</td><td>string</td><td>query</td><td>Scope of the target. One of `exact`, `prefix`, `domain`, `subdomains`</td></tr>
    <tr><td>`protocol`</td><td>string</td><td>query</td><td>Protocol of the target. One of `both`, `http`, `https`</td></tr>
    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `csv`, `xml`, `php`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/reference/site-explorer.json) · Same job: [Majestic](https://docs.webrouter.net/data-apis/majestic.md#majestic-domain-top-pages), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-site-top-content), [Moz](https://docs.webrouter.net/data-apis/moz.md#moz-links-top-pages), [SpyFu](https://docs.webrouter.net/data-apis/spyfu.md#spyfu-seo-top-pages)

### Get keyword metrics

GET

`/keywords-explorer/overview`

`ahrefs.keywords_overview`

Volume, difficulty, CPC, clicks and other metrics for given keywords.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `select`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated columns to return (see the response schema in the reference).
      </td>
    </tr>

    <tr>
      <td>
        `where`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filter expression; syntax at docs.ahrefs.com/api/docs/filter-syntax.md. Its column names differ from select.
      </td>
    </tr>

    <tr>
      <td>
        `order_by`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Columns to order by, with optional :asc/:desc.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Rows to return.
      </td>
    </tr>

    <tr>
      <td>
        `timeout`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Manual timeout in seconds.
      </td>
    </tr>

    <tr><td>`keywords`</td><td>string</td><td>query</td><td>Comma-separated keywords. Example `seo tools`</td></tr>

    <tr>
      <td>
        `keyword_list_id`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        An existing keyword list's ID, instead of keywords.
      </td>
    </tr>

    <tr><td>`country` required</td><td>string</td><td>query</td><td>Country code, or all (then keywords or keyword\_list\_id is required). Example `us`</td></tr>

    <tr>
      <td>
        `target`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Domain or URL, used with target\_position.
      </td>
    </tr>

    <tr><td>`target_position`</td><td>string</td><td>query</td><td>Keep keywords where the target ranks in\_top10 or in\_top100. One of `in_top10`, `in_top100`</td></tr>
    <tr><td>`mode`</td><td>string</td><td>query</td><td>Scope of the target. One of `exact`, `prefix`, `domain`, `subdomains`</td></tr>

    <tr>
      <td>
        `volume_monthly_date_from`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Start, YYYY-MM-DD, for volume\_monthly\_history.
      </td>
    </tr>

    <tr>
      <td>
        `volume_monthly_date_to`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        End, YYYY-MM-DD, for volume\_monthly\_history.
      </td>
    </tr>

    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `php`, `xml`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/reference/keywords-explorer.json) · Same job: [Bing Webmaster Tools](https://docs.webrouter.net/data-apis/bing-webmaster.md#bing-webmaster-keywords-stats), [DataForSEO](https://docs.webrouter.net/data-apis/dataforseo.md#dataforseo-keywords-google-ads-volume), [Google Ads](https://docs.webrouter.net/data-apis/google-ads.md#google-ads-keywords-historical-metrics), [Keywords Everywhere](https://docs.webrouter.net/data-apis/keywordseverywhere.md#keywordseverywhere-keyword-data), [Semrush](https://docs.webrouter.net/data-apis/semrush.md#semrush-keyword-overview-all-databases), [SE Ranking](https://docs.webrouter.net/data-apis/seranking.md#seranking-keywords-export)

### Find matching keyword ideas

GET

`/keywords-explorer/matching-terms`

`ahrefs.matching_terms`

Keyword ideas containing the seed keywords' words, with metrics.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `select`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated columns to return (see the response schema in the reference).
      </td>
    </tr>

    <tr>
      <td>
        `where`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filter expression; syntax at docs.ahrefs.com/api/docs/filter-syntax.md. Its column names differ from select.
      </td>
    </tr>

    <tr>
      <td>
        `order_by`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Columns to order by, with optional :asc/:desc.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Rows to return.
      </td>
    </tr>

    <tr>
      <td>
        `timeout`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Manual timeout in seconds.
      </td>
    </tr>

    <tr><td>`keywords`</td><td>string</td><td>query</td><td>Comma-separated seed keywords. Example `seo tools`</td></tr>

    <tr>
      <td>
        `keyword_list_id`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        An existing keyword list's ID, instead of keywords.
      </td>
    </tr>

    <tr><td>`country` required</td><td>string</td><td>query</td><td>Country code, or all. Example `us`</td></tr>
    <tr><td>`terms`</td><td>string</td><td>query</td><td>all ideas, questions only, or global (including translations). One of `all`, `questions`, `global`</td></tr>
    <tr><td>`match_mode`</td><td>string</td><td>query</td><td>terms: words in any order; phrase: exact order. One of `terms`, `phrase`</td></tr>
    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `php`, `xml`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/reference/keywords-explorer.json) · Same job: [DataForSEO](https://docs.webrouter.net/data-apis/dataforseo.md#dataforseo-labs-keyword-ideas), [Google Ads](https://docs.webrouter.net/data-apis/google-ads.md#google-ads-keywords-ideas), [Keywords Everywhere](https://docs.webrouter.net/data-apis/keywordseverywhere.md#keywordseverywhere-related-keywords), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-keywords-related), [Semrush](https://docs.webrouter.net/data-apis/semrush.md#semrush-keyword-related), [SE Ranking](https://docs.webrouter.net/data-apis/seranking.md#seranking-keywords-related)

> [!NOTE]
>
> * limit max is 150000; each row costs units.

### Get API limits and usage

GET

`/subscription-info/limits-and-usage`

`ahrefs.limits`

The subscription's API unit limit and usage.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`output`</td><td>string</td><td>query</td><td>Output format; default json. One of `json`, `csv`, `xml`, `php`</td></tr>
  </tbody>
</table>

[Vendor docs](https://docs.ahrefs.com/openapi.json)

```python Python theme={null}
router.call_data_api("ahrefs.limits")
```

```text MCP theme={null}
call_data_api(endpoint="ahrefs.limits")
```

> [!NOTE]
>
> * Free: consumes no API units.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.