# TikTok / Video

Fetch public details for a single TikTok video. Provide exactly one of url or id.

```
GET /api/v1/tiktok/video
```

Auth: `Authorization: Bearer <SOCIFY_KEY>`  
Credits: 1 credit per request

## Parameters

| Name | Required | Description | Example |
|------|----------|-------------|---------|
| `url` | no | Exactly one of url or id. Prefer full video URL. | `https://www.tiktok.com/@daviddobrik/video/7165262254722534698` |
| `id` | no | Video id (alternative to url). | `7165262254722534698` |

## Example

```bash
curl -s 'https://trysocify.com/api/v1/tiktok/video?url=https%3A%2F%2Fwww.tiktok.com%2F%40daviddobrik%2Fvideo%2F7165262254722534698' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Video id. |
| `url` | string | Video URL. |
| `caption` | string | Caption. |
| `created_at` | number | Unix publish timestamp. |
| `plays` | number | Play count. |
| `likes` | number | Like count. |
| `comments` | number | Comment count. |
| `shares` | number | Share count. |
| `duration` | number | Duration in seconds. |
| `cover` | string | Cover image URL. |
| `author` | object | Author username and id. |
## Sample response

Successful lookups wrap the payload in `{ ok, platform, resource, params, data, meta }`. `data` is shown below.

```json
{
  "ok": true,
  "platform": "tiktok",
  "resource": "video",
  "params": {
    "url": "https://www.tiktok.com/@daviddobrik/video/7165262254722534698"
  },
  "data": {
    "author": {
      "id": "7119601",
      "username": "daviddobrik"
    },
    "caption": "behind the scenes",
    "comments": 4200,
    "cover": "https://p16-sign-va.tiktokcdn.com/example.jpeg",
    "created_at": 1667843879,
    "duration": 42,
    "id": "7165262254722534698",
    "likes": 890000,
    "plays": 12450000,
    "shares": 31000,
    "url": "https://www.tiktok.com/@daviddobrik/video/7165262254722534698"
  },
  "meta": {
    "credits_charged": 1,
    "latency_ms": 420,
    "platform": "tiktok",
    "resource": "video",
    "path": "/api/v1/tiktok/video"
  }
}
```

## Links

- HTML docs: https://trysocify.com/docs/api/tiktok/video
- SEO page: https://trysocify.com/tiktok/video
- OpenAPI: https://trysocify.com/openapi.json
- Catalog: https://trysocify.com/catalog.json
