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

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

Fetch a single TikTok video by URL with its caption and engagement counts (views, likes, comments, shares, saves).

This page is the seller-facing summary of one catalog API, `tiktok.video`. 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.40 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

This API takes no input fields.

> **Full input JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/tiktok.video.input.json",
>   "example": {
>     "url": "https://www.tiktok.com/@mrbeast/video/7654638524729216287?_r=1&u_code=elgjf3ff8cajhk&preview_pb=0&sharer_language=en&_d=elh6737j6kjl71&share_item_id=7654638524729216287&source=h5_m"
>   },
>   "title": "TikTok video input",
>   "type": "object",
>   "additionalProperties": false,
>   "x-aliases": {
>     "videoId": "id"
>   },
>   "properties": {
>     "url": {
>       "type": "string",
>       "description": "Full TikTok video URL."
>     },
>     "id": {
>       "type": "string",
>       "description": "TikTok video ID, the numeric run at the end of a video URL. Use it when a listing SKU handed you an id and no URL."
>     },
>     "requireFields": {
>       "type": "array",
>       "uniqueItems": true,
>       "items": {
>         "type": "string",
>         "enum": [
>           "authorFollowers",
>           "authorVerified",
>           "comments",
>           "likes",
>           "shares",
>           "views"
>         ]
>       },
>       "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 `views`, 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 video that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. A source that returns only a rounded or shortened value for a field does not count as returning it."
>     }
>   },
>   "anyOf": [
>     {
>       "required": [
>         "url"
>       ]
>     },
>     {
>       "required": [
>         "id"
>       ]
>     }
>   ]
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | |
| `data.authorFollowers` | integer or null | no | The author's follower count at the time of the request. Some sources round large counts; name `authorFollowers` in requireFields to be served only by a source that returns the exact count. Null when the serving source does not report it. |
| `data.authorHandle` | string | no | Author's TikTok handle, without the leading @. |
| `data.authorImage` | string | no | Author's avatar image URL. Signed and short-lived, so the query string is load-bearing and kept intact. |
| `data.authorName` | string | no | Author's display name. |
| `data.authorUserId` | string | no | Author's numeric TikTok user id. |
| `data.authorVerified` | boolean or null | no | Whether the author's account carries a TikTok verification badge. Null when the serving source does not report it. |
| `data.caption` | string | yes | |
| `data.comments` | integer | yes | Number of comments. Some sources round large counts (48.5K instead of 48,536); name `comments` in requireFields to be served only by a source that returns the exact count. |
| `data.createdUtc` | number | no | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.durationSeconds` | number | no | Video duration in seconds. |
| `data.hashtags` | array | no | Hashtags carried in the caption, without the leading #. Empty when the post uses none; @-mentions are excluded. |
| `data.id` | string | yes | |
| `data.image` | string | no | URL of the video's cover/thumbnail image. A signed, short-lived TikTok CDN URL (typically expires within about a day; query params are load-bearing and kept intact), often served as HEIC rather than JPEG, so fetch it promptly and transcode if you need broad browser support. Absent when the upstream provides no cover. |
| `data.likes` | integer | yes | Number of likes. Some sources round large counts (2.9M instead of 2,884,604); name `likes` in requireFields to be served only by a source that returns the exact count. |
| `data.region` | string | yes | |
| `data.saves` | integer | yes | |
| `data.shares` | integer | yes | Number of shares. Some sources round large counts (35.9K instead of 35,923); name `shares` in requireFields to be served only by a source that returns the exact count. |
| `data.soundAuthor` | string | no | Credited author of the sound. |
| `data.soundClipId` | string | no | Id of the sound the video uses. Pass it to tiktok.song or tiktok.song\_videos as clipId. |
| `data.soundTitle` | string | no | Name of the sound. "original sound" means the creator's own audio rather than a licensed track. |
| `data.url` | string | no | Canonical TikTok URL of the video. |
| `data.videoUrl` | string | no | Playable video URL. Signed and short-lived, so the query string is load-bearing and kept intact. |
| `data.views` | integer | yes | Number of plays. Some sources round large counts (32.7M instead of 32,736,400); name `views` in requireFields to be served only by a source that returns the exact count. |
| `found` | boolean | yes | |

Extra fields are kept, missing declared fields fail.

> **Full output JSON Schema**
>
> ```json theme={"dark"}
> {
>   "x-anyapi-result-list": false,
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/tiktok.video.output.json",
>   "title": "TikTok video output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean"
>     },
>     "data": {
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "required": [
>             "id",
>             "caption",
>             "region",
>             "views",
>             "likes",
>             "comments",
>             "shares",
>             "saves"
>           ],
>           "properties": {
>             "id": {
>               "x-anyapi-must-populate": true,
>               "type": "string"
>             },
>             "caption": {
>               "x-anyapi-must-populate": true,
>               "type": "string"
>             },
>             "image": {
>               "type": "string",
>               "description": "URL of the video's cover/thumbnail image. A signed, short-lived TikTok CDN URL (typically expires within about a day; query params are load-bearing and kept intact), often served as HEIC rather than JPEG, so fetch it promptly and transcode if you need broad browser support. Absent when the upstream provides no cover."
>             },
>             "region": {
>               "type": "string"
>             },
>             "views": {
>               "type": "integer",
>               "description": "Number of plays. Some sources round large counts (32.7M instead of 32,736,400); name `views` in requireFields to be served only by a source that returns the exact count."
>             },
>             "likes": {
>               "type": "integer",
>               "description": "Number of likes. Some sources round large counts (2.9M instead of 2,884,604); name `likes` in requireFields to be served only by a source that returns the exact count."
>             },
>             "comments": {
>               "type": "integer",
>               "description": "Number of comments. Some sources round large counts (48.5K instead of 48,536); name `comments` in requireFields to be served only by a source that returns the exact count."
>             },
>             "shares": {
>               "type": "integer",
>               "description": "Number of shares. Some sources round large counts (35.9K instead of 35,923); name `shares` in requireFields to be served only by a source that returns the exact count."
>             },
>             "saves": {
>               "type": "integer"
>             },
>             "url": {
>               "type": "string",
>               "description": "Canonical TikTok URL of the video."
>             },
>             "createdUtc": {
>               "type": "number",
>               "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>             },
>             "authorHandle": {
>               "type": "string",
>               "description": "Author's TikTok handle, without the leading @."
>             },
>             "authorName": {
>               "type": "string",
>               "description": "Author's display name."
>             },
>             "authorUserId": {
>               "type": "string",
>               "description": "Author's numeric TikTok user id."
>             },
>             "authorImage": {
>               "type": "string",
>               "description": "Author's avatar image URL. Signed and short-lived, so the query string is load-bearing and kept intact."
>             },
>             "durationSeconds": {
>               "type": "number",
>               "description": "Video duration in seconds."
>             },
>             "videoUrl": {
>               "type": "string",
>               "description": "Playable video URL. Signed and short-lived, so the query string is load-bearing and kept intact."
>             },
>             "soundClipId": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Id of the sound the video uses. Pass it to tiktok.song or tiktok.song_videos as clipId."
>             },
>             "soundTitle": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Name of the sound. \"original sound\" means the creator's own audio rather than a licensed track."
>             },
>             "soundAuthor": {
>               "x-anyapi-must-populate": true,
>               "type": "string",
>               "description": "Credited author of the sound."
>             },
>             "hashtags": {
>               "type": "array",
>               "description": "Hashtags carried in the caption, without the leading #. Empty when the post uses none; @-mentions are excluded.",
>               "items": {
>                 "type": "string"
>               }
>             },
>             "authorFollowers": {
>               "type": [
>                 "integer",
>                 "null"
>               ],
>               "description": "The author's follower count at the time of the request. Some sources round large counts; name `authorFollowers` in requireFields to be served only by a source that returns the exact count. Null when the serving source does not report it."
>             },
>             "authorVerified": {
>               "type": [
>                 "boolean",
>                 "null"
>               ],
>               "description": "Whether the author's account carries a TikTok verification badge. Null when the serving source does not report it."
>             }
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `caption`
* `id`
* `soundAuthor`
* `soundClipId`
* `soundTitle`

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 `hashtags` 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/@mrbeast/video/7654638524729216287?_r=1&u_code=elgjf3ff8cajhk&preview_pb=0&sharer_language=en&_d=elh6737j6kjl71&share_item_id=7654638524729216287&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.