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

# Instagram Popular

Default Instagram tool for niche-based popular/viral inspiration, matching the dashboard API source operation. Pass one focused topic slug as query: lowercase, one or two meaningful terms, hyphenating a multiword topic (for example ai-tools or founder-stories). Remove request filler such as find, show, best, top, viral, trending and videos; do not add # or country codes. Preserve an exact product, company, creator or handle instead of replacing it with a broad niche. Results can include non-video posts: retain Reels/videos when requested. For indexed Reels with a date window use search\_insta\_reels. For an exact hashtag use search\_insta\_hashtag. Do not use search\_insta for video discovery.

Explore Instagram's public Popular topic page without an Instagram login. The first page can include topic context, sources, suggested terms, media count, posts and an opaque cursor. Keep the same query when requesting the next page; later pages contain posts and pagination fields. This search supports query and cursor only. A proxy country or content-origin filter is not available, and Creator Insights does not force an India region. Instagram determines which posts appear. Use a short, literal topic or entity, for example beauty-creators. Start with one or two related terms; this is guidance, not a guaranteed keyword limit. Do not put a detailed creative brief, ranking instructions or geographic constraints in query. No date, engagement, region or custom ranking parameter is available; assess returned fields separately. Scraper responses preserve their public source field names by default (trim omitted or true) while removing only noisy, heavy, or unsafe fields. Set trim=false for the full sanitized source response.

Intelligence uses plan credits; niche searches start at 2, other ordinary fetches at 1, and applicable options can cost more.

> [!NOTE]
>
> Instagram Popular supports query and cursor only. There is no proxy-country or country-of-origin filter for this operation. Creator Insights does not force an India region. Instagram selects the topic results. Missing topic pages return successful empty posts collections with no customer credit deduction. For narrow B2B keyword research, consider search\_insta\_reels and review captions for relevance.

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

## Endpoint

**GET** `https://api.creatorinsights.in/v1/instagram/popular`

**Content type:** Query parameters; no JSON request body.

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

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

## Request parameters

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

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

**query** `string` *required*

The Popular topic to search for.

**cursor** `string`

The opaque cursor returned by the previous response. Use it with the same query to fetch the next page of posts.

**workspace** `string`

Workspace ID or current name in the authenticated organization. Required for paid requests when the organization has more than one active workspace. The selected workspace receives this request charge.

**trim** `boolean` (default: true)

Defaults to true: preserve public source field names, metrics, and public media URLs while removing only noisy, heavy, or unsafe fields. Set false for the full sanitized source response; credentials, transport headers/context, internal credit data, and upstream-provider identity are always removed.

## Request example

Send these arguments as URL query parameters.

```json theme={null}
{
  "query": "content marketing",
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
}
```

```bash cURL theme={null}
curl --get 'https://api.creatorinsights.in/v1/instagram/popular' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  --data-urlencode 'query=content marketing' \
  --data-urlencode 'workspace=YOUR_WORKSPACE_ID_OR_CURRENT_NAME'
```

```javascript Node.js theme={null}
const parameters = {
  "query": "content marketing",
  "workspace": "YOUR_WORKSPACE_ID_OR_CURRENT_NAME"
};
const url = new URL('https://api.creatorinsights.in/v1/instagram/popular');
for (const [name, value] of Object.entries(parameters)) url.searchParams.set(name, String(value));
const response = await fetch(url, { headers: { 'x-api-key': process.env.CREATOR_INSIGHTS_API_KEY } });
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("{\"query\":\"content marketing\",\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\"}")
response = requests.get("https://api.creatorinsights.in/v1/instagram/popular",
    headers={"x-api-key": os.environ["CREATOR_INSIGHTS_API_KEY"]},
    params=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,
    "query": "example",
    "title": "Example creator content",
    "total_media_count": 120,
    "description": {
      "plain_text": "Example creator content",
      "source_uris": [
        "https://example.com/sample"
      ],
      "linked_terms": []
    },
    "suggested_terms": [
      "example"
    ],
    "posts": [
      {
        "id": "example_id",
        "shortcode": "example",
        "url": "https://example.com/sample",
        "type": "example",
        "caption": "Example creator content",
        "display_url": "https://media.example.com/sample.mp4",
        "video_url": "https://media.example.com/sample.mp4",
        "play_count": 120,
        "owner": {
          "id": "1234567890123456789",
          "username": "examplecreator",
          "is_verified": false,
          "profile_pic_url": "https://example.com/sample"
        }
      }
    ],
    "cursor": "EXAMPLE_CURSOR",
    "has_more": false
  },
  "credits_charged": 2
}
```

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

**credits\_charged** `number`

Creator Insights plan credits for this call; the example is illustrative.

| Field | Type | Description |
| - | - | - |
| `success` | boolean | Example response field. Availability depends on the record and selected options. |
| `data` | object | Public source field names are preserved by default when trim is omitted or true; only noisy, heavy, or unsafe fields are removed. Set trim=false for the full sanitized source response. Fields vary with source availability; unavailable metrics are null. |
| `data.success` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.query` | string | Example response field. Availability depends on the record and selected options. |
| `data.title` | string | Example response field. Availability depends on the record and selected options. |
| `data.total_media_count` | integer | Example response field. Availability depends on the record and selected options. |
| `data.description` | object | Nested object. Expand the response schema for its fields. |
| `data.description.plain_text` | string | Example response field. Availability depends on the record and selected options. |
| `data.description.source_uris` | array | List of returned entries; may be empty. |
| `data.description.linked_terms` | array | List of returned entries; may be empty. |
| `data.suggested_terms` | array | List of returned entries; may be empty. |
| `data.posts` | array | List of returned entries; may be empty. |
| `data.posts[].id` | string | Example response field. Availability depends on the record and selected options. |
| `data.posts[].shortcode` | string | Example response field. Availability depends on the record and selected options. |
| `data.posts[].url` | string | Example response field. Availability depends on the record and selected options. |
| `data.posts[].type` | string | Example response field. Availability depends on the record and selected options. |
| `data.posts[].caption` | string | Example response field. Availability depends on the record and selected options. |
| `data.posts[].display_url` | string | Example response field. Availability depends on the record and selected options. |
| `data.posts[].video_url` | string | Example response field. Availability depends on the record and selected options. |
| `data.posts[].play_count` | integer | Example response field. Availability depends on the record and selected options. |
| `data.posts[].owner` | object | Nested object. Expand the response schema for its fields. |
| `data.posts[].owner.id` | string | Example response field. Availability depends on the record and selected options. |
| `data.posts[].owner.username` | string | Example response field. Availability depends on the record and selected options. |
| `data.posts[].owner.is_verified` | boolean | Example response field. Availability depends on the record and selected options. |
| `data.posts[].owner.profile_pic_url` | string | Example response field. Availability depends on the record and selected options. |
| `data.cursor` | string or null | Next-page cursor, or null when no more results exist. |
| `data.has_more` | boolean | Example response field. Availability depends on the record and selected options. |
| `credits_charged` | number | 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/search_insta_popular`. 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/search_insta_popular' \
  -H "x-api-key: $CREATOR_INSIGHTS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{\"query\":\"content marketing\",\"workspace\":\"YOUR_WORKSPACE_ID_OR_CURRENT_NAME\"}'
```

```json theme={null}
{
  "status": true,
  "tool": "search_insta_popular",
  "credits_deducted": 2,
  "data": {
    "success": true,
    "query": "example",
    "title": "Example creator content",
    "total_media_count": 120,
    "description": {
      "plain_text": "Example creator content",
      "source_uris": [
        "https://example.com/sample"
      ],
      "linked_terms": []
    },
    "suggested_terms": [
      "example"
    ],
    "posts": [
      {
        "id": "example_id",
        "shortcode": "example",
        "url": "https://example.com/sample",
        "type": "example",
        "caption": "Example creator content",
        "display_url": "https://media.example.com/sample.mp4",
        "video_url": "https://media.example.com/sample.mp4",
        "play_count": 120,
        "owner": {
          "id": "1234567890123456789",
          "username": "examplecreator",
          "is_verified": false,
          "profile_pic_url": "https://example.com/sample"
        }
      }
    ],
    "cursor": "EXAMPLE_CURSOR",
    "has_more": false
  }
}
```

## Empty search response

A confirmed empty page is a successful result. The JSON tool endpoint returns zero credits\_deducted, as shown below. MCP returns the nested data payload in its content block. A dedicated REST route reports zero credits\_charged. Authentication, throttling and provider outages remain failures.

```json theme={null}
{
  "status": true,
  "tool": "search_insta_popular",
  "credits_deducted": 0,
  "data": {
    "success": true,
    "query": "example-topic",
    "posts": [],
    "cursor": null,
    "has_more": 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.