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

# Search media

> Searches Instagram for trending reels and videos matching a keyword. Maximum 24 results per page. Some valid keywords may return no results, since this surfaces trending content rather than a full-text search.

## What it does

Searches Instagram for trending reels and videos matching a keyword. Maximum 24 results per page. Some valid keywords may return no results, since this surfaces trending content rather than a full-text search.

## Tool details

| Field         | Value                      |
| ------------- | -------------------------- |
| Tool name     | `instagram_search_media`   |
| Platform      | Instagram                  |
| REST endpoint | `GET /v1/instagram/search` |
| Result type   | Collection tool            |

## Parameters

| Parameter           | Type       | Required | Description                                                                                    |
| ------------------- | ---------- | -------- | ---------------------------------------------------------------------------------------------- |
| `query`             | `string`   | Yes      | Search query                                                                                   |
| `count`             | `integer`  | No       | Number of results to fetch (maximum: 24) Default: `24`.                                        |
| `cursor`            | `string`   | No       | Pagination cursor                                                                              |
| `projection_preset` | `string`   | No       | Defaults to `minimal`. Allowed values: `full`, `minimal`, `identity`, `engagement`, `content`. |
| `data_fields`       | `string[]` | No       | Adds top-level keys from `data` on top of the selected `projection_preset`.                    |
| `item_fields`       | `string[]` | No       | Adds keys from `data.orderedItems[]` on top of the selected `projection_preset`.               |

## Example

```json theme={null}
{
  "name": "instagram_search_media",
  "arguments": {
    "query": "cooking",
    "count": 24,
    "projection_preset": "minimal",
    "data_fields": [
      "orderedItems",
      "nextCursor",
      "cursor",
      "itemCount"
    ],
    "item_fields": [
      "totalItems",
      "entityId",
      "name",
      "published",
      "content"
    ]
  }
}
```

## Available data fields

* `@context`
* `type`
* `partOf`
* `totalItems`
* `cursor`
* `nextCursor`
* `next`
* `itemCount`
* `orderedItems`

## Available item fields

* `type`
* `id`
* `url`
* `entityId`
* `content`
* `published`
* `likeCount`
* `commentCount`
* `attributedTo`
* `location`
* `tag`
* `language`
* `isEdited`
* `isSponsored`
* `viewCount`
* `duration`
* `contentFormat`
* `attachment`
* `image`
* `audio`
* `name`
* `totalItems`
* `items`

## Response notes

Successful calls return a JSON object with a top-level `data` field and, when
available, `metadata.creditsUsed` and `metadata.creditsRemaining`. See
[response format](/getting-started/response-format),
[pagination](/getting-started/pagination), and [credits](/getting-started/credits).
