Search
curl --request GET \
--url https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/search \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/search"
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/search', 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/search",
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/search"
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/search")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/search")
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": {
"contents": [
{
"author": {
"avatar": {
"url": "https://yt3.ggpht.com/Lw8D7ol21pLxWEDvnIwcV0DsXIA1d_6DK4_wlkTtaP7SEGBg-2FLRDvs57NPnE1DcNarWPkQpvs=s88-c-k-c0x00ffffff-no-rj",
"width": 68,
"height": 68
},
"name": "Luis Fonsi",
"badges": [
{
"type": "AUDIO_BADGE",
"text": "Official Artist Channel"
}
]
},
"videoId": "kJQP7kiw5Fk",
"channelId": "UCxoq-PAQeAdk_zyg8YS0JqA",
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/kJQP7kiw5Fk/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLCj96Jh8NkTqgJqkcXFQKo7MnO30g",
"width": 360,
"height": 202
},
{
"url": "https://i.ytimg.com/vi/kJQP7kiw5Fk/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBH3EhyCr_aZDODXzXVDL-taforQw",
"width": 720,
"height": 404
}
],
"publishedTimeText": "8 years ago",
"title": "Luis Fonsi - Despacito ft. Daddy Yankee",
"views": 8871198622,
"duration": "4:42",
"url": "https://www.youtube.com/watch?v=kJQP7kiw5Fk"
}
],
"refinements": [
"video",
"music",
"image"
]
},
"message": "Success",
"statusCode": 200,
"pagination": {
"total": 100,
"hasMore": true,
"continuation": "CDsQ8FsiEwje95_F1pmRAxXlsykDHUX"
}
}{
"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"
}Explore
Search
Search the content of the platform, like search video, music etc.
GET
/
api
/
v1
/
search
Search
curl --request GET \
--url https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/search \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/search"
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/search', 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/search",
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/search"
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/search")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://youtube-scraper-api-v21.p.rapidapi.com/api/v1/search")
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": {
"contents": [
{
"author": {
"avatar": {
"url": "https://yt3.ggpht.com/Lw8D7ol21pLxWEDvnIwcV0DsXIA1d_6DK4_wlkTtaP7SEGBg-2FLRDvs57NPnE1DcNarWPkQpvs=s88-c-k-c0x00ffffff-no-rj",
"width": 68,
"height": 68
},
"name": "Luis Fonsi",
"badges": [
{
"type": "AUDIO_BADGE",
"text": "Official Artist Channel"
}
]
},
"videoId": "kJQP7kiw5Fk",
"channelId": "UCxoq-PAQeAdk_zyg8YS0JqA",
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/kJQP7kiw5Fk/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLCj96Jh8NkTqgJqkcXFQKo7MnO30g",
"width": 360,
"height": 202
},
{
"url": "https://i.ytimg.com/vi/kJQP7kiw5Fk/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBH3EhyCr_aZDODXzXVDL-taforQw",
"width": 720,
"height": 404
}
],
"publishedTimeText": "8 years ago",
"title": "Luis Fonsi - Despacito ft. Daddy Yankee",
"views": 8871198622,
"duration": "4:42",
"url": "https://www.youtube.com/watch?v=kJQP7kiw5Fk"
}
],
"refinements": [
"video",
"music",
"image"
]
},
"message": "Success",
"statusCode": 200,
"pagination": {
"total": 100,
"hasMore": true,
"continuation": "CDsQ8FsiEwje95_F1pmRAxXlsykDHUX"
}
}{
"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
Search keyword
Example:
"funny videos"
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"
Upload date
Available options:
1_HOUR_AGO, TODAY, THIS_WEEK, THIS_MONTH, THIS_YEAR Example:
"1_HOUR_AGO"
Type
Available options:
VIDEO, MOVIE Example:
"VIDEO"
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"
Continuation token for pagination
Example:
""
Was this page helpful?

