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

# TikTok Video Comments

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

List the comments on a TikTok video by URL with cursor pagination (text, author, likes, reply count).

This page is the seller-facing summary of one catalog API, `tiktok.video_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.60 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 `authorUserId` or `language`, 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. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted. |
| `url` | string | yes | TikTok post URL on tiktok.com: a video or photo post ([https://www.tiktok.com/@\&lt;user\&gt;/video/\&lt;id](https://www.tiktok.com/@\&lt;user\&gt;/video/\&lt;id)> or /photo/\<id>) or a vm.tiktok.com or vt.tiktok.com short link. A profile link ([https://www.tiktok.com/@\&lt;user](https://www.tiktok.com/@\&lt;user)>), a video file link (tiktokcdn.com) or a link to any other site 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/tiktok.video_comments.input.json",
>   "example": {
>     "url": "https://www.tiktok.com/@zachking/video/7650468599424945422?_r=1&u_code=f0hj7d780760m9&preview_pb=0&sharer_language=en&_d=f0hj7blh067h71&share_item_id=7650468599424945422&source=h5_m"
>   },
>   "title": "TikTok video comments input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "url"
>   ],
>   "properties": {
>     "url": {
>       "type": "string",
>       "pattern": "^(?:https?://)?(?:[A-Za-z0-9-]+\\.)*tiktok\\.com(?:[/?#]|$)",
>       "not": {
>         "pattern": "^(?:https?://)?(?:[A-Za-z0-9-]+\\.)*tiktok\\.com/@[^/?#]*/?(?:[?#]|$)"
>       },
>       "description": "TikTok post URL on tiktok.com: a video or photo post (https://www.tiktok.com/@<user>/video/<id> or /photo/<id>) or a vm.tiktok.com or vt.tiktok.com short link. A profile link (https://www.tiktok.com/@<user>), a video file link (tiktokcdn.com) or a link to any other site is refused as invalid input, with no charge."
>     },
>     "cursor": {
>       "type": "string",
>       "description": "Pagination cursor from a previous response's nextCursor."
>     },
>     "requireFields": {
>       "type": "array",
>       "uniqueItems": true,
>       "items": {
>         "type": "string",
>         "enum": [
>           "authorUserId",
>           "language"
>         ]
>       },
>       "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 `authorUserId` or `language`, 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. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted."
>     }
>   }
> }
> ```

## 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[].authorImage` | string | no | Comment author's avatar image URL. Signed and short-lived, so the query string is load-bearing and kept intact. |
| `data.comments[].authorName` | string | no | Comment author's display name. |
| `data.comments[].authorUserId` | string or null | no | Comment author's numeric TikTok user id. Null when the serving source does not report it. |
| `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[].language` | string or null | no | Language TikTok detected for the comment text, as a code such as en. Null when the serving source does not report it. |
| `data.comments[].likes` | integer | yes | |
| `data.comments[].replies` | integer | yes | |
| `data.comments[].text` | string | yes | |
| `data.comments[].videoId` | string | no | Identifier of the video the comment belongs to. |
| `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/tiktok.video_comments.output.json",
>   "title": "TikTok video 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": {
>               "type": "array",
>               "items": {
>                 "type": "object",
>                 "required": [
>                   "id",
>                   "text",
>                   "author",
>                   "likes",
>                   "replies",
>                   "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"
>                   },
>                   "likes": {
>                     "type": "integer"
>                   },
>                   "replies": {
>                     "type": "integer"
>                   },
>                   "createdUtc": {
>                     "type": "number",
>                     "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>                   },
>                   "videoId": {
>                     "type": "string",
>                     "description": "Identifier of the video the comment belongs to."
>                   },
>                   "authorName": {
>                     "type": "string",
>                     "description": "Comment author's display name."
>                   },
>                   "authorImage": {
>                     "type": "string",
>                     "description": "Comment author's avatar image URL. Signed and short-lived, so the query string is load-bearing and kept intact."
>                   },
>                   "authorUserId": {
>                     "type": [
>                       "string",
>                       "null"
>                     ],
>                     "description": "Comment author's numeric TikTok user id. Null when the serving source does not report it."
>                   },
>                   "language": {
>                     "type": [
>                       "string",
>                       "null"
>                     ],
>                     "description": "Language TikTok detected for the comment text, as a code such as en. Null when the serving source does not report it."
>                   }
>                 }
>               }
>             }
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `author`
* `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.tiktok.com/@zachking/video/7650468599424945422?_r=1&u_code=f0hj7d780760m9&preview_pb=0&sharer_language=en&_d=f0hj7blh067h71&share_item_id=7650468599424945422&source=h5_m"
}
```

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.