TikTok Music API: Track Audio Trends & Sound Performance
Sound is central to TikTok. The Music API lets you track trending audio, analyze sound performance, and discover videos using specific tracks.
Music API Endpoints
| Endpoint | Description |
|---|---|
| Music Search | Search sounds by keyword, with usage counts |
| Music Details | Get info about a specific sound |
| Music Videos | Get videos using a sound |
Why Track TikTok Sounds?
- Content Strategy - Use trending sounds for better reach
- Music Marketing - Track song performance on TikTok
- Trend Prediction - Identify sounds before they peak
- UGC Discovery - Find videos using your brand's audio
- Competitor Analysis - See what sounds competitors use
Popular Music Endpoint
The popular-sounds ranking isn't available because TikTok took down the Creative Center data it came from, so search sounds by keyword and track each one's user_count over time instead:
const response = await fetch('https://api.sociavault.com/v1/scrape/tiktok/search/music?keyword=lofi', {
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const popularSounds = await response.json();
| Parameter | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Search text, such as a song title or artist name |
region | string | No | 2-letter country code (e.g., US, GB), defaults to US |
filter_by | string | No | 0 all, 1 title, 2 creators |
sort_type | string | No | 0 relevance, 1 most used, 2 most recent, 3 shortest, 4 longest |
offset | integer | No | Pagination offset (use cursor from the previous response) |
Note: This endpoint can take up to 30 seconds to respond.
Response
Note:
musiccan arrive as an array or as an object with numeric keys. UseObject.values()on it when it isn't an array.
{
"success": true,
"data": {
"music": [
{
"id_str": "7000000000000000001",
"title": "Example Sound",
"author": "Example Artist",
"duration": 30,
"user_count": 52000
}
]
},
"credits_used": 1
}
Music Details Endpoint
Get detailed information about a specific sound:
const response = await fetch('https://api.sociavault.com/v1/scrape/tiktok/music/details?clipId=7439295283975702544', {
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const musicDetails = await response.json();
| Parameter | Type | Required | Description |
|---|---|---|---|
clipId | string | Yes | The clip ID (not song ID) — found in TikTok music URLs |
Response
{
"success": true,
"data": {
"music_info": {
"id_str": "7439295283975702544",
"title": "luther",
"author": "Kendrick Lamar & SZA",
"album": "GNX",
"duration": 59,
"user_count": 1250000,
"is_original": false,
"is_commerce_music": false,
"create_time": 1706000000,
"artists": {
"0": { "nick_name": "SZA", "is_verified": true, "sec_uid": "MS4wLjAB..." }
},
"cover_large": { "url_list": { "0": "https://..." } },
"play_url": { "url_list": { "0": "https://..." } },
"share_info": { "share_url": "https://www.tiktok.com/music/..." }
}
}
}
Music Videos Endpoint
Find videos using a specific sound:
const response = await fetch('https://api.sociavault.com/v1/scrape/tiktok/music/videos?clipId=7439295283975702544', {
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const videosWithSound = await response.json();
| Parameter | Type | Required | Description |
|---|---|---|---|
clipId | string | Yes | The clip ID — found in TikTok music URLs |
cursor | integer | No | Pagination cursor from previous response |
Response
Note:
aweme_listis an object with numeric keys. UseObject.values()to iterate.
{
"success": true,
"data": {
"aweme_list": {
"0": {
"aweme_id": "7234567890123456789",
"desc": "Using this trending sound",
"create_time": 1706100000,
"statistics": {
"play_count": 2500000,
"digg_count": 450000,
"comment_count": 12000,
"share_count": 8000,
"collect_count": 25000,
"download_count": 1500
},
"author": {
"unique_id": "popular_creator",
"nickname": "Popular Creator"
},
"video": {
"duration": 15000,
"cover": { "url_list": { "0": "https://..." } }
}
}
},
"cursor": 12,
"has_more": 1
}
}
Use Cases
Track Sound Virality
Monitor how fast a sound is spreading:
async function trackSoundGrowth(clipId) {
const res = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/music/details?clipId=${clipId}`, {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const result = await res.json();
const info = result.data.music_info;
console.log(`"${info.title}" by ${info.author}`);
console.log(`Used in ${info.user_count.toLocaleString()} videos`);
console.log(`Duration: ${info.duration}s | Commercial: ${info.is_commerce_music}`);
}
Find Brand UGC
Discover user-generated content using your brand's audio:
const res = await fetch('https://api.sociavault.com/v1/scrape/tiktok/music/videos?clipId=your-brand-clip-id', {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const result = await res.json();
const videos = Object.values(result.data.aweme_list);
console.log(`${videos.length} videos using your sound`);
// Find top performers
const topPerformers = videos
.sort((a, b) => b.statistics.play_count - a.statistics.play_count)
.slice(0, 10);
for (const v of topPerformers) {
console.log(`@${v.author.unique_id}: ${v.statistics.play_count.toLocaleString()} views`);
}
Identify Rising Sounds
Detect sounds gaining momentum by comparing each sound's user_count with your last snapshot:
async function findRisingSounds(keyword, lastRun = {}) {
const res = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/search/music?keyword=${encodeURIComponent(keyword)}`, {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const result = await res.json();
const music = result.data?.music;
const sounds = Array.isArray(music) ? music : Object.values(music || {});
// lastRun maps id_str to the user_count you saved on the previous run
const rising = sounds.filter(s => s.id_str in lastRun && s.user_count > lastRun[s.id_str]);
console.log(`${rising.length} sounds gained videos since the last run`);
return sounds;
}
Compare Sound Performance
Analyze which sounds drive better engagement:
async function compareSounds(clipIds) {
const headers = { 'x-api-key': 'YOUR_API_KEY' };
const results = await Promise.all(
clipIds.map(async clipId => {
const res = await fetch(`https://api.sociavault.com/v1/scrape/tiktok/music/videos?clipId=${clipId}`, { headers });
const result = await res.json();
const videos = Object.values(result.data.aweme_list);
const avgViews = videos.reduce((sum, v) => sum + v.statistics.play_count, 0) / videos.length;
const avgLikes = videos.reduce((sum, v) => sum + v.statistics.digg_count, 0) / videos.length;
return {
clipId,
avgViews: Math.round(avgViews),
avgLikes: Math.round(avgLikes),
engagementRate: (avgLikes / avgViews * 100).toFixed(2) + '%'
};
})
);
return results.sort((a, b) => b.avgViews - a.avgViews);
}
Related Endpoints
- TikTok Trending - Trending videos overall
- TikTok Search - Search by hashtag/keyword
- TikTok Videos Scraper - Get creator videos
- TikTok Transcript - Get video transcripts
Frequently Asked Questions
Can I download the audio file?
The API returns audio stream URLs via play_url.url_list. Downloading and using audio may be subject to copyright restrictions.
How is usage count calculated?
The user_count field from Music Details represents the total number of TikTok videos that have used this sound.
Can I find original sounds vs. commercial music?
Yes, the is_original and is_commerce_music fields indicate the sound type.
How far back can I get videos for a sound?
The Music Videos endpoint returns videos by TikTok's relevance ranking. Use the cursor parameter to paginate through more results.
Can I search for sounds by keyword?
Yes! Use the TikTok Search Music endpoint (/v1/scrape/tiktok/search/music). It also supports filtering by country (region) and sorting by relevance, usage, or recency (sort_type).
Get Started
Create your account and start tracking TikTok audio trends.
API docs: /docs/api-reference/tiktok/search-music
Found this helpful?
Share it with others who might benefit
Ready to Try SociaVault?
Start extracting social media data with our powerful API. No credit card required.