In short
Your own software can pick a TikTok sound the way Instant Post’s Use this sound does: GET /music lists the sounds, GET /music/{id}/videos shows the TikTok videos trending with one, and "sound": { "tiktok": "<id>" } on POST /posts puts it on the post. Every call is in the Publishing API reference.
Before you start
- A publishing key — on Pro, made in
Security › Developer; a reseller makes one inReseller › Settings— API keys. A read-only publishing key may call both lists. - For the videos of a sound: a TikTok account connected in the workspace, with TikTok for Business — Connect TikTok.
1. Find a sound
GET /api/ext/v1/music?platform=tiktok answers a list of sounds, each with its id, title, artist, duration_s, genre, trending, commercial_ok, preview_url (a short audio of the track, to listen to it before you choose; TikTok only) and cover_url. Narrow it with:
| Parameter | What it does |
|---|---|
trending=true | Only the sounds trending in the country today. |
country=US | The country, as a two-letter code. |
genre=POP | One of TikTok’s genres. |
q=summer | Searches the titles and artists — at least 2 letters. |
limit=50 | From 1 to 100 sounds; 50 when you leave it out. |
Every TikTok sound here comes from TikTok’s Commercial Music Library, so commercial_ok is true: a business account may post with it.
2. See the videos trending with it
GET /api/ext/v1/music/{id}/videos?country=US answers the sound and up to 20 TikTok videos trending with it, each with its url, an embed_url that plays it in TikTok’s own player, and the author, cover_url and title when TikTok gives them. Nothing is downloaded.
- Without
country, the workspace’s country is used. When a country has none, the United States answers, andrequested_countrynames the one you asked for. account_id(optional) names one of your TikTok accounts to ask TikTok with.- A list is kept for 6 hours, so asking again soon gives the same videos.
3. Post with it
Send the sound’s id in sound on POST /posts — for example "sound": { "tiktok": "6850124243225544705" }. The TikTok post then follows the route your key allows — TikTok routes.
When it says no
| Answer | What to do |
|---|---|
409 tiktok_not_connected | Connect a TikTok account in the workspace — Channels › TikTok, with TikTok for Business — then ask again. |
409 tiktok_reconnect | The workspace’s TikTok account has to be connected again, in Channels. |
404 not_found | The sound is not in the list any more. Pick another one from GET /music. |
503 service_unavailable | TikTok is not answering for this right now. Try again later. |
400 validation_failed | A value is not right; problems names each one. |
Without the API
In Instant Post, on the web and in the app, the same sounds and videos are a tap away: press a TikTok sound’s name, or ▶ videos under it, then Use this sound — how.
Ready?
Opens MirageCHAT in this tab. Sign in first if you’re not already.
Did this guide help?
Related guides
Still stuck? Write to info@miragechat.io with your workspace name. Never send passwords or codes.