# Semrush Keyword (`pnda/semrush-keyword`) Actor

Extract Semrush keyword data at scale: search volume, CPC, keyword difficulty, competition, search intent, SERP features and 12-month trends. Phrase, exact, broad or related match across 47 country databases — up to 10,000 keywords per run, straight into a clean Apify dataset.

- **URL**: https://apify.com/pnda/semrush-keyword.md
- **Developed by:** [PNDA](https://apify.com/pnda) (community)
- **Categories:** Automation, E-commerce, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $6.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🔍 Semrush Keyword Scraper — Volume, CPC, Difficulty & Intent at Scale

Turn any seed keyword into a full, ranked list of high-opportunity keywords — **search volume, CPC, competition, keyword difficulty, SERP features and search intent** — across **47 regional databases**.

This Actor plugs straight into Apify, accepts a single keyword, and returns Semrush keyword metrics in a clean dataset you can export to **JSON, CSV, Excel, HTML or RSS** — or pipe directly into your scraping, n8n, Make, Zapier, Looker Studio or GPT workflows. No Semrush login required.

---

### 💡 Who is it for?

- **SEO agencies** building keyword lists for clients at scale.
- **Content teams** running bulk topic discovery for blogs, landing pages and programmatic SEO.
- **PPC & paid search managers** hunting low-CPC, low-competition keywords before bidding.
- **Affiliate marketers & dropshippers** validating niches and product demand in any market.
- **E-commerce founders** sizing a market before launching a new category or region.
- **Data teams** enriching a CRM, ad platform or internal dashboard with keyword metrics.

---

### ⚙️ How it works

You give the Actor a keyword, a country database, and a match type. It pulls the full keyword ideas report from Semrush, paginates through as many pages as you need (100 keywords per page), and pushes every keyword as a structured row into the Apify dataset.

#### Match types supported

| Match type | What it returns |
|---|---|
| **Phrase** | Keywords containing the exact phrase in any order |
| **Exact** | Keywords containing the exact phrase as-is |
| **Broad** | Broad variations including synonyms and related terms |
| **Related** | Semantically related keywords (perfect for topical clusters) |

#### Coverage

47 country databases: 🇺🇸 US · 🇬🇧 UK · 🇨🇦 CA · 🇦🇺 AU · 🇫🇷 FR · 🇩🇪 DE · 🇮🇹 IT · 🇪🇸 ES · 🇧🇷 BR · 🇳🇱 NL · 🇯🇵 JP · 🇮🇳 IN · 🇸🇬 SG · 🇲🇽 MX · 🇦🇪 AE · and 32 more.

---

### 📥 Input

| Field | Type | Required | Description |
|---|---|---|---|
| `q` | string | ✅ | Seed keyword (e.g. `digital marketing`, `running shoes`) |
| `db` | string | ✅ | Country database code (`us`, `uk`, `fr`, `de`, …) |
| `type` | string | — | Match type: `phrase` (default), `exact`, `broad`, `related` |
| `pages` | integer | — | Pages to fetch — 100 keywords per page (default `1`, max `100` = 10,000 keywords) |

#### Example input

```json
{
  "q": "digital marketing",
  "db": "us",
  "type": "phrase",
  "pages": 5
}
````

***

### 📤 Output

Each keyword is pushed as one row in the dataset. Example item:

```json
{
  "phrase": "digital marketing agency",
  "database": "us",
  "volume": 18100,
  "cpc": 24.35,
  "competition_level": 0.87,
  "difficulty": 71,
  "results": 2140000000,
  "intents": [1, 3],
  "serp_features": [7, 9, 16, 21],
  "trends": [54, 54, 66, 81, 66, 54, 54, 54, 81, 54, 54, 54]
}
```

#### Field reference

| Field | Meaning |
|---|---|
| `phrase` | The keyword |
| `volume` | Average monthly search volume |
| `cpc` | Cost per click in USD (paid search benchmark) |
| `competition_level` | Paid competition index (0.00 → 1.00) |
| `difficulty` | Organic keyword difficulty score (0 → 100) |
| `results` | Total number of indexed results on Google |
| `intents` | Search intent flags (informational, navigational, commercial, transactional) |
| `serp_features` | SERP feature codes (featured snippet, People Also Ask, local pack, video, images, etc.) |
| `trends` | 12-month relative volume trend |

***

### 🚀 Why use this Actor

- ✅ **Semrush keyword metrics** — volume, CPC, difficulty, competition, intent, SERP features and trends in one row.
- ✅ **Up to 10,000 keywords per run** — in one click, pushed straight into a dataset.
- ✅ **47 markets** — international SEO, localization and multi-country PPC in the same workflow.
- ✅ **Clean, flat schema** — every field typed and ready for BigQuery, Postgres, Sheets or GPT.
- ✅ **All match types** — phrase, exact, broad, and semantic (related) in a single input.
- ✅ **No login, no scraping headaches** — authentication and pagination handled for you.
- ✅ **Pipeline-ready** — trigger from n8n, Make, Zapier, Apify Schedules or the Apify API.

***

### 💼 Use cases

- **Programmatic SEO** — generate thousands of landing-page keywords per vertical and region.
- **Content calendars** — cluster `related` keywords into topic pillars automatically.
- **PPC bid lists** — pull `volume` + `cpc` + `competition_level` before uploading to Google Ads.
- **Niche research** — compare volume vs. difficulty across countries in minutes.
- **Competitor gap analysis** — combine with the [Semrush Domain](https://apify.com/pnda/semrush-domain) and [Semrush Competitor](https://apify.com/pnda/semrush-competitor) Actors.
- **AI content pipelines** — feed structured keyword data into GPT for briefs and outlines.

***

### 🧩 Part of the Semrush suite

Chain this Actor with the rest of the suite for a full SEO workflow:

| Actor | What it does |
|---|---|
| 🔍 [Semrush Keyword](https://apify.com/pnda/semrush-keyword) | Keyword ideas — volume, CPC, difficulty, intent (this Actor) |
| 🌐 [Semrush Domain](https://apify.com/pnda/semrush-domain) | Full domain audit — authority, traffic, top keywords |
| 🔗 [Semrush Backlink Analytics](https://apify.com/pnda/semrush-backlink-analytics) | Authority-scored backlinks, anchors, referring domains |
| 🥊 [Semrush Competitor](https://apify.com/pnda/semrush-competitor) | Up to 200 organic competitors and keyword overlap |

***

### 💰 Pricing

**Pay-per-result** — you're charged **$0.006 per keyword returned**, plus a small per-run start fee. You only pay for keywords you actually receive.

| Run | Keywords | Approx. cost |
|---|---|---|
| `pages = 1` | 100 | ~$0.60 |
| `pages = 10` | 1,000 | ~$6 |
| `pages = 100` | 10,000 | ~$60 |

New users get free result credits to try the Actor before spending anything.

***

### ▶️ Start now

Drop a keyword. Pick a country. Click **Run**. Export your dataset.
That's it — you have Semrush keyword intelligence on tap.

# Actor input Schema

## `q` (type: `string`):

Keyword to search

## `db` (type: `string`):

Database/region code

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

Keyword match type

## `pages` (type: `integer`):

Number of pages to fetch (each page contains up to 100 results)

## Actor input object example

```json
{
  "q": "digital marketing",
  "db": "us",
  "type": "phrase",
  "pages": 1
}
```

# Actor output Schema

## `dataset` (type: `string`):

All keywords returned by this run (JSON, CSV, Excel, HTML, RSS).

# 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 = {
    "q": "digital marketing",
    "db": "us",
    "type": "phrase",
    "pages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("pnda/semrush-keyword").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 = {
    "q": "digital marketing",
    "db": "us",
    "type": "phrase",
    "pages": 1,
}

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

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

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

```

## CLI example

```bash
echo '{
  "q": "digital marketing",
  "db": "us",
  "type": "phrase",
  "pages": 1
}' |
apify call pnda/semrush-keyword --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pnda/semrush-keyword",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Semrush Keyword",
        "description": "Extract Semrush keyword data at scale: search volume, CPC, keyword difficulty, competition, search intent, SERP features and 12-month trends. Phrase, exact, broad or related match across 47 country databases — up to 10,000 keywords per run, straight into a clean Apify dataset.",
        "version": "0.0",
        "x-build-id": "gBfWtmtZpj8dSYcGv"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/pnda~semrush-keyword/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-pnda-semrush-keyword",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/pnda~semrush-keyword/runs": {
            "post": {
                "operationId": "runs-sync-pnda-semrush-keyword",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/pnda~semrush-keyword/run-sync": {
            "post": {
                "operationId": "run-sync-pnda-semrush-keyword",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "q",
                    "db"
                ],
                "properties": {
                    "q": {
                        "title": "Query",
                        "type": "string",
                        "description": "Keyword to search"
                    },
                    "db": {
                        "title": "Database",
                        "enum": [
                            "us",
                            "uk",
                            "ca",
                            "au",
                            "br",
                            "fr",
                            "de",
                            "it",
                            "es",
                            "nl",
                            "se",
                            "dk",
                            "be",
                            "no",
                            "ie",
                            "ar",
                            "mx",
                            "co",
                            "cl",
                            "pe",
                            "in",
                            "sg",
                            "id",
                            "ph",
                            "my",
                            "th",
                            "vn",
                            "jp",
                            "hk",
                            "cn",
                            "tr",
                            "za",
                            "il",
                            "sa",
                            "ae",
                            "pl",
                            "cz",
                            "ro",
                            "hu",
                            "at",
                            "ch",
                            "pt",
                            "fi",
                            "gr",
                            "nz",
                            "ru",
                            "ua"
                        ],
                        "type": "string",
                        "description": "Database/region code",
                        "default": "us"
                    },
                    "type": {
                        "title": "Match Type",
                        "enum": [
                            "phrase",
                            "exact",
                            "broad",
                            "related"
                        ],
                        "type": "string",
                        "description": "Keyword match type",
                        "default": "phrase"
                    },
                    "pages": {
                        "title": "Number of Pages",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Number of pages to fetch (each page contains up to 100 results)",
                        "default": 1
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
