# 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:** 13 total users, 9 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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

Download the OpenAPI definition: https://api.apify.com/v2/actors/7LH0CgHLrGbpFh49M/builds/gBfWtmtZpj8dSYcGv/openapi.json
