# Ranked Keywords: Any Domain's Google Keywords & Positions (`brightgro/ranked-keywords`) Actor

Give domains and get every Google keyword each one ranks for: position, ranking URL, search volume, CPC, difficulty, intent and estimated traffic, sorted by traffic. 10 countries. For competitor research and content gaps. Data from DataForSEO Labs.

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

## Pricing

$3.00 / 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.

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

## Ranked Keywords: Any Domain's Google Keywords & Positions

Give domains and get the Google keywords each one ranks for, highest estimated traffic first, with position, ranking URL, search volume, CPC and difficulty. The data comes from DataForSEO Labs.

### Who uses it, and for what

- **SEO and content teams:** see which keywords bring a competitor its traffic, and which of them you do not rank for yet.
- **Agencies:** size a prospect's search traffic before a pitch, and show which page-one keywords it is close to losing.
- **PPC teams:** find keywords with high CPC where a competitor ranks organically, so you can choose where to bid.
- **Investors and buyers of websites:** check how much of a site's traffic rests on a few keywords.
- **AI agents and workflows:** a flat keyword list per domain to feed a content brief or a report.

### Example inputs

A competitor's top 100 keywords in the US:

```json
{
  "domains": ["hubspot.com"],
  "country": "US",
  "maxKeywordsPerDomain": 100
}
```

Only page-one keywords with 100 or more monthly searches, for three competitors (you pay only for keywords that pass both filters):

```json
{
  "domains": ["semrush.com", "ahrefs.com", "moz.com"],
  "country": "US",
  "maxKeywordsPerDomain": 200,
  "maxPosition": 10,
  "minSearchVolume": 100
}
```

Keywords where a UK site sits just off page one (positions up to 20), a quick list of pages worth improving:

```json
{
  "domains": ["https://www.example.co.uk/"],
  "country": "GB",
  "maxKeywordsPerDomain": 500,
  "maxPosition": 20
}
```

### Input

- Domains: up to 20, for example `apify.com`. Website links are cut to their domain, and www is removed.
- Country: the Google market (US, GB, CA, AU, IN, DE, FR, ES, IT or BR).
- Keywords per domain: 10 to 1,000. The default is 100.
- Best positions only: for example 10 returns only the keywords where the domain is on page one.
- Minimum monthly searches: leave out keywords below this Google search volume.

Both filters run at the data source, so you pay only for keywords that pass them.

### Output

One row per keyword:

| Field | What it holds |
|---|---|
| domain, country, keyword | What ranks, where, for which search |
| position, position_absolute, previous_position, is_new | Its place among organic results, its place on the whole page, its place at the last check, and whether it is new |
| result_type, url | The kind of result (organic, featured snippet and so on) and the page that ranks |
| search_volume, cpc, competition | Monthly Google searches, cost per click in USD, ads competition from 0 to 1 |
| keyword_difficulty, intent | Difficulty from 0 to 100, and the main search intent |
| estimated_traffic | Estimated monthly visits from this keyword |

A domain that ranks for nothing gets one `no_keywords` row, charged as one keyword, because the data source charges for the lookup. Text that is not a domain gets a free `invalid_domain` row. A provider error gets one `provider_error` row and is not charged.

### Price

One `keyword` event for each keyword row, at the price shown on this page. There is no fee per domain. The run asks for no more keywords than its spending limit can pay for, and stops when the limit is reached.

### Limits

- Rankings and traffic are estimates from DataForSEO's regular Google crawls, not live searches or analytics data.
- Very small sites may rank for only a few keywords.

### Use it from code or a workflow

Run it from the Apify API, the Python or JavaScript client, Make, Zapier or n8n, and schedule it monthly to track a competitor's keywords over time.

### Related actors

- [Keyword Research Tool](https://apify.com/brightgro/keyword-research): volume, CPC and difficulty for your own keyword list.
- [Backlink Checker](https://apify.com/brightgro/backlinks-list): the links behind a competitor's rankings.
- [Google People Also Ask Scraper](https://apify.com/brightgro/people-also-ask): the questions people ask around a keyword, for content ideas.
- [Bulk Domain Metrics](https://apify.com/brightgro/domain-metrics): authority and traffic for a list of domains.

# Actor input Schema

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

Up to 20 domains or website links, for example apify.com.

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

The Google market to read rankings in.

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

The most keywords to return for each domain, highest estimated traffic first (10 to 1,000).

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

Only keywords where the domain ranks at this position or better, for example 10 for page one. Leave empty for all.

## `minSearchVolume` (type: `integer`):

Only keywords with at least this many Google searches a month. Leave empty for all.

## Actor input object example

```json
{
  "domains": [
    "apify.com"
  ],
  "country": "US",
  "maxKeywordsPerDomain": 20
}
```

# Actor output Schema

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

Give domains and get every Google keyword each one ranks for: position, ranking URL, search volume, CPC, difficulty, intent and estimated traffic, sorted by traffic. 10 countries. For competitor research and content gaps. Data from DataForSEO Labs.

# 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": [
        "apify.com"
    ],
    "maxKeywordsPerDomain": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("brightgro/ranked-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": ["apify.com"],
    "maxKeywordsPerDomain": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("brightgro/ranked-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": [
    "apify.com"
  ],
  "maxKeywordsPerDomain": 20
}' |
apify call brightgro/ranked-keywords --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brightgro/ranked-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/6CSuMdTkxr5SmVcsV/builds/XAiVopuoLFOrXrhl2/openapi.json
