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

# Instagram Reels Search

> Sell instagram.reels_search on AnyAPI: the request your endpoint receives, the response it must return, and what the live trial grades.

Search Instagram Reels by keyword against Instagram's own reels search and get matching reels with view, like and comment counts, caption, creator and duration. Results are relevance-ranked, not chronological. We remove overlap with recent pages, but older reels may reappear during a long search. nextCursor is null when a page contains only reels seen in recent pages. For a web-search-index view of the same keyword, with a recency filter and numbered pages, use instagram.web\_reels\_search.

This page is the seller-facing summary of one catalog API, `instagram.reels_search`. The transport rules that apply to every API a seller serves - signed requests, the response envelope, timeouts, and body limits - are on [the operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md).

## The price you compete with

AnyAPI publishes this API from **\$1.10 per 1,000 requests**. That is the price a buyer sees today, so it is the price your endpoint has to come in under to win traffic.

## The request your endpoint receives

| Field | Type | Required | What it means |
| - | - | - | - |
| `cursor` | string | no | Pagination cursor from a previous response's nextCursor. |
| `query` | string | yes | Search keyword (e.g. "crossfit"). |
| `requireFields` | array | no | Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `locationName`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a reel that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. |

> **Full input JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/instagram.reels_search.input.json",
>   "example": {
>     "query": "collab"
>   },
>   "title": "Instagram reels search input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "query"
>   ],
>   "properties": {
>     "query": {
>       "type": "string",
>       "description": "Search keyword (e.g. \"crossfit\")."
>     },
>     "cursor": {
>       "type": "string",
>       "description": "Pagination cursor from a previous response's nextCursor."
>     },
>     "requireFields": {
>       "type": "array",
>       "uniqueItems": true,
>       "items": {
>         "type": "string",
>         "enum": [
>           "audioId",
>           "locationId",
>           "locationLat",
>           "locationLng",
>           "locationName"
>         ]
>       },
>       "description": "Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `locationName`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a reel that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge."
>     }
>   }
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | Wrapper holding the reels array, or null when nothing was found. |
| `data.nextCursor` | string or null | yes | Opaque cursor for the next page of reels, or null when this lane has no more. Pass it back as cursor to continue. Instagram relevance-ranks reels search, so a later page can repeat reels from an earlier one. |
| `data.reels` | array | yes | Reels matching the search. |
| `data.reels[].audioId` | string or null | no | Instagram audio id of the post's sound, licensed track or original audio, the audioId instagram.audio\_reels takes to list other reels using it. Absent when the post has no sound. Null when the serving source does not report it. |
| `data.reels[].avatarUrl` | string | no | Profile picture URL of the author. |
| `data.reels[].caption` | string | yes | Reel caption text. |
| `data.reels[].comments` | integer | yes | Number of comments on the reel. |
| `data.reels[].countsHidden` | boolean | no | Whether the author has hidden the like and view counts. |
| `data.reels[].createdUtc` | number | yes | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.reels[].displayName` | string | no | Display name of the author. |
| `data.reels[].durationSeconds` | number | yes | Reel duration in seconds. |
| `data.reels[].hasAudio` | boolean | no | True when the reel carries an audio track. |
| `data.reels[].hashtags` | array | no | Hashtags carried in the caption, each including its leading #. |
| `data.reels[].id` | string | no | Reel media identifier. |
| `data.reels[].likes` | integer | yes | Number of likes on the reel. |
| `data.reels[].locationId` | string or null | no | Instagram location id the post is tagged at. Absent when the post has no location. Null when the serving source does not report it. |
| `data.reels[].locationLat` | number or null | no | Latitude of the tagged location, in decimal degrees. Null when the serving source does not report it. |
| `data.reels[].locationLng` | number or null | no | Longitude of the tagged location, in decimal degrees. Null when the serving source does not report it. |
| `data.reels[].locationName` | string or null | no | Name of the location the post is tagged at. Null when the serving source does not report it. |
| `data.reels[].mentions` | array | no | Accounts @mentioned in the caption, each including its leading @. |
| `data.reels[].paidPartnership` | boolean | yes | True when the reel is a paid partnership. |
| `data.reels[].productType` | string | no | Instagram product type of the media, for example clips. |
| `data.reels[].reshares` | integer | no | Number of times the post has been reshared, when Instagram reports it. |
| `data.reels[].shortcode` | string | yes | Instagram media shortcode. |
| `data.reels[].soundAuthor` | string | no | Credited artist of a licensed track, or the username of the account whose original audio it is. Absent when the post has no sound. |
| `data.reels[].soundTitle` | string | no | Name of the sound on a reel or a post with music. "Original audio" means the creator's own audio rather than a licensed track. Absent when the post has no sound. |
| `data.reels[].thumbnail` | string | yes | URL of the reel thumbnail image. |
| `data.reels[].url` | string | yes | Canonical URL of the reel. |
| `data.reels[].userId` | string | no | Instagram user id of the author. |
| `data.reels[].username` | string | yes | Username of the account that posted the reel. |
| `data.reels[].verified` | boolean | yes | True when the posting account is verified. |
| `data.reels[].videoUrl` | string | no | Direct URL to the reel video. |
| `data.reels[].views` | integer | no | Play count of the reel. |
| `found` | boolean | yes | True when matching reels were found; false when the search returned nothing. |

Extra fields are kept, missing declared fields fail.

> **Full output JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/instagram.reels_search.output.json",
>   "title": "Instagram reels search output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean",
>       "description": "True when matching reels were found; false when the search returned nothing."
>     },
>     "data": {
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "additionalProperties": false,
>           "required": [
>             "reels",
>             "nextCursor"
>           ],
>           "properties": {
>             "reels": {
>               "x-anyapi-must-populate": true,
>               "type": "array",
>               "items": {
>                 "type": "object",
>                 "required": [
>                   "shortcode",
>                   "url",
>                   "caption",
>                   "thumbnail",
>                   "likes",
>                   "comments",
>                   "durationSeconds",
>                   "createdUtc",
>                   "username",
>                   "verified",
>                   "paidPartnership"
>                 ],
>                 "properties": {
>                   "shortcode": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Instagram media shortcode."
>                   },
>                   "url": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Canonical URL of the reel."
>                   },
>                   "hashtags": {
>                     "x-anyapi-must-populate": true,
>                     "type": "array",
>                     "description": "Hashtags carried in the caption, each including its leading #.",
>                     "items": {
>                       "type": "string"
>                     }
>                   },
>                   "mentions": {
>                     "x-anyapi-must-populate": true,
>                     "type": "array",
>                     "description": "Accounts @mentioned in the caption, each including its leading @.",
>                     "items": {
>                       "type": "string"
>                     }
>                   },
>                   "reshares": {
>                     "x-anyapi-must-populate": true,
>                     "type": "integer",
>                     "description": "Number of times the post has been reshared, when Instagram reports it."
>                   },
>                   "soundTitle": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Name of the sound on a reel or a post with music. \"Original audio\" means the creator's own audio rather than a licensed track. Absent when the post has no sound."
>                   },
>                   "soundAuthor": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Credited artist of a licensed track, or the username of the account whose original audio it is. Absent when the post has no sound."
>                   },
>                   "audioId": {
>                     "type": [
>                       "string",
>                       "null"
>                     ],
>                     "description": "Instagram audio id of the post's sound, licensed track or original audio, the audioId instagram.audio_reels takes to list other reels using it. Absent when the post has no sound. Null when the serving source does not report it."
>                   },
>                   "countsHidden": {
>                     "type": "boolean",
>                     "description": "Whether the author has hidden the like and view counts."
>                   },
>                   "locationId": {
>                     "type": [
>                       "string",
>                       "null"
>                     ],
>                     "description": "Instagram location id the post is tagged at. Absent when the post has no location. Null when the serving source does not report it."
>                   },
>                   "locationName": {
>                     "type": [
>                       "string",
>                       "null"
>                     ],
>                     "description": "Name of the location the post is tagged at. Null when the serving source does not report it."
>                   },
>                   "locationLat": {
>                     "type": [
>                       "number",
>                       "null"
>                     ],
>                     "description": "Latitude of the tagged location, in decimal degrees. Null when the serving source does not report it."
>                   },
>                   "locationLng": {
>                     "type": [
>                       "number",
>                       "null"
>                     ],
>                     "description": "Longitude of the tagged location, in decimal degrees. Null when the serving source does not report it."
>                   },
>                   "caption": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Reel caption text."
>                   },
>                   "thumbnail": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "URL of the reel thumbnail image."
>                   },
>                   "views": {
>                     "type": "integer",
>                     "description": "Play count of the reel."
>                   },
>                   "likes": {
>                     "type": "integer",
>                     "description": "Number of likes on the reel."
>                   },
>                   "comments": {
>                     "type": "integer",
>                     "description": "Number of comments on the reel."
>                   },
>                   "durationSeconds": {
>                     "type": "number",
>                     "description": "Reel duration in seconds."
>                   },
>                   "createdUtc": {
>                     "type": "number",
>                     "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>                   },
>                   "username": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Username of the account that posted the reel."
>                   },
>                   "verified": {
>                     "type": "boolean",
>                     "description": "True when the posting account is verified."
>                   },
>                   "paidPartnership": {
>                     "type": "boolean",
>                     "description": "True when the reel is a paid partnership."
>                   },
>                   "id": {
>                     "type": "string",
>                     "description": "Reel media identifier."
>                   },
>                   "videoUrl": {
>                     "type": "string",
>                     "description": "Direct URL to the reel video."
>                   },
>                   "hasAudio": {
>                     "type": "boolean",
>                     "description": "True when the reel carries an audio track."
>                   },
>                   "productType": {
>                     "type": "string",
>                     "description": "Instagram product type of the media, for example clips."
>                   },
>                   "userId": {
>                     "type": "string",
>                     "description": "Instagram user id of the author."
>                   },
>                   "displayName": {
>                     "type": "string",
>                     "description": "Display name of the author."
>                   },
>                   "avatarUrl": {
>                     "type": "string",
>                     "description": "Profile picture URL of the author."
>                   }
>                 }
>               },
>               "description": "Reels matching the search."
>             },
>             "nextCursor": {
>               "type": [
>                 "string",
>                 "null"
>               ],
>               "description": "Opaque cursor for the next page of reels, or null when this lane has no more. Pass it back as cursor to continue. Instagram relevance-ranks reels search, so a later page can repeat reels from an earlier one."
>             }
>           }
>         }
>       ],
>       "description": "Wrapper holding the reels array, or null when nothing was found."
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `caption`
* `hashtags`
* `mentions`
* `reels`
* `reshares`
* `shortcode`
* `soundAuthor`
* `soundTitle`
* `thumbnail`
* `url`
* `username`

The repository marks these fields as ones every source must be able to fill. An empty value is only correct when the entity itself genuinely has nothing there.

## Not found, and how it differs from empty

When the entity does not exist, answer 2xx with the not-found shape:

```json theme={"dark"}
{
  "found": false,
  "data": null
}
```

An empty list is not a not-found: when the entity exists and has nothing to return, answer 2xx with `found: true` and an empty `reels` array.

This output schema declares no `reason` field, so `found: false` is the whole not-found answer.

## Example request

```json theme={"dark"}
{
  "query": "collab"
}
```

The compatibility checks fire the schema's example at your endpoint. After that, your answers are graded against what the currently serving source returned for the same real customer inputs.

## Next

* [The operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md) for signing, budgets, and the live trial.
* [Every API open to sellers](https://getanyapi.com/docs/sell/apis/index.md).
* Want to sell an API that is not on that list? Email [support@getanyapi.com](mailto:support@getanyapi.com).


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