Vercel LogoHome

YouTube Scraper API – Extract Videos, Comments & Channel Data

The ultimate YouTube API to search videos, extract massive comments, and get real-time channel analytics with ease.

🚀 Features

YouTube Video Search API (Async)

YouTube Video Search API (Async)

Search YouTube videos by keyword, language, region, duration, upload date, sort by relevance, and views with our robust API.

YouTube Comment Extractor

YouTube Comment Extractor

Extract up to 1,000,000 YouTube comments instantly or in bulk, ideal for sentiment analysis, big data, and automation.

YouTube Channel Analytics API

YouTube Channel Analytics API

Get detailed statistics, including subscribers, views, and content data about YouTube channels using just the username.

📦 API Endpoints

YouTube Video Search API (Async)

HTTP MethodEndpoint URLEndpoint Description
POST/api/search/videosSubmit YouTube video search (async)
GET/api/search/result/request_idRetrieve YouTube search results

YouTube Comment Extractor

HTTP MethodEndpoint URLEndpoint Description
GET/api/video/video_id/comments?count=NExtract instant comments (max 500)
POST/api/video/video_id/commentsBulk comments extraction (async, up to 1M)
GET/api/comments/result/request_idRetrieve extracted YouTube comments

YouTube Channel Analytics API

HTTP MethodEndpoint URLEndpoint Description
GET/api/channel/usernameChannel info & analytics by username

💡 API Usage Examples

Video Search — Full API Example

Create YouTube video search API request

curl --request POST   --url https://youtube-scraper9.p.rapidapi.com/api/search/videos   --header 'Content-Type: application/json'   --header 'x-rapidapi-host: youtube-scraper9.p.rapidapi.com'   --header 'x-rapidapi-key: 961f2df57cmshbb7e1b258be746fp102fe8jsn61454cb92cc2'   --data '{"query":"kubernetes tutorial 2025","number_of_results":30,"region":"US","lang":"en","upload":"this_year","duration":"4-20","sort":"views"}'
Sample API response
{
  "request_id": "e1f1cdb1-9a12-4a1c-9a2b-6a0d8b9b1b33",
  "status": "PENDING",
  "message": "Video search request submitted successfully. Use the request_id to check results.",
  "result_endpoint": "/api/search/result/e1f1cdb1-9a12-4a1c-9a2b-6a0d8b9b1b33"
}

Retrieve search result

curl --request GET   --url https://youtube-scraper9.p.rapidapi.com/api/search/result/eab00f11-3109-48df-bebc-b215075bafb9   --header 'x-rapidapi-host: youtube-scraper9.p.rapidapi.com'   --header 'x-rapidapi-key: 961f2df57cmshbb7e1b258be746fp102fe8jsn61454cb92cc2'
When request processing is in progress
{
  "status": "PENDING",
  "progress": "60.00%"
}
When result is ready
{
  "status": "SUCCESS",
  "result": [
    {
      "video_id": "TlHvYWVUZyc",
      "title": "Kubernetes Tutorial for Beginners [FULL COURSE in 4 Hours]",
      "author": "TechWorld with Nana",
      "username": "TechWorldwithNana",
      "number_of_views": 9300000,
      "video_length": "3:36:55",
      "description": "Grab your free DevOps Roadmap: https://bit.ly/3RUQ7UK Become a DevOps Engineer - full educational program: ... From the video description",
      "published_time": "4 years ago",
      "type": "NORMAL"
    },
    ...
  ],
  "end_page_reached": false
}

Comments Extraction (Sync)

curl -X GET "https://youtube-scraper9.p.rapidapi.com/api/video/VIDEO_ID/comments?count=100" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: YOUR_HOST" \
  -H "X-RapidAPI-Subscription: BASIC"
Sample API response
{
  "status": "SUCCESS",
  "result": [
    {
      "comment_id": "Ugzge340dBgB75hWBm54AaABAg",
      "video_id": "dQw4w9WgXcQ",
      "author": "@YouTube",
      "channel_id": "UCBR8-60-B28hp2BmDPdntcQ",
      "text": "can confirm: he never gave us up",
      "like_count": 104192,
      "published_at": "2025-04-22T19:05:08Z",
      "reply_count": 1000,
      "replies": [
        {
          "comment_id": "Ugzge340dBgB75hWBm54AaABAg.AHE8_QAWJx9AHE9eIiztxR",
          "parent_id": "Ugzge340dBgB75hWBm54AaABAg",
          "author": "@linganguliguliwatcha",
          "channel_id": "UCjFRISlX-LPxiqViJAE3h6Q",
          "text": "YOUTUBE AND ONE LIKE WOOHAAAAH",
          "like_count": 3782,
          "published_at": "2025-04-22T19:14:32Z"
        }
      ]
    },
     ...
  ],
  "count": 10
}

Comments Extraction (Async)

Initiate async comments extraction

curl --request POST   --url https://youtube-scraper9.p.rapidapi.com/api/video/VIDEO_ID/comments?count=10000   --header 'Content-Type: application/json'   --header 'x-rapidapi-host: youtube-scraper9.p.rapidapi.com'   --header 'x-rapidapi-key: YOUR_KEY'
Sample response (async)
{
  "request_id": "32d2fc3f-9427-4c9b-804e-3817f338a521",
  "status": "PENDING",
  "message": "Comment extraction request submitted successfully. Use the request_id to check results.",
  "result_endpoint": "/api/comments/result/32d2fc3f-9427-4c9b-804e-3817f338a521"
}

Retrieve async comments result

curl --request GET   --url https://youtube-scraper9.p.rapidapi.com/api/comments/result/32d2fc3f-9427-4c9b-804e-3817f338a521   --header 'x-rapidapi-host: youtube-scraper9.p.rapidapi.com'   --header 'x-rapidapi-key: YOUR_KEY'
When request processing is in progress
{
  "status": "PENDING",
  "progress": "60.00%"
}
When result is ready
{
  "status": "SUCCESS",
  "result": [
    {
      "comment_id": "Ugzge340dBgB75hWBm54AaABAg",
      "video_id": "dQw4w9WgXcQ",
      "author": "@YouTube",
      "channel_id": "UCBR8-60-B28hp2BmDPdntcQ",
      "text": "can confirm: he never gave us up",
      "like_count": 104192,
      "published_at": "2025-04-22T19:05:08Z",
      "reply_count": 1000,
      "replies": []
    },
     ...
  ],
  "count": 10
}

📊 Plans & Limites

PlanRésultats max/rechercheCommentaires max/requêteJobs concurrents
BASIC501001
PRO10010 0003
ULTRA200500 0005
MEGA5001 000 00010

*Quotas mensuels appliqués par RapidAPI.

🔄 Workflow Asynchrone

  1. Soumettre un job → recevoir request_id & result_endpoint
  2. Poller le endpoint résultat jusqu’à COMPLETED
  3. Récupérer les données finales (expire après 24h)

🛠️ Codes d’erreur

CodeSignification
400Validation ou limite de plan dépassée
401Header d’abonnement manquant
403Abonnement ou proxy secret invalide
404Request ID introuvable ou expiré
429Limite de débit dépassée
500Erreur interne serveur

📬 Support & Documentation

Pour toute question : imrane.ouelfaquir@gmail.com

Documentation détaillée : Article Medium