Publishing
TikTok music
Trending TikTok tracks for photo posts — for musicSoundId.
https://api.sangtao.ai/v2/publishing/tiktok/musicAuthorization
None — this endpoint is public, call it without an API key.
Trending tracks from TikTok's commercial music library, for TikTok photo posts (carousels). No key, no credits. Send a track's songClipId as platforms[].musicSoundId in Publish a post. Leave it out and TikTok picks the music itself; video posts and other networks ignore it.
Query parameters
genrestringMusic genre. Default POP; the valid values come back in genres
dateRangestringTrending over the last day, 7 days or 30 days. Default 7DAY
Available options:
1DAY7DAY30DAY
Response
genrestringrequiredThe genre of this list
dateRangestringrequiredThe date range of this list
Available options:
1DAY7DAY30DAYtracksobject[]requiredThe tracks
Show child attributesHide child attributes
songClipIdstringrequiredSend it as platforms[].musicSoundId in Publish a post
titlestring | nullTrack title
artiststring | nullArtist
thumbnailUrlstring | nullCover image
previewUrlstring | nullLink to a preview to listen to
durationSecnumber | nullLength, in seconds
genresstring[]requiredIts genres
rankstring | nullIts trending rank
genresstring[]requiredValid values of the genre query, to build a filter
dateRangesstring[]requiredValid values of the dateRange query, to build a filter
Errors
| Status | errorCode | When |
|---|---|---|
| 400 | INVALID_GENRE | genre is not one of the values in genres |
| 400 | INVALID_DATE_RANGE | dateRange is not 1DAY, 7DAY or 30DAY |
| 404 | NO_PUBLISHING_TEAM | The system has no publishing group yet (hardly ever happens) |
/publishing/tiktok/musiccurl "https://api.sangtao.ai/v2/publishing/tiktok/music?genre=POP&dateRange=7DAY"{
"success": true,
"data": {
"genre": "POP",
"dateRange": "7DAY",
"tracks": [
{
"songClipId": "7301234567890123456",
"title": "Song title",
"artist": "Artist",
"thumbnailUrl": "https://…",
"previewUrl": "https://…",
"durationSec": 60,
"genres": [
"POP"
],
"rank": "1"
}
],
"genres": [
"ROCK",
"POP",
"LATIN",
"…"
],
"dateRanges": [
"1DAY",
"7DAY",
"30DAY"
]
}
}/publishing/tiktok/musiccurl "https://api.sangtao.ai/v2/publishing/tiktok/music?genre=POP&dateRange=7DAY"{
"success": true,
"data": {
"genre": "POP",
"dateRange": "7DAY",
"tracks": [
{
"songClipId": "7301234567890123456",
"title": "Song title",
"artist": "Artist",
"thumbnailUrl": "https://…",
"previewUrl": "https://…",
"durationSec": 60,
"genres": [
"POP"
],
"rank": "1"
}
],
"genres": [
"ROCK",
"POP",
"LATIN",
"…"
],
"dateRanges": [
"1DAY",
"7DAY",
"30DAY"
]
}
}