# Ahrefs Keyword Generator & API: Bulk KD & Search Volume (`s_actors/ahrefs-keyword-generator`) Actor

Keyword ideas and questions from Ahrefs for many seed keywords, with search volume and difficulty, plus the exact Keyword Difficulty (KD), search volume, backlinks needed and top SERP pages for any keyword list. 181 countries. Tracks new ideas. Works on the free Apify plan.

- **URL**: https://apify.com/s_actors/ahrefs-keyword-generator.md
- **Developed by:** [Superior Actors](https://apify.com/s_actors) (community)
- **Categories:** SEO tools, Marketing, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.99 / 1,000 keyword checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Ahrefs Keyword Generator & API: Bulk KD & Search Volume

Get **keyword ideas and question keywords** from **Ahrefs** for a list of seed keywords, each with its **search volume** and **keyword difficulty**, and check the **exact Keyword Difficulty (KD 0-100)**, **search volume**, **backlinks needed to rank** and the **top-ranking pages** for any keyword list. **181 countries.** Turn on the **tracker** to see **new keyword ideas** and **KD changes** since the last run.

```json
{ "keywords": ["coffee maker", "standing desk"], "mode": "ideas-kd", "checkTopIdeas": 5, "country": "us" }
```

No Ahrefs account, no API key, no captcha tokens, no browser setup on your side. **Works on the free Apify plan.** Use it as a bulk **Ahrefs keyword generator**, a **bulk keyword difficulty checker** or an **Ahrefs keyword API** alternative for keyword research, content plans and SEO reports.

#### What you get

One row per keyword. Real example, seed `coffee maker`, United States, 17 October 2026:

| type | # | keyword | search volume | difficulty |
|---|---|---|---|---|
| idea | 1 | keurig coffee maker | 100K-1M | Easy |
| idea | 2 | coffee maker | 10K-100K | Hard |
| idea | 3 | ninja coffee maker | 10K-100K | Medium |
| idea | 5 | best coffee maker | 10K-100K | Medium |
| question | 1 | how to descale coffee maker | 1K-10K | Easy |
| question | 4 | how to make coffee without a coffee maker | 1K-10K | Easy |

With exact KD (mode **ideas + exact KD** or **KD checker**), Germany and United States, 17 October 2026:

| keyword | country | KD | search volume | ref. domains to rank | #1 page (DR) |
|---|---|---|---|---|---|
| kaffeemaschine | de | 3 | 53,000 | 4 | mediamarkt.de (80) |
| ninja kaffeemaschine | de | 0 | 35,000 | 0 | amazon.de (93) |
| kaffeemaschine mit mahlwerk | de | 0 | 22,000 | 0 | beem.de (40) |
| keyword research | us | 41 | 611,000 | 58 | mangools.com (82) |
| seo tools | us | 82 | 319,000 | 399 | smallseotools.com (81) |

| Field | Description |
|---|---|
| `seed`, `type`, `position` | Seed keyword, `idea` or `question` (or `keyword` in the KD checker), place in Ahrefs' list |
| `keyword`, `country` | The keyword and the search market |
| `searchVolumeRange`, `searchVolumeMin` | Ahrefs' monthly search volume range (`0-100`, `100-1K`, `1K-10K`, `10K-100K`, `100K-1M`, `1M-10M`, `10M+`) and its lower bound for sorting |
| `difficultyLabel` | Ahrefs' difficulty label of the idea: `Easy`, `Medium`, `Hard` |
| `keywordDifficulty` | Exact Ahrefs KD 0-100 (checked keywords) |
| `searchVolume` | Ahrefs' monthly search volume for the country (checked keywords, when a top page ranks first of all for this keyword) |
| `referringDomainsToRank` | About how many websites must link to a page to reach the top 10 |
| `serpFeatures` | SERP features on the page: `ai_overview`, `questions`, `organic_shopping`, `videos`, `top_stories`... |
| `topResults` | Top Google results: position, URL, title; for the first 3 also DR, UR, referring domains, backlinks, organic traffic, ranking keywords, top keyword and its volume |
| `seedTotalIdeas`, `seedTotalQuestions` | How many ideas and questions Ahrefs has for the seed in total |
| `isNew`, `keywordDifficultyChange`, `searchVolumeChange` | Tracker on: new idea since the previous run; KD and volume change of a checked keyword |
| `dataUpdatedAt`, `checkedAt` | When Ahrefs last updated the keyword, time of the run |
| `note`, `error` | Unknown keyword or failed check message |

The **KEYWORDS** record (Storage → Key-value store) has one summary per seed or keyword: idea counts and, with the tracker, new and dropped ideas.

#### Modes

| Mode | What you get | Live checks |
|---|---|---|
| Keyword ideas (default) | 20 ideas + 20 questions per seed with volume range and difficulty label | 1 per seed |
| Ideas + exact KD | The same, and the top N ideas of each seed (1-40, default 5) get exact KD, search volume, backlinks needed and SERP | 1 + N per seed |
| KD checker | One row per keyword of your list: exact KD, search volume, backlinks needed, SERP features and top pages | 1 per keyword |

#### How it works

| Step | What happens |
|---|---|
| 1. Live check | Each seed is checked live in **Ahrefs' own free Keyword Generator**, each KD keyword in **Ahrefs' free Keyword Difficulty Checker**. The Actor passes the human check itself, so you pay nothing extra for captcha solving |
| 2. Exact numbers | The KD checker's answer carries the exact KD, the referring domains needed and the top results with their DR and traffic. The search volume is the volume Ahrefs shows for a top page whose main keyword is this keyword |
| 3. Tracker | With **Track changes** on, each seed's ideas and each checked keyword's KD and volume are remembered under the tracker name and compared on the next run |

#### Why this Actor

| | This Actor |
|---|---|
| Ideas and exact KD in one run | Yes: ideas + questions per seed, exact KD and volume for the top ideas |
| Free Apify plan | Yes: captcha solving is built in, not a paid third-party service |
| Bulk | Up to 1,000 seeds or keywords a run, duplicates checked once (also across seeds) |
| 181 countries | Volumes, KD and SERP of Google in the chosen country |
| New keyword ideas since the last run | Yes: `isNew` per idea, "only new" mode, KD and volume change |
| Unknown keywords | Free: you pay only for checks that return data |

#### Find easy keywords in a niche

1. Put 5-20 seed keywords of your niche into **Keywords**.
2. Choose **Keyword ideas + exact KD** and set **Ideas per seed to check** to 10.
3. Open the **Keyword ideas** view, sort by `keywordDifficulty` and keep the ideas with low KD and a high `searchVolume`: they need the fewest backlinks (`referringDomainsToRank`).

Schedule it weekly with **Track changes between runs** and **Return only new ideas** to get only the keywords Ahrefs added for your seeds.

#### Pricing

Pay per event:

| Event | Free / Starter | Scale | Business |
|---|---|---|---|
| Keyword checked (one live check: 40 ideas of a seed, or the exact KD, volume and SERP of one keyword) | $0.00999 | $0.00899 | $0.00799 |
| Run start (per GB of memory) | $0.003 | $0.003 | $0.003 |

Examples on the Free plan, default 2 GB memory:

| Run | Cost |
|---|---|
| 1 seed, 40 ideas and questions | $0.006 + $0.00999 = ~$0.016 |
| 1 seed + exact KD for its top 5 ideas | $0.006 + 6 × $0.00999 = ~$0.066 |
| 100 seeds, up to 4,000 ideas | $0.006 + 100 × $0.00999 = ~$1.00 |
| KD for 100 keywords | $0.006 + 100 × $0.00999 = ~$1.00 |

A keyword Ahrefs does not know and a failed live check are free; a keyword checked twice in one run (e.g. an idea of two seeds) is charged once. Set a maximum cost per run in Console and the Actor stops at it.

#### Speed and memory

Checks run in a browser: 1 at a time with the default 2 GB (2-4 checks a minute), 2 with 3 GB, 6 with 4 GB. The price per check is the same; more memory only adds the run start fee per GB. Each check takes 10-60 seconds because it passes Ahrefs' human check.

#### Other Ahrefs tools

| Actor | What it does |
| --- | --- |
| [Ahrefs DR Checker & API](https://apify.com/s_actors/ahrefs-dr-checker) | Bulk Domain Rating, referring domains, organic traffic and traffic value for thousands of domains, 12-month history, DR and traffic change tracker |
| [Ahrefs Backlink Checker & API](https://apify.com/s_actors/ahrefs-backlink-checker) | Top backlinks with anchors and linking DR, total backlinks and referring domains for many domains or exact pages, new backlinks tracker |
| [Ahrefs Traffic Checker & API](https://apify.com/s_actors/ahrefs-traffic-checker) | Organic traffic, traffic value, top pages, countries and keywords for websites, folders or single pages, by country, traffic change tracker |

#### FAQ

**How many ideas per seed?** 20 keyword ideas and 20 questions: what Ahrefs' free Keyword Generator shows. `seedTotalIdeas` tells how many Ahrefs has in total (the full list needs a paid Ahrefs plan). Use more specific seeds to get more ideas.

**Why is the search volume of an idea a range?** The free Keyword Generator gives ranges. For an exact number, check the keyword with the KD mode: the exact volume comes with the KD.

**Why is `searchVolume` sometimes empty?** It is filled when one of the top 3 pages has this keyword as its main keyword, which is the usual case for real queries. Rare long-tail keywords may not have it.

**Are the numbers the same as on ahrefs.com?** Yes, they come from Ahrefs' free tools at the time of the run. Volumes are Ahrefs' own estimates and can differ from Google Keyword Planner.

**Bing, YouTube or Amazon keywords?** Ahrefs' free YouTube, Bing and Amazon keyword tools are under maintenance (October 2026): this Actor gives Google keywords.

**Is this the official Ahrefs API?** No. The official Ahrefs API needs a paid Ahrefs plan with API units. This Actor reads the same public data Ahrefs shows in its free tools, for any number of keywords, without an Ahrefs account.

#### Use with the API and AI agents

Call the Actor from the [Apify API](https://docs.apify.com/api/v2), Python or JavaScript clients, Make, Zapier, n8n, or as a tool for AI agents through the [Apify MCP server](https://mcp.apify.com). Input is one JSON object, output is one JSON row per keyword.

# Actor input Schema

## `keywords` (type: `array`):

Seed keywords for ideas, or the keywords to check in the KD mode. One per line, up to 1,000 per run; duplicates are checked once.

## `mode` (type: `string`):

Keyword Generator: 20 ideas and 20 questions per seed with search volume range and difficulty label (1 charged check per seed). With KD: the top ideas also get the exact KD 0-100, search volume and backlinks needed (1 check each). KD checker: one row per keyword of your list.

## `country` (type: `string`):

Search market of the volumes, difficulty and SERP (Google in that country).

## `includeQuestions` (type: `boolean`):

Also return the 20 question keywords ("how to …", "what is …") of each seed. Free: they come with the same check.

## `checkTopIdeas` (type: `integer`):

Mode "ideas + exact KD": how many ideas of each seed (in Ahrefs' order, ideas first, then questions) get the exact KD and search volume. Each is one charged check; keywords Ahrefs has no SERP data for are free.

## `trackChanges` (type: `boolean`):

Remember the ideas of each seed and the KD / volume of each checked keyword: new ideas get isNew, checked keywords get keywordDifficultyChange and searchVolumeChange since the previous run with the same tracker name. Schedule the Actor weekly to catch new rising keywords in your niche.

## `onlyNew` (type: `boolean`):

With tracking on: the table lists only ideas that were not there on the previous run (KD checker: only keywords whose KD or volume changed). The first run only remembers.

## `monitorName` (type: `string`):

Separate trackers for separate lists, e.g. "blog" and "shop".

## `debugLog` (type: `boolean`):

Log every browser check attempt.

## Actor input object example

```json
{
  "keywords": [
    "coffee maker",
    "standing desk"
  ],
  "mode": "ideas",
  "country": "us",
  "includeQuestions": true,
  "checkTopIdeas": 5,
  "trackChanges": false,
  "onlyNew": false,
  "monitorName": "default",
  "debugLog": false
}
```

# Actor output Schema

## `ideas` (type: `string`):

Ideas and questions per seed: volume range, difficulty label, exact KD when checked.

## `difficulty` (type: `string`):

Exact KD, search volume, referring domains to rank and the top SERP pages.

## `keywords` (type: `string`):

One entry per seed or keyword: idea counts, with tracking new and dropped ideas.

## `all` (type: `string`):

Every field, including DR, traffic and top keyword of each top SERP page.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "coffee maker",
        "standing desk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("s_actors/ahrefs-keyword-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "keywords": [
        "coffee maker",
        "standing desk",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("s_actors/ahrefs-keyword-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "coffee maker",
    "standing desk"
  ]
}' |
apify call s_actors/ahrefs-keyword-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,s_actors/ahrefs-keyword-generator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HMXzPR53azlE20CxV/builds/DDNVWxfGhPWdj1QJh/openapi.json
