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

# API Quickstart

## 1. Get an API key

Create an API key in the Creator Insights dashboard and keep it secure. A masked key cannot authenticate requests. MCP clients that support OAuth can use the [MCP setup](https://creatorinsights.mintlify.site/mcp-setup.md) instead.

## 2. Discover your workspaces

```bash theme={null}
curl 'https://api.creatorinsights.in/api/v1/tools/list_workspaces' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

The response identifies the credential default and all active workspaces in the authenticated organization. For a paid request in a multi-workspace organization, send `workspace` explicitly. It may be either the current workspace name or its immutable ID. For example, `"workspace":"example_workspace"` and `"workspace":"507f1f77bcf86cd799439011"` are both valid when owned by the authenticated organization. A missing workspace returns `WORKSPACE_SELECTION_REQUIRED`; unknown, archived, or foreign workspaces fail without a charge.

## 3. Run a scraper in one workspace

Send `workspace` with every paid scraper, audit, search, tracking, or API request. In the JSON tool endpoint it is a body field; in a dedicated GET `/v1/...` route it is a query parameter. The selected workspace receives the charge and its own spending limit is checked before paid work begins.

```json theme={null}
{
  "workspace": "example_workspace",
  "handle": "examplecreator",
  "trim": true
}
```

`trim` defaults to `true` on every scraper. Trimmed responses preserve public source keys and nesting, all returned metrics including `null`, `0`, and `false`, plus public playable/downloadable media URLs. They remove only noisy, heavy, or unsafe data. Send `"trim": false` only when a full sanitized response is needed. Credentials, request/response headers, transport context, internal credit fields, and upstream-provider identity are never returned in either mode.

## 4. Understand workspace spending limits

Use `get_workspace_credit_usage` with the same `workspace` value to inspect that workspace. `summary.canSpendNow` is the amount the selected workspace can actually spend now.

A limit can be any value from zero upward. Set zero to block future paid work for that workspace, or remove its limit to use only organization credits not protected by other workspace limits. A capped workspace cannot spend above its remaining allocation even when the organization has more credits. Paid requests reserve their estimated charge before executing and fail before the scraper or AI work runs when that workspace cannot spend.

## 5. Find popular videos

Send a natural-language brief and one or more platforms to `find_popular_videos`, together with the intended workspace:

```json theme={null}
{
  "workspace": "example_workspace",
  "requirement": "Find short educational videos about beginner home workouts with clear demonstrations",
  "platforms": ["instagram", "youtube"]
}
```

To search a ready-made term, send `direct_keyword` with exactly one platform. To get more from a previous search, send its `cursor` with the same workspace. See [Popular Video Search](https://creatorinsights.mintlify.site/popular-video-search) for the complete workflow.


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