TikTok API
Video Details
Get full details for a TikTok video including metadata, statistics, and media URLs.
POST
$0.01/call/v1/tiktok/videoUsage
const res = await fetch('https://api.yepapi.com/v1/tiktok/video', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ url: 'https://www.tiktok.com/@username/video/7356291048572839174' }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/tiktok/video \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.tiktok.com/@username/video/7356291048572839174"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
url | string | Yes | Full TikTok video URL | — |
Response
{
"ok": true,
"data": {
"video_id": "7356291048572839174",
"description": "Easy 15-minute pasta recipe #cooking #recipes",
"create_time": 1712345678,
"author": {
"unique_id": "chefmaria",
"nickname": "Chef Maria",
"avatar": "https://p16-sign.tiktokcdn.com/...",
"is_verified": true
},
"statistics": {
"play_count": 2450000,
"digg_count": 185000,
"comment_count": 3200,
"share_count": 12500,
"collect_count": 89000
},
"video": {
"duration": 45,
"width": 1080,
"height": 1920,
"cover": "https://p16-sign.tiktokcdn.com/...",
"play_addr": "https://v16-webapp.tiktok.com/...",
"download_addr": "https://v16-webapp.tiktok.com/..."
},
"music": {
"id": "7123456789012345678",
"title": "original sound",
"author": "chefmaria",
"cover": "https://p16-sign.tiktokcdn.com/...",
"play_url": "https://sf16-ies-music.tiktokcdn.com/..."
}
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.video_id | string | Unique TikTok video identifier |
data.description | string | Video caption text |
data.create_time | number | Unix timestamp of when the video was posted |
data.author | object | Video author information |
data.author.unique_id | string | Author's unique handle |
data.author.nickname | string | Author's display name |
data.author.is_verified | boolean | Whether the author is verified |
data.statistics | object | Engagement metrics |
data.statistics.play_count | number | Total number of plays |
data.statistics.digg_count | number | Total number of likes |
data.statistics.comment_count | number | Total number of comments |
data.statistics.share_count | number | Total number of shares |
data.statistics.collect_count | number | Total number of saves/bookmarks |
data.video | object | Video media details |
data.video.duration | number | Video duration in seconds |
data.video.cover | string | Cover image URL |
data.video.play_addr | string | Video playback URL |
data.music | object | Music/sound used in the video |