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

# TikTok Video

> Get data from a TikTok video

## Endpoint

```
GET /tiktok/video
```

Also accessible at `/tiktok`.

## Parameters

| Parameter | Type   | Required | Description                                   |
| --------- | ------ | -------- | --------------------------------------------- |
| `url`     | string | Yes      | Tiktok video url                              |
| `api_key` | string | Yes\*    | Your API key (or pass via `X-API-Key` header) |

## Request

<CodeGroup>
  ```http Query Parameter theme={null}
  GET /tiktok/video?url=https://www.tiktok.com/@user/video/123&api_key=xvz-api-
  ```

  ```http Header theme={null}
  GET /tiktok/video?url=https://www.tiktok.com/@user/video/123
  X-API-Key: xvz-api-
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "id": "7123456789012345678",
  "desc": "caption",
  "hashtags": ["fyp", "trending"],
  "mp4_url": "https://...",
  "mp3_url": "https://...",
  "images": [],
  "is_image_post": false,
  "view_count": 247898,
  "creator": {
    "username": "tiktok",
    "display_name": "tiktok",
    "avatar": "https://..."
  },
  "stats": {
    "views": 247898,
    "likes": 38716,
    "comments": 553,
    "shares": 3619,
    "favorites": 6477
  },
  "music": {
    "id": "987654",
    "title": "original sound",
    "author": "tiktok",
    "play_url": "https://..."
  }
}
```
