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

# Find popular videos

Use for popular-video inspiration, cross-platform discovery, relevance ranking, fallback recommendations, and cursor pagination. Do not replace it with separate raw Instagram, YouTube, or TikTok calls. Planned research: pass the user's natural-language requirement and requested platforms; Creator Insights prepares the platform searches and stops successful platforms early. Direct search: pass direct\_keyword and exactly one platform only when the user already supplied a final term or selected a returned recommendation. For a manually supplied direct term, Instagram expects a concise lowercase hyphenated topic with at most two concepts, TikTok a short natural phrase of about two or three space-separated terms, and YouTube a concise natural-language search phrase. Use raw platform fetchers only for explicitly requested raw profiles, posts, URLs, transcripts, comments, or unranked platform searches. results is the shortlist, allResults is the fetched review set, recommendations is keyed by weak platform, and failedPlatforms preserves partial-success diagnostics. Continue with the returned cursor and same workspace. Each non-empty source call costs one credit; empty or failed calls cost zero. The backend allows at most four calls per selected platform, so one, two or three platforms can cost at most 4, 8 or 12 credits. Service-side credit preflight and workspace limits apply automatically. Do not expose or recreate internal query-generation instructions.

Each source query costs one credit only when it returns videos. Empty and failed source queries cost zero. Read data.creditsCharged for the actual V2 search charge; the JSON-tool envelope has no extra charge and the dedicated REST envelope omits a second charge field.

> [!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/video-inspiration/search`

**Content type:** application/json

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

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

## Operation behavior

New searches accept a natural-language requirement and explicit platforms. Direct-keyword searches accept one platform and skip AI planning and ranking. Cursor continuation reuses the last successful stored query. The operation keeps platform results separate, applies only supported filters, and uses the selected workspace for context, ownership and automatic credit enforcement.

Each non-empty source call settles one credit. Empty and failed source calls settle zero. Credit preflight and limits are enforced automatically.

## MCP call

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "find_popular_videos",
    "arguments": {
      "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME",
      "requirement": "Founder-led SaaS product demos for startup teams",
      "platforms": [
        "instagram",
        "youtube"
      ]
    }
  }
}
```

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

**requirement** `string`

What videos to find. The explicit request has priority over workspace context.

**platforms** `string[]`

One or more explicitly requested platforms. Required for a new search; omit when continuing with cursor.

**filters** `object`

Optional platform-specific search filters for YouTube and TikTok. Instagram does NOT accept any filters (no period, sort, duration, or country/region). Shared keys (sort\_by, region) are routed to YouTube and TikTok using their native vocabulary. All filters are ignored for Instagram. Omit a field to use the documented default; do not pass empty strings.

**direct\_keyword** `string`

A platform-native direct term for exactly one platform. Instagram: concise lowercase hyphenated topic, at most two concepts. TikTok: short natural phrase, usually two or three space-separated terms. YouTube: concise natural-language search phrase. Omit requirement and cursor.

**cursor** `string`

Opaque continuation cursor from the previous find\_popular\_videos response. When present, the stored requirement, platforms, filters and query plan are reused.

## Request example

Send these arguments directly as the JSON body.

```json theme={null}
{
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME",
  "requirement": "Founder-led SaaS product demos for startup teams",
  "platforms": [
    "instagram",
    "youtube"
  ]
}
```

```bash cURL theme={null}
curl -X POST 'https://api.creatorinsights.in/v1/video-inspiration/search' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\",\"requirement\":\"Founder-led SaaS product demos for startup teams\",\"platforms\":[\"instagram\",\"youtube\"]}'
```

```javascript Node.js theme={null}
const response = await fetch('https://api.creatorinsights.in/v1/video-inspiration/search', {
  method: 'POST',
  headers: { 'x-api-key': process.env.CREATOR_INSIGHTS_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME",
  "requirement": "Founder-led SaaS product demos for startup teams",
  "platforms": [
    "instagram",
    "youtube"
  ]
})
});
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("{\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\",\"requirement\":\"Founder-led SaaS product demos for startup teams\",\"platforms\":[\\\"instagram\\\",\\\"youtube\\\"]}")
response = requests.post("https://api.creatorinsights.in/v1/video-inspiration/search",
    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,
    "workspaceId": "507f1f77bcf86cd799439011",
    "workspace_id": "507f1f77bcf86cd799439011",
    "name": "Example Brand",
    "is_primary": true,
    "platforms": [
      "instagram"
    ],
    "results": [
      {
        "platform": "instagram",
        "platformId": "example-post",
        "url": "https://www.instagram.com/reel/example/",
        "caption": "A useful product demonstration",
        "views": 25000,
        "match": "exact",
        "relevance": 0.9
      }
    ],
    "allResults": [
      {
        "platform": "instagram",
        "platformId": "example-post",
        "url": "https://www.instagram.com/reel/example/",
        "caption": "A useful product demonstration",
        "views": 25000,
        "match": "exact",
        "relevance": 0.9
      }
    ],
    "recommendations": {},
    "failedPlatforms": [],
    "filterSummary": {
      "instagram": {
        "fetched": 18,
        "shown": 1,
        "filtered": 17
      }
    },
    "appliedFilters": {
      "instagram": {}
    },
    "creditsCharged": 2,
    "pagination": {
      "cursor": "550e8400-e29b-41d4-a716-446655440000",
      "hasMore": true,
      "platforms": {
        "instagram": true
      }
    },
    "reportId": null,
    "reportSaved": false
  }
}
```

## 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.workspaceId` | string | 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.platforms` | array | List of returned entries; may be empty. |
| `data.results` | array | List of returned entries; may be empty. |
| `data.results[].platform` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].platformId` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].url` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].caption` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].views` | integer | Example response field. Availability depends on the record and selected options. |
| `data.results[].match` | string | Example response field. Availability depends on the record and selected options. |
| `data.results[].relevance` | number | Example response field. Availability depends on the record and selected options. |
| `data.allResults` | array | List of returned entries; may be empty. |
| `data.allResults[].platform` | string | Example response field. Availability depends on the record and selected options. |
| `data.allResults[].platformId` | string | Example response field. Availability depends on the record and selected options. |
| `data.allResults[].url` | string | Example response field. Availability depends on the record and selected options. |
| `data.allResults[].caption` | string | Example response field. Availability depends on the record and selected options. |
| `data.allResults[].views` | integer | Example response field. Availability depends on the record and selected options. |
| `data.allResults[].match` | string | Example response field. Availability depends on the record and selected options. |
| `data.allResults[].relevance` | number | Example response field. Availability depends on the record and selected options. |
| `data.recommendations` | object | Nested object. Expand the response schema for its fields. |
| `data.failedPlatforms` | array | List of returned entries; may be empty. |
| `data.filterSummary` | object | Nested object. Expand the response schema for its fields. |
| `data.filterSummary.instagram` | object | Nested object. Expand the response schema for its fields. |
| `data.filterSummary.instagram.fetched` | integer | Example response field. Availability depends on the record and selected options. |
| `data.filterSummary.instagram.shown` | integer | Example response field. Availability depends on the record and selected options. |
| `data.filterSummary.instagram.filtered` | integer | Example response field. Availability depends on the record and selected options. |
| `data.appliedFilters` | object | Nested object. Expand the response schema for its fields. |
| `data.appliedFilters.instagram` | object | Nested object. Expand the response schema for its fields. |
| `data.creditsCharged` | integer | Example response field. Availability depends on the record and selected options. |
| `data.pagination` | object | Nested object. Expand the response schema for its fields. |
| `data.pagination.cursor` | string | Example response field. Availability depends on the record and selected options. |
| `data.pagination.hasMore` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.pagination.platforms` | object | Nested object. Expand the response schema for its fields. |
| `data.pagination.platforms.instagram` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.reportId` | value | Null in the illustrative response. No concrete type is asserted; may be unavailable or populated for another record. |
| `data.reportSaved` | boolean | Example response field. Availability depends on the record and selected options. |

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/find_popular_videos`. Use Header Auth with `x-api-key` and body content type JSON. The outer credits\_deducted is zero because V2 settles source-query credits itself. Read data.creditsCharged for the actual charge.

```bash theme={null}
curl -X POST 'https://api.creatorinsights.in/api/v1/tools/find_popular_videos' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\",\"requirement\":\"Founder-led SaaS product demos for startup teams\",\"platforms\":[\"instagram\",\"youtube\"]}'
```

```json theme={null}
{
  "status": true,
  "tool": "find_popular_videos",
  "credits_deducted": 0,
  "data": {
    "success": true,
    "workspaceId": "507f1f77bcf86cd799439011",
    "workspace_id": "507f1f77bcf86cd799439011",
    "name": "Example Brand",
    "is_primary": true,
    "platforms": [
      "instagram"
    ],
    "results": [
      {
        "platform": "instagram",
        "platformId": "example-post",
        "url": "https://www.instagram.com/reel/example/",
        "caption": "A useful product demonstration",
        "views": 25000,
        "match": "exact",
        "relevance": 0.9
      }
    ],
    "allResults": [
      {
        "platform": "instagram",
        "platformId": "example-post",
        "url": "https://www.instagram.com/reel/example/",
        "caption": "A useful product demonstration",
        "views": 25000,
        "match": "exact",
        "relevance": 0.9
      }
    ],
    "recommendations": {},
    "failedPlatforms": [],
    "filterSummary": {
      "instagram": {
        "fetched": 18,
        "shown": 1,
        "filtered": 17
      }
    },
    "appliedFilters": {
      "instagram": {}
    },
    "creditsCharged": 2,
    "pagination": {
      "cursor": "550e8400-e29b-41d4-a716-446655440000",
      "hasMore": true,
      "platforms": {
        "instagram": true
      }
    },
    "reportId": null,
    "reportSaved": false
  }
}
```

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