Youtube
With Web Scraper API, you can extract and parse various types of YouTube data. Below is an overview of all supported YouTube source values.
youtube_search
Up to 20 search results for a search term of your choice.
youtube_search_max
Up to 700 search results for a search term of your choice.
youtube_videos
Information about whether a YouTube video
youtube_download
Download YouTube video by video id or videos id list
youtube_download_info
get YouTube video download status and info by batch id
Request sample
curl -X GET "https://serpapi.abcproxy.com/search" \
-d "engine=youtube" \
-d "q=coffee" \
-d "no_cache=false" \
-d "api_key=YOUR_API_KEY"import requests
params = {
"engine": "youtube",
"q": "coffee",
"no_cache": "false",
"api_key": "YOUR_API_KEY"
}
response = requests.get("https://serpapi.abcproxy.com/search", params=params)
print(response.json())const axios = require('axios');
const params = {
engine: "youtube",
q: "coffee",
no_cache: "false",
api_key: "YOUR_API_KEY"
};
axios.get("https://serpapi.abcproxy.com/search", { params })
.then(response => console.log(response.data));GET /search?engine=youtube&q=coffee&no_cache=false&api_key=YOUR_API_KEY HTTP/1.1
Host: serpapi.abcproxy.comyoutube_search<?php
$client = new \GuzzleHttp\Client();
$response = $client->get('https://serpapi.abcproxy.com/search', [
'query' => [
'engine' => 'youtube',
'q' => 'coffee',
'no_cache' => 'false',
'api_key' => 'YOUR_API_KEY'
]
]);
echo $response->getBody();package main
import (
"net/http"
"io/ioutil"
"log"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://serpapi.abcproxy.com/search", nil)
q := req.URL.Query()
q.Add("engine", "youtube")
q.Add("q", "coffee")
q.Add("no_cache", "false")
q.Add("api_key", "YOUR_API_KEY")
req.URL.RawQuery = q.Encode()
resp, _ := client.Do(req)
body, _ := ioutil.ReadAll(resp.Body)
log.Println(string(body))
}using System;
using System.Net.Http;
class Program
{
static async Task Main()
{
var client = new HttpClient();
var query = System.Web.HttpUtility.ParseQueryString(string.Empty);
query["engine"] = "youtube";
query["q"] = "coffee";
query["no_cache"] = "false";
query["api_key"] = "YOUR_API_KEY";
var response = await client.GetAsync(
$"https://serpapi.abcproxy.com/search?{query}"
);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}import java.net.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://serpapi.abcproxy.com/search" +
"?engine=youtube" +
"&q=coffee" +
"&no_cache=false" +
"&api_key=YOUR_API_KEY";
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(
new InputStreamReader(conn.getInputStream())
);
String response = in.lines().collect(Collectors.joining());
System.out.println(response);
}
}1. YouTube Search (youtube_search)
youtube_search)Description: Retrieve up to 20 search results for a specified query. Use Case:
Fetch a limited set of YouTube videos matching a search term.
Useful for quick searches without needing extensive results.
Response:
Video titles, URLs, channel info, view counts, and other metadata.
Learn more about youtube_search
2. Extended YouTube Search (youtube_search_max)
youtube_search_max)Description: Retrieve up to 700 search results for a specified query. Use Case:
Large-scale data extraction for research or analytics.
Gather extensive video lists for competitive analysis.
Response:
Same as
youtube_search, but with significantly more results.
Learn more about youtube_search_max
3. Video Information (youtube_videos)
youtube_videos)Description: Fetch detailed information about specific YouTube videos. Use Case:
Extract video metadata (title, description, likes, comments, etc.).
Retrieve channel details (subscribers, upload frequency, etc.).
Response:
Full video details, engagement metrics, and channel data.
Learn more about youtube_videos
4. Video Download (youtube_download)
youtube_download)Description: Download YouTube videos by providing a video ID or a list of IDs. Key Features:
Supports batch downloads (multiple videos at once).
Optional cloud storage integration (upload downloaded videos to AWS S3, Google Cloud, etc.).
Example Request:
{
"code": 200,
"msg": "Success",
"data": {
"batch_id": "25ba9534-bb83-4496-ac5b-6bc94f83e963"
}
}Response:
A batch ID to track download progress.
5. Download Status & Info (youtube_download_info)
youtube_download_info)Description: Check the status of a download batch and retrieve download links. Use Case:
Monitor progress of
youtube_downloadtasks.Get direct download URLs after completion.
Example Request:
{
"code": 200,
"msg": "Success",
"data": {
"batch_id": "d0a3d4a1-403d-41f3-a232-c2f7dc79bb1a",
"status": "completed",
"total_job_count": 2,
"completed_job_count": 2,
"failed_job_count": 0,
"job_list": [
{
"job_id": "6ba037bd-9b4f-413b-8795-87d500198da0",
"status": "completed",
"error": "",
"video_info": {
"url": "https://www.youtube.com/watch?v=1BxhbKNbjqE",
"video_id": "1BxhbKNbjqE",
"download_url": "C:\\code\\project\\youtube\\yt-downloader\\app\\worker\\batch_download_task\\consumer\\yt-downloader\\download\\cb4bf5ad-16ed-46b7-9158-0dae601ff555\\1BxhbKNbjqE_afe557bc446c7ec5a0085a5229d6022f.mp4",
"title": "oceans",
"duration": 47,
"resolution": "640x266"
}
},
{
"job_id": "ebe5f3da-4126-4196-a595-7003c7e69ef0",
"status": "completed",
"error": "",
"video_info": {
"url": "https://www.youtube.com/watch?v=dXzrhQfzvhA",
"video_id": "dXzrhQfzvhA",
"download_url": "C:\\code\\project\\youtube\\yt-downloader\\app\\worker\\batch_download_task\\consumer\\yt-downloader\\download\\4abaf508-0d0e-4c55-b4d6-78aa1b5e91fa\\dXzrhQfzvhA_d26591dcd09b38c0079ffe960d6def12.mp4",
"title": " #special #shorts",
"duration": 7,
"resolution": "640x360"
}
}
]
}
}Response:
Status (pending, completed, failed).
Download URLs (if successful).
Cloud storage paths (if configured).
Last updated