Ahrefs API

Ahrefs Traffic API

Get the Ahrefs organic traffic overview for any domain or URL: monthly traffic estimate and value, the top 5 keywords it already ranks for with position and traffic, top pages, traffic by country, and a monthly traffic history - as normalized JSON. For a domain's full ranked-keyword list with search volume and difficulty, use seo.ranked_keywords.

$5.01/1k req, pay per request, no subscription.

What the API returneditems[0]
{
"domain": "stripe.com",
"mode": "subdomains",
"monthlyTraffic": 6420000,
"monthlyTrafficValueUsd": 8930000,
"topKeywords": [...],
"topPages": [...],
"topCountries": [...],
"trafficHistory": [...]
}
Uptime
99.82%
30d · 552 calls
Requests
552
30d · weekly, last 12 wks
Response
9.0s
median · 30d

Pricing

Ahrefs Traffic API pricing

You pay
$50.10
$5.01/1k req, only for what you use. No monthly plan.
Your first 19 requests are free with the $0.10 starting balance.

Try it

Get Ahrefs traffic in one request

Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.

This sample shows 21 of 22 fields. See every field

{
  "found": true,
  "data": {
    "items": [
      {
        "domain": "stripe.com",
        "mode": "subdomains",
        "monthlyTraffic": 6420000,
        "monthlyTrafficValueUsd": 8930000,
        "topKeywords": [
          {
            "keyword": "stripe",
            "position": 1,
            "traffic": 1840000
          },
          {
            "keyword": "stripe payments",
            "position": 1,
            "traffic": 312000
          },
          {
            "keyword": "stripe api",
            "position": 2,
            "traffic": 198000
          }
        ],
        "topPages": [
          {
            "url": "https://stripe.com/pricing",
            "traffic": 412000,
            "sharePct": 6.4
          },
          {
            "url": "https://stripe.com/docs/api",
            "traffic": 356000,
            "sharePct": 5.5
          },
          {
            "url": "https://stripe.com/payments",
            "traffic": 289000,
            "sharePct": 4.5
          }
        ],
        "topCountries": [
          {
            "country": "us",
            "sharePct": 41.2
          },
          {
            "country": "gb",
            "sharePct": 9.8
          },
          {
            "country": "in",
            "sharePct": 7.3
          }
        ],
        "trafficHistory": [
          {
            "monthUtc": 1719792000,
            "organicTraffic": 5810000
          },
          {
            "monthUtc": 1722470400,
            "organicTraffic": 5940000
          },
          {
            "monthUtc": 1725148800,
            "organicTraffic": 6120000
          },
          {
            "monthUtc": 1727740800,
            "organicTraffic": 6205000
          },
          {
            "monthUtc": 1730419200,
            "organicTraffic": 6310000
          },
          {
            "monthUtc": 1733011200,
            "organicTraffic": 6420000
          }
        ]
      }
    ]
  }
}

Full parameter and response reference - every field, type, and example for this endpoint.

Reference

One request, one response shape.

Every field you send and every field you get back, each with a real example.

Last verified 2026-11-07 · uptime and latency measured over 30d

Request body

JSON, posted to this endpoint.

  • urlstring

    stripe.com

    The domain or page URL to analyze (e.g. ahrefs.com).

  • modeenum

    subdomains

    Analysis scope: subdomains covers the domain and its subdomains, domain covers the root domain only, prefix covers every page under the given path, exact matches only the given URL.

You send. A small JSON body. The values shown are examples to replace with your own.

Response

JSON, one example value per field.

each itemdata.items[]

Traffic overview records: the requested domain plus its monthly organic traffic, top ranking keywords, top pages, top countries, and traffic history. Populated whenever the provider has data for the entity.

  • domainstring

    stripe.com

    The domain or URL the metrics are scoped to. Populated whenever the provider has data for the entity.

  • modestring

    subdomains

    Analysis scope used: subdomains, domain, prefix, or exact.

  • monthlyTrafficinteger

    6420000

    Estimated monthly organic search visits.

  • monthlyTrafficValueUsdnumber

    8930000

    Estimated monthly USD value of the organic traffic, what the same clicks would cost in paid search.

each topCountrydata.items[].topCountries[]

Countries sending the most organic traffic, up to five.

  • countrystring

    us

    Two-letter country code.

  • sharePctnumber

    41.2

    Share (0-100) of the domain's organic traffic from this country.

each topKeyworddata.items[].topKeywords[]

The top organic keywords the domain already ranks for, up to five. Not ordered by traffic. For the full ranked-keyword list, use seo.ranked_keywords. Populated whenever the provider has data for the entity.

  • keywordstring

    stripe

    The organic keyword.

  • positioninteger

    1

    Current Google organic position for this keyword.

  • trafficinteger

    1840000

    Estimated monthly traffic this keyword drives to the domain.

each topPagedata.items[].topPages[]

The pages receiving the most organic traffic, up to five.

  • sharePctnumber

    6.4

    Share (0-100) of the domain's organic traffic this page receives.

  • trafficinteger

    412000

    Estimated monthly organic visits to the page.

  • urlstring

    https://stripe.com/pricing

    The page URL.

each trafficHistorydata.items[].trafficHistory[]

Monthly organic traffic estimates for recent months, oldest first.

  • monthUtcnumber

    1719792000

    UTC epoch timestamp in seconds (Unix time) of the first day of the month. Multiply by 1000 for a JS Date in milliseconds.

  • organicTrafficinteger

    5810000

    Estimated organic search visits in that month.

top level
  • foundboolean

    true

  • reason"not_found"

    Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.

You get back. Named, typed fields in the same shape whichever source answers.

FAQ

About the Ahrefs Traffic API

The AnyAPI Ahrefs Traffic API returns Ahrefs traffic data as normalized JSON from one POST call to /v1/run/ahrefs.traffic. Get the Ahrefs organic traffic overview for any domain or URL: monthly traffic estimate and value, the top 5 keywords it already ranks for with position and traffic, top pages, traffic by country, and a monthly traffic history - as normalized JSON. For a domain's full ranked-keyword list with search volume and difficulty, use seo.ranked_keywords. AnyAPI returns one normalized schema whichever source serves it. It costs from $5.01 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 99.8% of Ahrefs traffic calls through AnyAPI succeeded, with a median response time of 9.0 seconds across 552 measured calls.

It costs from $5.01 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet and each call draws it down. Some failed wallet-funded requests incur processing charges that we pass through at cost, with no markup; the error response shows the amount charged.

Get the Ahrefs organic traffic overview for any domain or URL: monthly traffic estimate and value, the top 5 keywords it already ranks for with position and traffic, top pages, traffic by country, and a monthly traffic history - as normalized JSON. For a domain's full ranked-keyword list with search volume and difficulty, use seo.ranked_keywords. The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.

Over the last 30 days, 99.8% of Ahrefs traffic calls through AnyAPI succeeded, with a median response time of 9.0 seconds across 552 measured calls. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.

Yes. A new AnyAPI account starts with $0.10 of free balance and no card required, which covers 19 Ahrefs Traffic calls at $0.00501 each.

Send a POST request to https://api.getanyapi.com/v1/run/ahrefs.traffic with your AnyAPI key in an "Authorization: Bearer" header and the input as a JSON body. The same key and the same wallet work on every AnyAPI endpoint.

No. You add US dollars to one prepaid AnyAPI balance and each request draws it down. There is no monthly plan and no minimum, and the same balance pays for every AnyAPI endpoint.

Yes. Install @getanyapi/sdk from npm for TypeScript or getanyapi from pip for Python. Both call every AnyAPI endpoint with the same key, and any HTTP client works too.

Yes. An agent can connect to the AnyAPI MCP server at https://api.getanyapi.com/mcp, or create its own free-trial key with one unauthenticated POST to https://api.getanyapi.com/agent/signup and call this endpoint over HTTP.