> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Ranked Keywords

> List every keyword a domain, subdomain or page ranks for in Google according to DataForSEO Labs, with the ranking position, URL, estimated traffic and rank change plus the keyword's volume, CPC, di...

List every keyword a domain, subdomain or page ranks for in Google according to DataForSEO Labs, with the ranking position, URL, estimated traffic and rank change plus the keyword's volume, CPC, difficulty and intent. Use dataforseo\_get\_domain\_overview for the totals.

|                      |                                  |
| -------------------- | -------------------------------- |
| **App**              | DataForSEO                       |
| **Operation ID**     | `dataforseo_get_ranked_keywords` |
| **Type**             | Action                           |
| **Connection**       | `dataforseo` (required)          |
| **Credits per run**  | Free                             |
| **Agent / MCP tool** | Yes                              |

## Inputs

| Field                  | Type                       | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------------------- | -------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target`               | string                     | Yes      | -       | Domain, subdomain or page URL to list ranking keywords for (domains without scheme or www, e.g. example.com; pages as full URLs).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `location`             | string or SelectableOption | No       | `2840`  | Country or location: a two-letter country code (us, gb, de...), a DataForSEO location code (2840 = United States), or a full location name such as 'London,England,United Kingdom'. Defaults to the United States.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `language`             | string or SelectableOption | No       | `en`    | Language code of the search results, e.g. en, de, es, fr, nl. Defaults to en.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `item_types`           | string or array of string  | No       | -       | SERP element types to include: organic, paid, featured\_snippet, local\_pack, ai\_overview\_reference. Defaults to organic and paid.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `historical_serp_mode` | string or SelectableOption | No       | `live`  | 'live' (default): keywords the target currently ranks for. 'lost': keywords it dropped out of. 'all': both.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `filters`              | array of FilterItem        | No       | -       | Up to 8 filters on dotted result fields, e.g. ranked\_serp\_element.serp\_item.rank\_group LESS\_THAN 11, keyword\_data.keyword\_info.search\_volume GREATER\_THAN 100, ranked\_serp\_element.serp\_item.url CONTAINS '/blog/'.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `orders`               | array of OrderItem         | No       | -       | Sort by up to 3 dotted result fields, e.g. keyword\_info.search\_volume DESC.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `limit`                | integer                    | No       | `100`   | Maximum number of rows to return (1 to 1000). Defaults to 100. Each row is billed by DataForSEO, so keep this as small as the task needs.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `offset`               | integer                    | No       | -       | Number of rows to skip, for paging.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `fields`               | string or array of string  | No       | -       | Dotted result fields to keep, e.g. keyword\_data.keyword, keyword\_data.keyword\_info.search\_volume, keyword\_data.keyword\_info.cpc, keyword\_data.keyword\_properties.keyword\_difficulty, keyword\_data.search\_intent\_info.main\_intent, ranked\_serp\_element.serp\_item.type, ranked\_serp\_element.serp\_item.rank\_group, ranked\_serp\_element.serp\_item.rank\_absolute, ranked\_serp\_element.serp\_item.url, ranked\_serp\_element.serp\_item.title, ranked\_serp\_element.serp\_item.etv, ranked\_serp\_element.serp\_item.estimated\_paid\_traffic\_cost, ranked\_serp\_element.serp\_item.rank\_changes.previous\_rank\_absolute. Leave empty for the default set listed in the output description. Does not change the cost. |

### FilterItem

| Field      | Type                       | Required | Default | Description                                                                                                                                                                                                                                                                                 |
| ---------- | -------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `field`    | string or SelectableOption | Yes      | -       | The field to filter on, must be one of the current selected metrics or dimensions.                                                                                                                                                                                                          |
| `operator` | string                     | Yes      | -       | The operator to use for filtering. Must be one of the supported values. Use REGEXP\_MATCH to search/filter by multiple OR values like '.*(summer\|holiday).*'                                                                                                                               |
| `value`    | string                     | Yes      | -       | The value to filter by, always as a string: text, a number, or a regex. For IN\_LIST and NOT\_IN\_LIST, pass the values as one comma-separated string such as 'a,b,c', not as an array. For regex values, escape backslashes once in the JSON string: write \b for a word boundary, not \b. |

### OrderItem

| Field       | Type                       | Required | Default | Description                                                                      |
| ----------- | -------------------------- | -------- | ------- | -------------------------------------------------------------------------------- |
| `field`     | string or SelectableOption | Yes      | -       | The field to sort by. must be one of the current selected metrics or dimensions. |
| `direction` | string                     | Yes      | -       | The order to sort by, must be one of 'ASC', 'DESC'                               |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `List[Dict]`

Returns one row per ranking with dotted columns: keyword\_data.keyword, keyword\_data.keyword\_info.search\_volume, keyword\_data.keyword\_info.cpc, keyword\_data.keyword\_properties.keyword\_difficulty, keyword\_data.search\_intent\_info.main\_intent, ranked\_serp\_element.serp\_item.type, ranked\_serp\_element.serp\_item.rank\_group, ranked\_serp\_element.serp\_item.rank\_absolute, ranked\_serp\_element.serp\_item.url, ranked\_serp\_element.serp\_item.title, ranked\_serp\_element.serp\_item.etv, ranked\_serp\_element.serp\_item.estimated\_paid\_traffic\_cost, ranked\_serp\_element.serp\_item.rank\_changes.\* and more.

**Fields**: `keyword_data.keyword`, `keyword_data.keyword_info.search_volume`, `ranked_serp_element.serp_item.rank_group`, `ranked_serp_element.serp_item.url`, `ranked_serp_element.serp_item.etv`

**Example**:

```json theme={"dark"}
[
  {
    "keyword_data.keyword": "backlink checker",
    "keyword_data.keyword_info.search_volume": 368000,
    "ranked_serp_element.serp_item.rank_group": 1,
    "ranked_serp_element.serp_item.url": "https://ahrefs.com/backlink-checker"
  }
]
```
