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.

Source
Description

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"

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)

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)

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)

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)

Description: Check the status of a download batch and retrieve download links. Use Case:

  • Monitor progress of youtube_download tasks.

  • 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