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

# Add competitor

Add a creator through the same V2 tracking pipeline as the dashboard. Supports Instagram, YouTube, TikTok and X, performs the initial snapshot, then queues due refreshes on a dedicated recurring worker at the selected interval until the 30/60/90-day tracking period ends. Goals are optional and default to viral videos and winning hooks. Repeating an existing creator returns it without another paid scrape.

This MCP operation reserves and settles 1 credit against the credential workspace when a new paid competitor scrape is required. Cache, duplicate and standalone tracking-plan rules can make the final charge zero.

> [!NOTE]
>
> Examples use illustrative values. The playground sends a real request. Intelligence can consume plan credits. Publishing examples save drafts.

## Endpoint

**POST** `https://api.creatorinsights.in/v1/competitor-tracking`

**Content type:** application/json

**Authentication:** `x-api-key: YOUR_SAVED_API_KEY`

**MCP tool:** `add_tracked_competitor`. See [MCP Setup](https://creatorinsights.mintlify.site/mcp-setup.md) for AI clients.

## Operation behavior

Use the same owned workspace for add, get, update, report reads and delete. Get returns saved V2 data and does not refresh the creator. Add accepts a username, @handle or profile URL, refresh\_interval\_days of 1, 3, 7, 15, 20, 25 or 30, and tracking\_duration\_days of 30, 60 or 90. The returned tracker.\_id is the tracking\_id for update/delete/report filtering. Update supports pause/resume, interval, duration, goals, custom requirement and eligible Instagram source mode; it does not change the creator handle or platform. Recurring refreshes are asynchronous on the dedicated V2 queue. Delete removes that workspace tracker, not the public creator account or another workspace tracker. Re-adding an existing creator returns it without another initial paid scrape. Existing plan, workspace budget and tracking limits apply.

When this MCP action is billable, its single charge is reserved and settled against the workspace selected for the request. Normal dashboard calls retain their existing billing path.

## MCP call

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "add_tracked_competitor",
    "arguments": {
      "platform": "instagram",
      "username": "examplecreator",
      "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
    }
  }
}
```

## Request parameters

**x-workspace-id** `string`

Active workspace ID or current name in your organization. Optional header alternative to passing workspace in the body.

**workspace** `string`

Workspace ID or current name in the authenticated organization. Required for paid requests when more than one active workspace exists. Call list\_workspaces to discover IDs; the selected workspace determines context, data and its spending limit for this request.

**platform** `string` *required*

Allowed values: `instagram`, `youtube`, `tiktok`, `x`, `twitter`.

**username** `string` *required*

Competitor username, @handle, or profile URL.

**refresh\_interval\_days** `number`

Refresh interval in days. Defaults to 7. Allowed values: `1`, `3`, `7`, `15`, `20`, `25`, `30`.

**tracking\_duration\_days** `number`

How long tracking remains active before automatically pausing. Defaults to 30 days. Allowed values: `30`, `60`, `90`.

**goals** `string[]`

Optional report goals. Defaults to viral videos and winning hooks when adding a tracker.

**custom\_requirement** `string`

**source\_mode** `string`

Instagram only. Connected mode requires an eligible account already connected in this workspace; other platforms always use standard. Allowed values: `standard`, `connected_instagram`.

## Request example

Send these arguments directly as the JSON body.

```json theme={null}
{
  "platform": "instagram",
  "username": "examplecreator",
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
}
```

```bash cURL theme={null}
curl -X POST 'https://api.creatorinsights.in/v1/competitor-tracking' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"platform":"instagram","username":"examplecreator","workspace":"YOUR_WORKSPACE_ID_OR_CURRENT_NAME"}'
```

```javascript Node.js theme={null}
const response = await fetch('https://api.creatorinsights.in/v1/competitor-tracking', {
  method: 'POST',
  headers: { 'x-api-key': process.env.CREATOR_INSIGHTS_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
  "platform": "instagram",
  "username": "examplecreator",
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
})
});
const raw = await response.text();
let result;
try { result = JSON.parse(raw); } catch { throw new Error('Non-JSON response: ' + response.status); }
if (!response.ok || result.success === false) throw new Error(result.message || result.error || 'Request failed');
console.log(result.data);
```

```python Python theme={null}
import json, os, requests

arguments = json.loads("{\"platform\":\"instagram\",\"username\":\"examplecreator\",\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\"}")
response = requests.post("https://api.creatorinsights.in/v1/competitor-tracking",
    headers={"x-api-key": os.environ["CREATOR_INSIGHTS_API_KEY"]},
    json=arguments, timeout=120)
response.raise_for_status()
result = response.json()
print(result["data"])
```

## Response example

HTTP 200. Illustrative values; optional fields can be omitted, null, or empty. Additional platform fields may be returned.

```json Success theme={null}
{
  "success": true,
  "data": {
    "success": true,
    "workspace_id": "507f1f77bcf86cd799439011",
    "name": "Example Brand",
    "is_primary": true,
    "tracker": {
      "_id": "507f1f77bcf86cd799439012",
      "platform": "instagram",
      "username": "examplecreator",
      "status": "active",
      "refreshIntervalDays": 7,
      "trackingDurationDays": 30,
      "goals": [
        "viral",
        "hooks"
      ]
    }
  }
}
```

## Response fields

**success** `boolean` *required*

Whether this operation succeeded. Also check HTTP status and nested platform statuses.

**data** `object` *required*

Operation-specific payload. See the nested field table and response example below.

| Field | Type | Description |
| - | - | - |
| `success` | boolean | Example response field. Availability depends on the record and selected options. |
| `data` | object | Nested object. Expand the response schema for its fields. |
| `data.success` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.workspace_id` | string | Example response field. Availability depends on the record and selected options. |
| `data.name` | string | Example response field. Availability depends on the record and selected options. |
| `data.is_primary` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.tracker` | object | Nested object. Expand the response schema for its fields. |
| `data.tracker._id` | string | Example response field. Availability depends on the record and selected options. |
| `data.tracker.platform` | string | Example response field. Availability depends on the record and selected options. |
| `data.tracker.username` | string | Example response field. Availability depends on the record and selected options. |
| `data.tracker.status` | string | Example response field. Availability depends on the record and selected options. |
| `data.tracker.refreshIntervalDays` | integer | Example response field. Availability depends on the record and selected options. |
| `data.tracker.trackingDurationDays` | integer | Example response field. Availability depends on the record and selected options. |
| `data.tracker.goals` | array | List of returned entries; may be empty. |

The interactive schema includes deeper nested fields. Sample fields are descriptive, not a promise that every record includes them.

## n8n and JSON tool endpoint

**POST** `https://api.creatorinsights.in/api/v1/tools/add_tracked_competitor`. Use Header Auth with `x-api-key` and body content type JSON. This alias returns the n8n envelope below; included operations can report zero credits\_deducted.

```bash theme={null}
curl -X POST 'https://api.creatorinsights.in/api/v1/tools/add_tracked_competitor' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"platform":"instagram","username":"examplecreator","workspace":"YOUR_WORKSPACE_ID_OR_CURRENT_NAME"}'
```

```json theme={null}
{
  "status": true,
  "tool": "add_tracked_competitor",
  "credits_deducted": 1,
  "data": {
    "success": true,
    "workspace_id": "507f1f77bcf86cd799439011",
    "name": "Example Brand",
    "is_primary": true,
    "tracker": {
      "_id": "507f1f77bcf86cd799439012",
      "platform": "instagram",
      "username": "examplecreator",
      "status": "active",
      "refreshIntervalDays": 7,
      "trackingDurationDays": 30,
      "goals": [
        "viral",
        "hooks"
      ]
    }
  }
}
```

## Errors

Handle non-2xx responses before mapping data. Error codes vary with the cause; these are representative examples. A 429 response may be plain text. Never treat a queued post as published or blindly retry a partial publication.

```json theme={null}
{
  "success": false,
  "error": "UNAUTHORIZED",
  "message": "Missing or invalid API key"
}
```

| HTTP status | Meaning |
| - | - |
| 400 | Invalid arguments |
| 401 | Missing or invalid API key |
| 402 | Insufficient Creator Insights plan credits |
| 403 | Subscription or permission required |
| 404 | Resource not found |
| 409 | Conflicting request, idempotency key, or unfinished upload |
| 410 | Managed media expired; upload the file again |
| 413 | Media too large |
| 415 | Unsupported media type |
| 422 | Account selection, connection, or platform payload needs attention |
| 500 | Authentication or server error |
| 503 | Service temporarily unavailable or operation failed; inspect saved status before retrying |
| 429 | Rate limit; inspect response headers and retry later. |


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