Get video detail
curl --request GET \
--url https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail"
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://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail', 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://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail",
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://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail"
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://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail")
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{
"message": "Success",
"statusCode": 200,
"pagination": {
"total": 100,
"hasMore": true,
"continuation": "CDsQ8FsiEwje95_F1pmRAxXlsykDHUX"
},
"data": {
"videoId": "kJQP7kiw5Fk",
"title": "Luis Fonsi - Despacito ft. Daddy Yankee",
"author": {
"id": "UCxoq-PAQeAdk_zyg8YS0JqA",
"name": "Luis Fonsi",
"thumbnails": [
{
"url": "https://yt3.ggpht.com/...",
"width": 68,
"height": 68
}
],
"subscriberCount": 1000000,
"verified": true
},
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/kJQP7kiw5Fk/hq720.jpg",
"width": 360,
"height": 202
}
],
"description": "Official video for \"Despacito\" by Luis Fonsi featuring Daddy Yankee",
"viewCount": 8871198622,
"likeCount": 50000000,
"dislikes": 1000000,
"rating": 5,
"published": "2017-01-13",
"lengthSeconds": 282,
"duration": "4:42",
"isLive": false,
"keywords": [
"music",
"despacito",
"luis fonsi"
],
"downloadLinks": [
{
"itag": 18,
"quality": "360p",
"mime": "video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"",
"hasAudio": true,
"url": "https://rr8---sn-42u-i5olk.googlevideo.com/videoplayback?..."
}
]
}
}{
"message": "Bad request"
}{
"message": "Invalid API key"
}{
"message": "You are not subscribed to this API, please subscribe before using"
}{
"success": false,
"message": "Internal Server Error",
"status_code": 500,
"cost": 0,
"explain": "Internal Server Error"
}Video
Get video detail
Get detailed information about a YouTube video
GET
/
api
/
v1
/
video
/
detail
Get video detail
curl --request GET \
--url https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail"
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://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail', 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://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail",
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://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail"
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://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/video/detail")
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{
"message": "Success",
"statusCode": 200,
"pagination": {
"total": 100,
"hasMore": true,
"continuation": "CDsQ8FsiEwje95_F1pmRAxXlsykDHUX"
},
"data": {
"videoId": "kJQP7kiw5Fk",
"title": "Luis Fonsi - Despacito ft. Daddy Yankee",
"author": {
"id": "UCxoq-PAQeAdk_zyg8YS0JqA",
"name": "Luis Fonsi",
"thumbnails": [
{
"url": "https://yt3.ggpht.com/...",
"width": 68,
"height": 68
}
],
"subscriberCount": 1000000,
"verified": true
},
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/kJQP7kiw5Fk/hq720.jpg",
"width": 360,
"height": 202
}
],
"description": "Official video for \"Despacito\" by Luis Fonsi featuring Daddy Yankee",
"viewCount": 8871198622,
"likeCount": 50000000,
"dislikes": 1000000,
"rating": 5,
"published": "2017-01-13",
"lengthSeconds": 282,
"duration": "4:42",
"isLive": false,
"keywords": [
"music",
"despacito",
"luis fonsi"
],
"downloadLinks": [
{
"itag": 18,
"quality": "360p",
"mime": "video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"",
"hasAudio": true,
"url": "https://rr8---sn-42u-i5olk.googlevideo.com/videoplayback?..."
}
]
}
}{
"message": "Bad request"
}{
"message": "Invalid API key"
}{
"message": "You are not subscribed to this API, please subscribe before using"
}{
"success": false,
"message": "Internal Server Error",
"status_code": 500,
"cost": 0,
"explain": "Internal Server Error"
}Authorizations
API Key
Query Parameters
YouTube video ID
Example:
"kJQP7kiw5Fk"
Language code
Available options:
ar, az, bg, bn, cs, da, de, el, en, en-GB, en-IE, en-NZ, en-SG, es, es-419, fi, fil, fr, he, hi, hr, hu, id, it, ja, ko, lt, lv, ms, nl, no, pl, pt-BR, pt-PT, ro, ru, sv, th, tr, uk, ur, vi, zh-Hant Example:
"en"
Geographical code
Available options:
US, AE, AR, AT, AU, AZ, BD, BE, BG, BR, CA, CH, CL, CO, CZ, DE, DK, DO, DZ, EC, EG, ES, FI, FR, GB, GH, GR, GT, HK, HN, HR, HU, ID, IE, IL, IN, IQ, IT, JP, KE, KR, LB, LT, LV, MA, MX, MY, NG, NL, NO, NZ, PE, PH, PK, PL, PT, RO, RU, SA, SE, SG, TH, TR, TW, UA, VE, VN, ZA Example:
"US"
Was this page helpful?
⌘I

