> ## 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 Post Comments

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

List the comments on an Instagram post or reel by URL with cursor pagination (text, author, likes).

This page is the seller-facing summary of one catalog API, `instagram.post_comments`. 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 **\$0.80 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. |
| `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 `replies`, 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 comment that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. |
| `url` | string | yes | Full Instagram post or reel URL. |

> **Full input JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/instagram.post_comments.input.json",
>   "example": {
>     "url": "https://www.instagram.com/reel/DWzrfE2kaY8/"
>   },
>   "title": "Instagram post comments input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "url"
>   ],
>   "properties": {
>     "url": {
>       "type": "string",
>       "description": "Full Instagram post or reel URL."
>     },
>     "cursor": {
>       "type": "string",
>       "description": "Pagination cursor from a previous response's nextCursor."
>     },
>     "requireFields": {
>       "type": "array",
>       "uniqueItems": true,
>       "items": {
>         "type": "string",
>         "enum": [
>           "replies",
>           "userId"
>         ]
>       },
>       "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 `replies`, 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 comment 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 | |
| `data.comments` | array | yes | |
| `data.comments[].author` | string | yes | |
| `data.comments[].avatarUrl` | string | no | URL of the commenting account's profile avatar image. |
| `data.comments[].createdUtc` | number | yes | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.comments[].id` | string | yes | |
| `data.comments[].likes` | integer or null | yes | Number of likes on the comment. Null when the source does not report it. |
| `data.comments[].replies` | integer or null | no | Number of replies to the comment, which tells you whether instagram.comment\_replies has anything to fetch. Null when this source does not report it. |
| `data.comments[].text` | string | yes | |
| `data.comments[].userId` | string or null | no | Instagram user id of the commenting account. Null when this source does not report it. |
| `data.comments[].verified` | boolean | yes | |
| `data.nextCursor` | string or null | yes | Opaque cursor for the next page of comments, or null when this lane has no more. Pass it back as cursor to continue. |
| `found` | boolean | yes | |

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.post_comments.output.json",
>   "title": "Instagram post comments output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean"
>     },
>     "data": {
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "additionalProperties": false,
>           "required": [
>             "comments",
>             "nextCursor"
>           ],
>           "properties": {
>             "nextCursor": {
>               "type": [
>                 "string",
>                 "null"
>               ],
>               "description": "Opaque cursor for the next page of comments, or null when this lane has no more. Pass it back as cursor to continue."
>             },
>             "comments": {
>               "x-anyapi-must-populate": true,
>               "type": "array",
>               "items": {
>                 "type": "object",
>                 "required": [
>                   "id",
>                   "text",
>                   "author",
>                   "verified",
>                   "likes",
>                   "createdUtc"
>                 ],
>                 "properties": {
>                   "id": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "text": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "author": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "verified": {
>                     "type": "boolean"
>                   },
>                   "likes": {
>                     "type": [
>                       "integer",
>                       "null"
>                     ],
>                     "description": "Number of likes on the comment. Null when the source does not report it."
>                   },
>                   "createdUtc": {
>                     "x-anyapi-must-populate": true,
>                     "type": "number",
>                     "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>                   },
>                   "avatarUrl": {
>                     "type": "string",
>                     "description": "URL of the commenting account's profile avatar image."
>                   },
>                   "replies": {
>                     "type": [
>                       "integer",
>                       "null"
>                     ],
>                     "description": "Number of replies to the comment, which tells you whether instagram.comment_replies has anything to fetch. Null when this source does not report it."
>                   },
>                   "userId": {
>                     "type": [
>                       "string",
>                       "null"
>                     ],
>                     "description": "Instagram user id of the commenting account. Null when this source does not report it."
>                   }
>                 }
>               }
>             }
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `author`
* `comments`
* `createdUtc`
* `id`
* `text`

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 `comments` array.

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

## Example request

```json theme={"dark"}
{
  "url": "https://www.instagram.com/reel/DWzrfE2kaY8/"
}
```

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.