Endpoint
POST https://api.ugc.inc/media/social-audio/upload
Overview
Import audio from TikTok by providing either a video URL or a music URL. The API will extract the audio file and cover image, upload them to storage, and create a social audio record.
Supported URL formats:
Video URL: https://www.tiktok.com/@username/video/1234567890
Music URL: https://www.tiktok.com/music/Song-Name-1234567890
Request Body
TikTok video or music URL to import audio from
Optional tag for categorization
Response
The created social audio object Show SocialAudio properties
Audio/song title extracted from TikTok
Custom tag for categorization
Link to a TikTok post using this audio
Direct link to the TikTok audio/music page
URL to uploaded cover image
URL to uploaded audio file
ISO timestamp of creation
cURL
Python
JavaScript
React
curl -X POST https://api.ugc.inc/media/social-audio/upload \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.tiktok.com/@username/video/1234567890",
"tag": "trending"
}'
Success Response
Error Response - Invalid URL
Error Response - No Posts Found
{
"ok" : true ,
"code" : 200 ,
"data" : {
"id" : "audio_abc123" ,
"org_id" : "org_xyz789" ,
"name" : "Trending Sound - Artist Name" ,
"tag" : "trending" ,
"social_post_link" : "https://www.tiktok.com/@username/video/1234567890" ,
"social_audio_link" : "https://www.tiktok.com/music/Trending-Sound-1234567890" ,
"platform_type" : "tiktok" ,
"preview_url" : "https://api.ugc.inc/media/file/audio_abc123/preview" ,
"audio_url" : "https://api.ugc.inc/media/file/audio_abc123/audio" ,
"created_at" : "2024-01-15T10:30:00.000Z"
}
}