TikTok API
Music Info
Get details about a TikTok sound/music track.
POST
$0.01/call/v1/tiktok/musicUsage
const res = await fetch('https://api.yepapi.com/v1/tiktok/music', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ url: 'https://www.tiktok.com/music/original-sound-7123456789012345678' }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/tiktok/music \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.tiktok.com/music/original-sound-7123456789012345678"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
url | string | Yes | Full TikTok music/sound URL | — |
Response
{
"ok": true,
"data": {
"music_id": "7123456789012345678",
"title": "original sound",
"author": "chefmaria",
"album": "",
"duration": 45,
"is_original": true,
"cover": "https://p16-sign.tiktokcdn.com/...",
"play_url": "https://sf16-ies-music.tiktokcdn.com/...",
"video_count": 12500
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.music_id | string | Unique music/sound identifier |
data.title | string | Sound title |
data.author | string | Sound author or artist name |
data.album | string | Album name (if applicable) |
data.duration | number | Sound duration in seconds |
data.is_original | boolean | Whether this is an original sound (not a licensed track) |
data.cover | string | Sound cover image URL |
data.play_url | string | Audio playback URL |
data.video_count | number | Number of videos using this sound |