# Competitor Keywords: Any Domain's Ranked Keywords & Traffic (`zaiq/competitor-keywords`) Actor

Every keyword a competitor ranks for on Google: position, page, estimated traffic, traffic value, volume, CPC and difficulty, in 92 countries. Add your own domain to see the keywords they have and you don't. No Semrush or Ahrefs account.

- **URL**: https://apify.com/zaiq/competitor-keywords.md
- **Developed by:** [Zaiq](https://apify.com/zaiq) (community)
- **Categories:** SEO tools, AI
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 keywords

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

## Competitor Keywords API: every keyword any domain ranks for on Google, with position, traffic and the keyword gap

![Competitor Keywords: Any Domain's Ranked Keywords & Traffic](https://api.apify.com/v2/key-value-stores/4VJNANhwKgqPpXtAi/records/hero-competitor-keywords.jpg)

See **every keyword a competitor ranks for on Google, without a Semrush or Ahrefs account**: its **position**, the **page that ranks**, the **estimated traffic** each keyword brings and what that traffic would cost in ads, plus **monthly search volume**, **CPC**, **keyword difficulty** and **search intent**, in **92 countries**. The keywords bringing the most traffic come first.

Add **your own domain** and each row shows **your position** beside theirs, with `gap` true where you do not rank: the **keyword gap**, ready to turn into a content plan. Built for **SEO teams and agencies**, **content marketers**, **PPC managers** and **AI agents** that want this per keyword instead of per seat.

### What you get

| Field | What it holds |
|---|---|
| Keyword rows | `domain`, `keyword`, `position`, `previousPosition`, `movement` (new, up, down), `url`, `pageTitle`, `estimatedTraffic`, `trafficValueUsd`, `searchVolume`, `cpc`, `competition`, `keywordDifficulty`, `intent`, `monthlySearches`, `serpFeatures`, `rankedAt`, `country`, `language` |
| With your domain | `yourDomain`, `yourPosition`, `yourUrl`, `gap` |

### What people use it for

- **Keyword gap:** find what rivals rank for and you do not, then write those pages first
- **Competitor research:** see which pages bring a rival its search traffic
- **Content planning:** filter to low difficulty and real volume
- **PPC planning:** see what a rival's organic traffic would cost to buy
- **Client audits:** pull a prospect's and its rivals' rankings in one run
- **AI agents:** competitor rankings inside any workflow, per keyword

### How to use it

1. Enter the **domains** you want to see.
2. Optionally add **your domain** for the keyword gap, and pick the **country**.
3. Click **Start**.

### Input

| Field | Example | Notes |
|---|---|---|
| Domains | `example.com` | Up to 20, or the full address of one page |
| Your domain | `mysite.example` | Optional: adds your position and the gap |
| Only the keywords you do not rank for | off | You are not charged for rows left out |
| Country | `US` | 92 countries |
| Language | `en` | Optional |
| Keywords per domain | `500` | Up to 5,000, most traffic first |
| Minimum monthly searches | `100` | Optional |
| Maximum keyword difficulty | `40` | Optional |
| Worst Google position | `10` | Optional |

### Output

Each result is one row in the run's dataset (download it as JSON, CSV, Excel, XML or HTML, or read it through the API). An example row (values shortened):

```json
{
  "domain": "example.com",
  "keyword": "best robot vacuum",
  "position": 3,
  "previousPosition": 5,
  "movement": "up",
  "url": "https://example.com/robot-vacuums",
  "estimatedTraffic": 1240.5,
  "trafficValueUsd": 1860.75,
  "searchVolume": 14800,
  "cpc": 1.5,
  "keywordDifficulty": 38,
  "intent": "commercial",
  "yourPosition": null,
  "gap": true,
  "country": "US",
  "language": "en"
}
```

A record named `SUMMARY` in the run's key-value store says what each input returned, with any notes (for example an account that does not exist), what was charged and how much traffic the run used.

### Pricing

- **$0.001 per keyword** row ($1 per 1,000)
- **$0.04 per lookup**: one request of up to 1,000 keywords, and a second per 1,000 when you add your own domain
- Domains with no rankings are free, and so are failed requests
- Apify's $0.00005 start charge counts towards your Maximum cost per run.

What typical jobs cost at the list price:

| Job | Cost |
|---|---|
| 100 keywords for one domain | $0.14 |
| 500 keywords for one domain | $0.54 |
| 500 keywords with your keyword gap | $0.58 |
| 5,000 keywords for one domain | $5.20 |

On Apify's Scale and Business plans the per-event prices are lower (Store discounts). Set **Maximum cost per run** and the Actor stops cleanly when it is reached: you never pay more than that.

### Tips

- Most traffic comes first, so a small limit still shows what matters most.
- Add a worst position of 10 to see only the first page.
- Use the country where your customers search: rankings differ a lot by country.

### Use it through the API

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("zaiq/competitor-keywords").call(run_input={"domains": ["example.com"], "country": "US"})
for row in client.dataset(run.default_dataset_id).iterate_items():
    print(row)
```

**JavaScript**

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('zaiq/competitor-keywords').call({"domains": ["example.com"], "country": "US"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

**HTTP (one call, results back)**

```bash
curl -X POST 'https://api.apify.com/v2/acts/zaiq~competitor-keywords/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"domains": ["example.com"], "country": "US"}'
```

### Integrations and schedules

- **Schedules:** run it every hour, day or week from the Apify Console (Schedules) and keep a history of results.
- **Make, Zapier, n8n, Google Sheets, Slack, Airtable:** connect it through Apify's integrations, or send each finished run to a **webhook**.
- **Datasets:** results stay in the run's dataset; export them or read them by API whenever you need them.

### Use it with AI agents (MCP)

Add Apify's MCP server with this Actor already pinned (`https://mcp.apify.com?tools=zaiq/competitor-keywords`) to Claude, ChatGPT, Cursor, VS Code or any MCP client. The agent can find this Actor and run it for you: ask it for "the keywords this competitor ranks for on the first page that we do not". AI agents can also pay for runs directly through Apify's agentic payments.

### Limits

- Rankings come from the data provider's database, not a live check for this run. Each keyword is rechecked on its own schedule, so a row can be weeks or months old (in our check some were 2 to 3 months old): `rankedAt` shows when.
- Google gives close variants one combined volume, so a page ranking for a plural can show the volume of the whole word, and estimated traffic can run high on very broad words. Compare sites with each other rather than reading a figure as exact visits.
- Estimated traffic comes from each keyword's searches and position, for Google search only, not all visits.
- Apify's free plan: one domain and 10 keywords, without your own domain.

### FAQ

**Do I need a Semrush or Ahrefs account?**

No.

**What is the keyword gap?**

Keywords a competitor ranks for where your domain does not rank at all. Add your domain and each row says so.

**How is estimated traffic worked out?**

From the keyword's monthly searches and the click rate of that position. It is an estimate and covers Google search only.

**How fresh are the rankings?**

They come from a database, not a live check. Each row's `rankedAt` says when that keyword was last checked, which can be weeks or months ago.

**Which countries?**

92, including the US, UK, Canada, Australia, South Africa, India, Germany, France, Spain, Brazil and Japan.

**What if a domain ranks for nothing?**

You get a note and pay nothing for it.

### Related Actors from Zaiq

- [keyword-research](https://apify.com/zaiq/keyword-research): volume and CPC for your own keyword list
- [domain-seo-overview](https://apify.com/zaiq/domain-seo-overview): one row per domain: keywords, traffic, rivals, top pages
- [website-traffic-checker](https://apify.com/zaiq/website-traffic-checker): search traffic for thousands of domains

### Support

Questions, a site that changed, or a field you need? Open an issue on this Actor's **Issues** tab: we answer there, usually within a day.

***

Also found as: competitor keywords, ranked keywords, keyword gap, organic keywords, domain keywords, semrush alternative, ahrefs alternative, competitor keyword research, keywords a website ranks for, seo competitor analysis.

# Actor input Schema

## `domains` (type: `array`):

The domains whose Google rankings you want, such as example.com, or the full address of one page. Up to 20 a run.

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

Optional. Each row then shows your position for that keyword, and gap is true where you do not rank. Adds one lookup per 1,000 keywords.

## `onlyGap` (type: `boolean`):

With your domain set: leave out keywords you already rank for. You are not charged for those rows.

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

Two-letter country code (92 countries), e.g. US, GB, ZA, DE, AU.

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

Optional language code (en, de, es...); empty = the country's main language.

## `maxKeywordsPerDomain` (type: `integer`):

The ones bringing the most traffic first. Each 1,000 is one lookup.

## `minVolume` (type: `integer`):

Optional. Leave out keywords with fewer searches.

## `maxDifficulty` (type: `integer`):

Optional. Leave out keywords harder than this (0-100).

## `maxPosition` (type: `integer`):

Optional. Only keywords where the domain ranks this high or better, for example 10 for the first page.

## Actor input object example

```json
{
  "domains": [
    "wikipedia.org"
  ],
  "onlyGap": false,
  "country": "US",
  "maxKeywordsPerDomain": 10
}
```

# Actor output Schema

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

Dataset: the results.

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

What each input returned, and notes.

# 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 = {
    "domains": [
        "wikipedia.org"
    ],
    "maxKeywordsPerDomain": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("zaiq/competitor-keywords").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 = {
    "domains": ["wikipedia.org"],
    "maxKeywordsPerDomain": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("zaiq/competitor-keywords").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 '{
  "domains": [
    "wikipedia.org"
  ],
  "maxKeywordsPerDomain": 10
}' |
apify call zaiq/competitor-keywords --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zaiq/competitor-keywords"
        }
    }
}
```

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/rZa6pRu3Mnhv3gYyf/builds/nhnSudTzLw9bI6HXn/openapi.json
