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

# Manage Tracked Competitors

> Add competitor domains or pages to an Ahrefs Rank Tracker project or remove them

Add competitor domains or pages to an Ahrefs Rank Tracker project or remove them. Free: does not consume API units. Competitors power the share of voice reports in ahrefs\_get\_rank\_tracker\_competitors.

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

## Inputs

| Field         | Type                       | Required | Default      | Description                                                                                                                                        |
| ------------- | -------------------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project_id`  | string or SelectItem       | Yes      | -            | The Rank Tracker project (numeric ID from the Ahrefs project URL). Use ahrefs\_list\_projects to find it.                                          |
| `action`      | string or SelectableOption | No       | `add`        | 'add' (default) starts tracking the competitors in the project; 'remove' stops tracking them.                                                      |
| `competitors` | array of string or string  | Yes      | -            | Competitor domains or URLs. Accepts a list or a newline/comma-separated string.                                                                    |
| `mode`        | string or SelectableOption | No       | `subdomains` | How each competitor is interpreted: 'subdomains' (default), 'domain', 'prefix' or 'exact'. To remove a competitor, use the mode it was added with. |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### SelectableOption

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

## Output

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

Returns the tracked competitors of the project after the change (empty after removing the last one): url, mode.

**Fields**: `url`, `mode`

**Example**:

```json theme={"dark"}
[
  {
    "url": "semrush.com/",
    "mode": "subdomains"
  }
]
```
