# Instagram Popular Search

Explore an Instagram topic by keyword and get the curated popular media for it, plus related keyword suggestions and the topic description. Multi-word keywords are supported (e.g. green nature). Returns up to ~12 media items in a single response (Instagram does not paginate this surface on the public web). A keyword without a topic page returns found=false. A completed lookup costs one credit, including a definitive not-found result, because every lookup uses costly dedicated Instagram proxies.

- **Documentation:** [https://scrappa.co/docs/instagram-api/instagram_popular_search](https://scrappa.co/docs/instagram-api/instagram_popular_search)
- **API group:** Instagram API
- **Endpoint:** `GET https://scrappa.co/api/instagram/search/popular`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | Yes | Topic keyword (e.g. nature, green nature) |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/instagram/search/popular?q=nature"
```

## Example response

```json
{
    "success": true,
    "found": true,
    "query": "nature",
    "media": [
        {
            "id": "3865589231042854730",
            "shortcode": "DMCfmHttFvu",
            "media_type": "video",
            "caption": "Reel caption text...",
            "play_count": 2450000,
            "video_url": "https://...",
            "thumbnail_url": "https://...",
            "author": {
                "id": "123456789",
                "username": "creatorname",
                "profile_pic_url": "https://...",
                "is_verified": false
            },
            "permalink": "https://www.instagram.com/reel/DMCfmHttFvu/"
        }
    ],
    "media_count": 12,
    "related_keywords": [
        "nature photography",
        "nature lover",
        "nature beauty"
    ],
    "description": "Nature, in the broadest sense, is the physical world or universe..."
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The q parameter is missing or empty. |
| 503 | Instagram Upstream Unavailable | Instagram rejected or failed all bounded attempts through approved proxies. Retry the request later. The request is retryable and does not consume credits. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
