curl --request GET \
--url https://api.scraperize.com/v1/tiktok/song \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/tiktok/song"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraperize.com/v1/tiktok/song', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraperize.com/v1/tiktok/song",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraperize.com/v1/tiktok/song"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraperize.com/v1/tiktok/song")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/tiktok/song")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "7370375686554782506",
"title": "That's Who I Praise",
"url": "https://www.tiktok.com/music/That's-Who-I-Praise-7370375686554782506",
"authorName": "Brandon Lake",
"album": "That's Who I Praise",
"duration": 64,
"preciseDuration": null,
"shootDuration": 60,
"original": false,
"isCopyrighted": true,
"isCommerceMusic": false,
"isUnlimitedMusic": false,
"isPrivate": false,
"coverUrl": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg",
"playUrl": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/ogifeGpqwKAjM2f1xG8IZDI09glmABLwaTFrAe",
"streaming": [
{
"service": "apple_music",
"serviceCode": 1,
"songId": "1757500327",
"url": "https://music.apple.com/song/1757500327"
},
{
"service": "spotify",
"serviceCode": 3,
"songId": "2A2gVffiPpwEbBENfWHpfa",
"url": "https://open.spotify.com/track/2A2gVffiPpwEbBENfWHpfa"
}
],
"covers": {
"thumb": "https://p16-sg.tiktokcdn.com/aweme/100x100/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg",
"medium": "https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg",
"large": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg"
},
"videoCount": 27600,
"artists": [
{
"id": "6780744002670396422",
"secUid": "MS4wLjABAAAAzWDzMQFatDdIcWj_JHHuDZTbsFMeWLpVEzycWCFf6kCf_KL_mff7sVQovdlrWtEr",
"handle": "brandonlakemusic",
"nickname": "Brandon Lake",
"bio": "“Changing” | OCT 16\nPre-Save / Pre-Add now",
"url": "https://www.tiktok.com/@brandonlakemusic",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=aba71a7b&x-expires=1791381600&x-signature=PCYU871jzYIa8YeZAs6nes2XkPc%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatars": {
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=3144ab02&x-expires=1791381600&x-signature=ZNOYXpT6FQjpaWJdiHi5%2FE6MQxg%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=04d5afb2&x-expires=1791381600&x-signature=CFQ%2Be6urufJkxbaTcqmYF%2FyYveg%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=aba71a7b&x-expires=1791381600&x-signature=PCYU871jzYIa8YeZAs6nes2XkPc%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"privateAccount": false
}
],
"author": null,
"share": {
"title": "Brandon Lake | ♬ That's Who I Praise | on TikTok",
"description": "27.6k videos - Watch awesome short videos created with ♬ That's Who I Praise"
},
"fetchedAt": "2026-10-05T14:46:05.099Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required — pass it in the `x-api-key` header.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This request costs 1 credit, but your balance is 0. Top up to continue.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested content was not found (it may not exist, be deleted, or be private).",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"details": [
{
"path": "url",
"message": "Required"
}
]
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded — max 100 requests per 60s. Retry in ~30s.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UPSTREAM_BLOCKED",
"message": "The source is temporarily unavailable. Please try again shortly.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}Song
Returns the details of a TikTok sound from its page link (musicUrl, e.g. https://www.tiktok.com/music/That's-Who-I-Praise-7370375686554782506): the title, artist name, album, duration and the longest clip a creator can record with it (shootDuration), whether it is an “original sound” uploaded by a creator or a released song, copyright / commercial-use / private flags, cover images (three sizes), the audio file (playUrl), its links on Apple Music and Spotify when TikTok matches it to a song, how many videos use it (videoCount, rounded by TikTok), the artist account(s) for a released song (artists) or the creator of an original sound (author) — with handle, name, bio and avatars — and TikTok’s share text. url is the sound’s canonical page.
The title part of the link doesn’t matter: the sound is found by the number at the end. Some sounds aren’t available in every country (copyright); then the response is a 404. The audio and cover URLs need no extra headers and expire after a while.
curl --request GET \
--url https://api.scraperize.com/v1/tiktok/song \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/tiktok/song"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraperize.com/v1/tiktok/song', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraperize.com/v1/tiktok/song",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraperize.com/v1/tiktok/song"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraperize.com/v1/tiktok/song")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/tiktok/song")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "7370375686554782506",
"title": "That's Who I Praise",
"url": "https://www.tiktok.com/music/That's-Who-I-Praise-7370375686554782506",
"authorName": "Brandon Lake",
"album": "That's Who I Praise",
"duration": 64,
"preciseDuration": null,
"shootDuration": 60,
"original": false,
"isCopyrighted": true,
"isCommerceMusic": false,
"isUnlimitedMusic": false,
"isPrivate": false,
"coverUrl": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg",
"playUrl": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/ogifeGpqwKAjM2f1xG8IZDI09glmABLwaTFrAe",
"streaming": [
{
"service": "apple_music",
"serviceCode": 1,
"songId": "1757500327",
"url": "https://music.apple.com/song/1757500327"
},
{
"service": "spotify",
"serviceCode": 3,
"songId": "2A2gVffiPpwEbBENfWHpfa",
"url": "https://open.spotify.com/track/2A2gVffiPpwEbBENfWHpfa"
}
],
"covers": {
"thumb": "https://p16-sg.tiktokcdn.com/aweme/100x100/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg",
"medium": "https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg",
"large": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg"
},
"videoCount": 27600,
"artists": [
{
"id": "6780744002670396422",
"secUid": "MS4wLjABAAAAzWDzMQFatDdIcWj_JHHuDZTbsFMeWLpVEzycWCFf6kCf_KL_mff7sVQovdlrWtEr",
"handle": "brandonlakemusic",
"nickname": "Brandon Lake",
"bio": "“Changing” | OCT 16\nPre-Save / Pre-Add now",
"url": "https://www.tiktok.com/@brandonlakemusic",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=aba71a7b&x-expires=1791381600&x-signature=PCYU871jzYIa8YeZAs6nes2XkPc%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatars": {
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=3144ab02&x-expires=1791381600&x-signature=ZNOYXpT6FQjpaWJdiHi5%2FE6MQxg%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=04d5afb2&x-expires=1791381600&x-signature=CFQ%2Be6urufJkxbaTcqmYF%2FyYveg%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=aba71a7b&x-expires=1791381600&x-signature=PCYU871jzYIa8YeZAs6nes2XkPc%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"privateAccount": false
}
],
"author": null,
"share": {
"title": "Brandon Lake | ♬ That's Who I Praise | on TikTok",
"description": "27.6k videos - Watch awesome short videos created with ♬ That's Who I Praise"
},
"fetchedAt": "2026-10-05T14:46:05.099Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required — pass it in the `x-api-key` header.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This request costs 1 credit, but your balance is 0. Top up to continue.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested content was not found (it may not exist, be deleted, or be private).",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"details": [
{
"path": "url",
"message": "Required"
}
]
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded — max 100 requests per 60s. Retry in ~30s.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UPSTREAM_BLOCKED",
"message": "The source is temporarily unavailable. Please try again shortly.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}cache_max_age) are free.Copy for AI assistant
Copy for AI assistant
I want to make an API call to /v1/tiktok/song. Here are the details:
Endpoint: GET https://api.scraperize.com/v1/tiktok/song
Description: Returns the details of a TikTok sound from its page link (`musicUrl`, e.g. `https://www.tiktok.com/music/That's-Who-I-Praise-7370375686554782506`): the title, artist name, album, duration and the longest clip a creator can record with it (`shootDuration`), whether it is an "original sound" uploaded by a creator or a released song, copyright / commercial-use / private flags, cover images (three sizes), the audio file (`playUrl`), its links on Apple Music and Spotify when TikTok matches it to a song, how many videos use it (`videoCount`, rounded by TikTok), the artist account(s) for a released song (`artists`) or the creator of an original sound (`author`) — with handle, name, bio and avatars — and TikTok's share text. `url` is the sound's canonical page.
Required Headers:
- x-api-key: Your API key
Parameters:
- musicUrl (string) [required]: The sound's TikTok page link: `https://www.tiktok.com/music/<title>-<musicId>` (as in a post's `music.url`).
- cache_max_age (select): Optional. Return a cached result if one this age or newer exists — served for **0 credits** with `meta.cached=true` and `meta.cachedAt`. Otherwise a fresh scrape runs (**1 credit**) and refreshes the cache. Omit to always scrape fresh.
Example Response:
{
"data": {
"id": "7370375686554782506",
"title": "That's Who I Praise",
"url": "https://www.tiktok.com/music/That's-Who-I-Praise-7370375686554782506",
"authorName": "Brandon Lake",
"album": "That's Who I Praise",
"duration": 64,
"preciseDuration": null,
"shootDuration": 60,
"original": false,
"isCopyrighted": true,
"isCommerceMusic": false,
"isUnlimitedMusic": false,
"isPrivate": false,
"coverUrl": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg",
"playUrl": "https://sf16-ies-music-sg.tiktokcdn.com/obj/tos-alisg-ve-2774/ogifeGpqwKAjM2f1xG8IZDI09glmABLwaTFrAe",
"streaming": [
{
"service": "apple_music",
"serviceCode": 1,
"songId": "1757500327",
"url": "https://music.apple.com/song/1757500327"
}
],
"covers": {
"thumb": "https://p16-sg.tiktokcdn.com/aweme/100x100/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg",
"medium": "https://p16-sg.tiktokcdn.com/aweme/200x200/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg",
"large": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/ocFryYgIESDClQQFafBpEmTdkAJBZtAAIHqFfR.jpeg"
},
"videoCount": 27600,
"artists": [
{
"id": "6780744002670396422",
"secUid": "MS4wLjABAAAAzWDzMQFatDdIcWj_JHHuDZTbsFMeWLpVEzycWCFf6kCf_KL_mff7sVQovdlrWtEr",
"handle": "brandonlakemusic",
"nickname": "Brandon Lake",
"bio": "“Changing” | OCT 16\nPre-Save / Pre-Add now",
"url": "https://www.tiktok.com/@brandonlakemusic",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=aba71a7…",
"avatars": {
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=3144ab02&…",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=04d5afb2&…",
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/1d1a7ad3bdc48667aa16c1bed12764bf~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=aba71a7…"
},
"privateAccount": false
}
],
"author": null,
"share": {
"title": "Brandon Lake | ♬ That's Who I Praise | on TikTok",
"description": "27.6k videos - Watch awesome short videos created with ♬ That's Who I Praise"
},
"fetchedAt": "2026-10-05T14:46:05.099Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}
Please help me write code in my preferred programming language to make this API call and handle the response appropriately. Include error handling and best practices.
Authorizations
Your API key. Send it in the x-api-key header (or Authorization: Bearer <key>). Create and manage keys from your dashboard.
Query Parameters
The sound's TikTok page link: https://www.tiktok.com/music/<title>-<musicId> (as in a post's music.url).
Optional. Return a cached result if one this age or newer exists — served for 0 credits with meta.cached=true and meta.cachedAt. Otherwise a fresh scrape runs (1 credit) and refreshes the cache. Omit to always scrape fresh.
1d, 3d, 7d, 14d, 30d