Ahrefs API

Ahrefs Keyword ideas API

Get related keyword suggestions for any seed term, each with an Ahrefs difficulty and search-volume bucket.

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

What the API returneditems[0]
{
"sourceKeyword": "coffee",
"country": "us",
"searchEngine": "Google",
"ideas": [...],
"questions": [...]
}
Uptime
100.00%
30d · 148 calls
Requests
148
30d · weekly, last 12 wks
Response
9.2s
median · 30d

Pricing

Ahrefs Keyword ideas 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 keyword ideas 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 16 of 17 fields. See every field

{
  "found": true,
  "data": {
    "items": [
      {
        "sourceKeyword": "coffee",
        "country": "us",
        "searchEngine": "Google",
        "ideas": [
          {
            "keyword": "coffee shops near me",
            "difficulty": "E",
            "volume": "A",
            "updatedAt": "2026-09-14T00:00:00Z"
          },
          {
            "keyword": "best coffee beans",
            "difficulty": "M",
            "volume": "B",
            "updatedAt": "2026-09-14T00:00:00Z"
          },
          {
            "keyword": "cold brew coffee recipe",
            "difficulty": "E",
            "volume": "C",
            "updatedAt": "2026-09-10T00:00:00Z"
          }
        ],
        "questions": [
          {
            "keyword": "how much caffeine is in coffee",
            "difficulty": "E",
            "volume": "B",
            "updatedUtc": 1757808000
          },
          {
            "keyword": "is coffee good for you",
            "difficulty": "M",
            "volume": "C",
            "updatedUtc": 1757462400
          }
        ]
      }
    ]
  }
}

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-10-31 · uptime and latency measured over 30d

Request body

JSON, posted to this endpoint.

  • keywordstring

    coffee

    The seed keyword to expand into related suggestions (e.g. "coffee").

  • countrystring

    us

    Two-letter country code that scopes the suggestions (e.g. us, gb, de).

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[]

Keyword-idea records: the seed keyword and its related keyword suggestions, each with an Ahrefs difficulty and search-volume bucket. Populated whenever the provider has data for the entity.

  • countrystring

    us

    Two-letter country code the suggestions are scoped to.

  • searchEnginestring

    Google

    Search engine the suggestions are drawn from (e.g. Google).

  • sourceKeywordstring

    coffee

    The seed keyword the suggestions were expanded from. Populated whenever the provider has data for the entity.

each ideadata.items[].ideas[]

Related keyword suggestions for the seed term. Populated whenever the provider has data for the entity.

  • difficultystring

    E

    Relative Ahrefs difficulty bucket (a letter such as E, M, or H), not an exact number.

  • keywordstring

    coffee shops near me

    The suggested related keyword. Populated whenever the provider has data for the entity.

  • updatedAtstring

    2026-09-14T00:00:00Z

    Timestamp the suggestion metrics were last updated.

  • volumestring

    A

    Relative search-volume bucket (a letter grade), not an exact number.

each questiondata.items[].questions[]

Question-shaped keyword suggestions for the seed term.

  • difficultystring

    E

    Relative Ahrefs difficulty bucket (a letter such as E, M, or H), not an exact number.

  • keywordstring

    how much caffeine is in coffee

    The suggested question keyword.

  • updatedUtcnumber

    1757808000

    UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.

  • volumestring

    B

    Relative search-volume bucket (a letter grade), not an exact number.

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 Keyword ideas API

The AnyAPI Ahrefs Keyword ideas API returns Ahrefs keyword ideas data as normalized JSON from one POST call to /v1/run/ahrefs.keyword_ideas. Get related keyword suggestions for any seed term, each with an Ahrefs difficulty and search-volume bucket. 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, 100.0% of Ahrefs keyword ideas calls through AnyAPI succeeded, with a median response time of 9.2 seconds across 148 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 related keyword suggestions for any seed term, each with an Ahrefs difficulty and search-volume bucket. 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, 100.0% of Ahrefs keyword ideas calls through AnyAPI succeeded, with a median response time of 9.2 seconds across 148 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 Keyword ideas calls at $0.00501 each.

Send a POST request to https://api.getanyapi.com/v1/run/ahrefs.keyword_ideas 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.