> ## 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 Locations

> List the Rank Tracker locations (country, regions, cities with their location IDs) and languages Ahrefs supports for a country

List the Rank Tracker locations (country, regions, cities with their location IDs) and languages Ahrefs supports for a country. Free: does not consume API units. Use the IDs and codes with ahrefs\_manage\_tracked\_keywords to track keywords at city or region level.

| | |
| - | - |
| **App** | Ahrefs |
| **Operation ID** | `ahrefs_get_locations` |
| **Type** | Action |
| **Connection** | `ahrefs` (required) |
| **Credits per run** | Free |
| **Agent / MCP tool** | Yes |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `country` | string or SelectableOption | Yes | - | Two-letter country code (e.g. us, gb, de) to list Rank Tracker locations and languages for. |
| `us_state` | string | No | - | Two-letter US state code (e.g. ny, ca). Required when country is us, since Ahrefs lists US locations per state. |
| `search` | string | No | - | Only return locations and languages whose name contains this text (case-insensitive), e.g. 'London'. Leave empty for the full list, which can be thousands of rows. |

### SelectableOption

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

## Output

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

Returns one row per language (kind 'language', id is the language code) and per location (kind 'location', id is the numeric location ID): kind, country, id, name.

**Fields**: `kind`, `country`, `id`, `name`

**Example**:

```json theme={"dark"}
[
  {
    "kind": "language",
    "country": "gb",
    "id": "en",
    "name": "English"
  }
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.