Trending Songs
curl --request GET \
--url https://scrapebadger.com/v1/tiktok/trending/songs \
--header 'x-api-key: <api-key>'import requests
url = "https://scrapebadger.com/v1/tiktok/trending/songs"
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://scrapebadger.com/v1/tiktok/trending/songs', 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://scrapebadger.com/v1/tiktok/trending/songs",
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://scrapebadger.com/v1/tiktok/trending/songs"
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://scrapebadger.com/v1/tiktok/trending/songs")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/tiktok/trending/songs")
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{
"songs": [
{
"title": "Espresso",
"id": "7011111111111111111",
"author": "Sabrina Carpenter",
"rank": 1,
"rank_diff": 2,
"country_code": "US",
"duration": 175,
"user_count": 1800000,
"cover": "https://p16-sign.tiktokcdn-us.com/song.jpeg",
"play_url": "https://sf16-sg.tiktokcdn.com/song.mp3",
"is_new": false,
"link": "https://www.tiktok.com/music/Espresso-7011111111111111111"
}
],
"region": "US"
}Trending
Trending Songs
Trending songs/sounds ranked by usage (served via the on-device signer path).
GET
/
v1
/
tiktok
/
trending
/
songs
Trending Songs
curl --request GET \
--url https://scrapebadger.com/v1/tiktok/trending/songs \
--header 'x-api-key: <api-key>'import requests
url = "https://scrapebadger.com/v1/tiktok/trending/songs"
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://scrapebadger.com/v1/tiktok/trending/songs', 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://scrapebadger.com/v1/tiktok/trending/songs",
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://scrapebadger.com/v1/tiktok/trending/songs"
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://scrapebadger.com/v1/tiktok/trending/songs")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/tiktok/trending/songs")
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{
"songs": [
{
"title": "Espresso",
"id": "7011111111111111111",
"author": "Sabrina Carpenter",
"rank": 1,
"rank_diff": 2,
"country_code": "US",
"duration": 175,
"user_count": 1800000,
"cover": "https://p16-sign.tiktokcdn-us.com/song.jpeg",
"play_url": "https://sf16-sg.tiktokcdn.com/song.mp3",
"is_new": false,
"link": "https://www.tiktok.com/music/Espresso-7011111111111111111"
}
],
"region": "US"
}Trending songs are served via an on-device signer path and ranked by real usage (the mobile hot-music feed).
Each request costs 5 credits. Failed requests are not charged.
Authorizations
Query Parameters
Content region (ISO 3166-1 alpha-2). Routes the request through a proxy and signer for that locale.
Look-back window in days for the trend ranking (e.g. 7, 30, 120).
Maximum number of items to return (1-50).
Required range:
1 <= x <= 50⌘I

