Extract the audio from a TikTok post. Hand the endpoint a post URL and it answers with a direct, playable link to the track behind that video, with no page scraping and no HTML parsing on your side. The response is deliberately small, just the link itself, which makes this a cheap call to run in bulk when you are archiving the sounds behind a set of videos.
curl -X GET "https://api.primeapi.co/download-music?url=https%3A%2F%2Fwww.tiktok.com%2F%40taylorswift%2Fvideo%2F7312069407369366830" \
-H "X-PrimeAPI-Key: YOUR_API_KEY"
import requests
url = "https://api.primeapi.co/download-music?url=https%3A%2F%2Fwww.tiktok.com%2F%40taylorswift%2Fvideo%2F7312069407369366830"
headers = {"X-PrimeAPI-Key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers)
print(response.json())
print("Credits left:", response.headers.get("X-PrimeAPI-Balance"))
{
"play": "https://sf16-ies-music-va.tiktokcdn.com/obj/ies-music-ttp-dup-us/7312069539162852139.mp3"
}