Get Trending Song
curl --request GET \
--url https://tiktok-api23.p.rapidapi.com/api/trending/song \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://tiktok-api23.p.rapidapi.com/api/trending/song"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://tiktok-api23.p.rapidapi.com/api/trending/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://tiktok-api23.p.rapidapi.com/api/trending/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-rapidapi-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://tiktok-api23.p.rapidapi.com/api/trending/song"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-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://tiktok-api23.p.rapidapi.com/api/trending/song")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tiktok-api23.p.rapidapi.com/api/trending/song")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"pagination": {
"has_more": true,
"page": 1,
"size": 20,
"total_count": 500
},
"sound_list": [
{
"author": "Mj_splatt",
"clip_id": "7570482709841037328",
"country_code": "US",
"cover": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/oMvpDABpEBBiAA3mftCgEMAioePpWHQX9t7ZQy.jpeg",
"duration": 60,
"if_cml": false,
"is_search": false,
"link": "https://www.tiktok.com/music/x-7570482709841037328",
"on_list_times": null,
"promoted": false,
"rank": 1,
"rank_diff": 0,
"rank_diff_type": 2,
"related_items": [
{
"item_id": 7579116406923480000,
"cover_uri": "https://p16-sign-va.tiktokcdn.com/tos-maliva-p-0068c799-us/oAIf8NjIQHAeLQBcGSQApgPfkCLp03XGNbs1iI~tplv-noop.image?dr=18692&refresh_token=3cf2bd9f&x-expires=1765830304&x-signature=WTXEqnMXadVwzw4t4iCCAIYGWvU%3D&t=9276707c&ps=14f1eb3e&shp=9e36835a&shcp=317596d8&idc=my"
}
],
"song_id": "7570493055201658881",
"title": "Justfallinlovewme",
"trend": [
{
"time": 1765152000,
"value": 0.86
}
],
"url_title": "Justfallinlovewme"
}
]
}
}{
"message": "Bad request"
}{
"message": "Invalid API key. Go to https://docs.rapidapi.com/docs/keys for more info."
}{
"message": "You are not subscribed to this API."
}{
"message": "Request failed with status 500: Internal Server Error",
"status_code": 500
}Trending
Get Trending Song
Get Trending Song
GET
/
api
/
trending
/
song
Get Trending Song
curl --request GET \
--url https://tiktok-api23.p.rapidapi.com/api/trending/song \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://tiktok-api23.p.rapidapi.com/api/trending/song"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://tiktok-api23.p.rapidapi.com/api/trending/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://tiktok-api23.p.rapidapi.com/api/trending/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-rapidapi-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://tiktok-api23.p.rapidapi.com/api/trending/song"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-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://tiktok-api23.p.rapidapi.com/api/trending/song")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tiktok-api23.p.rapidapi.com/api/trending/song")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"pagination": {
"has_more": true,
"page": 1,
"size": 20,
"total_count": 500
},
"sound_list": [
{
"author": "Mj_splatt",
"clip_id": "7570482709841037328",
"country_code": "US",
"cover": "https://p16-sg.tiktokcdn.com/aweme/720x720/tos-alisg-v-2774/oMvpDABpEBBiAA3mftCgEMAioePpWHQX9t7ZQy.jpeg",
"duration": 60,
"if_cml": false,
"is_search": false,
"link": "https://www.tiktok.com/music/x-7570482709841037328",
"on_list_times": null,
"promoted": false,
"rank": 1,
"rank_diff": 0,
"rank_diff_type": 2,
"related_items": [
{
"item_id": 7579116406923480000,
"cover_uri": "https://p16-sign-va.tiktokcdn.com/tos-maliva-p-0068c799-us/oAIf8NjIQHAeLQBcGSQApgPfkCLp03XGNbs1iI~tplv-noop.image?dr=18692&refresh_token=3cf2bd9f&x-expires=1765830304&x-signature=WTXEqnMXadVwzw4t4iCCAIYGWvU%3D&t=9276707c&ps=14f1eb3e&shp=9e36835a&shcp=317596d8&idc=my"
}
],
"song_id": "7570493055201658881",
"title": "Justfallinlovewme",
"trend": [
{
"time": 1765152000,
"value": 0.86
}
],
"url_title": "Justfallinlovewme"
}
]
}
}{
"message": "Bad request"
}{
"message": "Invalid API key. Go to https://docs.rapidapi.com/docs/keys for more info."
}{
"message": "You are not subscribed to this API."
}{
"message": "Request failed with status 500: Internal Server Error",
"status_code": 500
}Authorizations
Rapid API Key. How can I get Rapid API Key?
Query Parameters
Page
Example:
1
Number of items per page (maximum is 20)
Required range:
x <= 20Example:
20
Period in days:
- 7: Last 7 days
- 30: Last 30 days
- 120: Last 120 days
Available options:
7, 30, 120 Example:
7
Rank type:
- popular: Popular
- surging: Breakout
Available options:
popular, surging Example:
"popular"
Is new on board
Available options:
true, false Example:
"false"
Is commercial music
Available options:
true, false Example:
"false"
Response
Success
Show child attributes
Show child attributes
Was this page helpful?
⌘I

