Get Trending Video
curl --request GET \
--url https://tiktok-api23.p.rapidapi.com/api/trending/video \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://tiktok-api23.p.rapidapi.com/api/trending/video"
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/video', 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/video",
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/video"
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/video")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tiktok-api23.p.rapidapi.com/api/trending/video")
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
},
"videos": [
{
"country_code": "US",
"cover": "https://p16-sign-va.tiktokcdn.com/tos-maliva-p-0068c799-us/o0ECfIeIFAM1Svaq1QCuj3AKhVIfLvIlGZQVXx~tplv-noop.image?dr=18692&refresh_token=e26c5adb&x-expires=1765888887&x-signature=W00Uqo9E7H1FQbKCnK5rEnqqUA0%3D&t=9276707c&ps=14f1eb3e&shp=9e36835a&shcp=83ba07fd&idc=my",
"duration": 159,
"id": "7572995879557139742",
"item_id": "7572995879557139742",
"item_url": "https://www.tiktok.com/@mnm_pipi/video/7572995879557139742",
"region": "United States",
"title": "maybe the best day of my life 🥹💚🎄🐱 #angeltree #walmart gifting a support cat for Christmas with Angel Gift Tree"
}
]
}
}{
"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 Video
Get Trending Video
GET
/
api
/
trending
/
video
Get Trending Video
curl --request GET \
--url https://tiktok-api23.p.rapidapi.com/api/trending/video \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://tiktok-api23.p.rapidapi.com/api/trending/video"
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/video', 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/video",
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/video"
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/video")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tiktok-api23.p.rapidapi.com/api/trending/video")
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
},
"videos": [
{
"country_code": "US",
"cover": "https://p16-sign-va.tiktokcdn.com/tos-maliva-p-0068c799-us/o0ECfIeIFAM1Svaq1QCuj3AKhVIfLvIlGZQVXx~tplv-noop.image?dr=18692&refresh_token=e26c5adb&x-expires=1765888887&x-signature=W00Uqo9E7H1FQbKCnK5rEnqqUA0%3D&t=9276707c&ps=14f1eb3e&shp=9e36835a&shcp=83ba07fd&idc=my",
"duration": 159,
"id": "7572995879557139742",
"item_id": "7572995879557139742",
"item_url": "https://www.tiktok.com/@mnm_pipi/video/7572995879557139742",
"region": "United States",
"title": "maybe the best day of my life 🥹💚🎄🐱 #angeltree #walmart gifting a support cat for Christmas with Angel Gift Tree"
}
]
}
}{
"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
Available options:
7, 30 Example:
30
Order by:
- vv: Hot
- like: Like
- comment: Comment
- repost: share
Available options:
vv, like, comment, repost Example:
"vv"
Response
Success
Show child attributes
Show child attributes
Was this page helpful?
⌘I

