🚀 Features
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
Extract up to 1,000,000 YouTube comments instantly or in bulk, ideal for sentiment analysis, big data, and automation.
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 Method | Endpoint URL | Endpoint Description |
---|---|---|
POST | /api/search/videos | Submit YouTube video search (async) |
GET | /api/search/result/request_id | Retrieve YouTube search results |
YouTube Comment Extractor
HTTP Method | Endpoint URL | Endpoint Description |
---|---|---|
GET | /api/video/video_id/comments?count=N | Extract instant comments (max 500) |
POST | /api/video/video_id/comments | Bulk comments extraction (async, up to 1M) |
GET | /api/comments/result/request_id | Retrieve extracted YouTube comments |
YouTube Channel Analytics API
HTTP Method | Endpoint URL | Endpoint Description |
---|---|---|
GET | /api/channel/username | Channel 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
Plan | Résultats max/recherche | Commentaires max/requête | Jobs concurrents |
---|---|---|---|
BASIC | 50 | 100 | 1 |
PRO | 100 | 10 000 | 3 |
ULTRA | 200 | 500 000 | 5 |
MEGA | 500 | 1 000 000 | 10 |
*Quotas mensuels appliqués par RapidAPI.
🔄 Workflow Asynchrone
- Soumettre un job → recevoir request_id & result_endpoint
- Poller le endpoint résultat jusqu’à COMPLETED
- Récupérer les données finales (expire après 24h)
🛠️ Codes d’erreur
Code | Signification |
---|---|
400 | Validation ou limite de plan dépassée |
401 | Header d’abonnement manquant |
403 | Abonnement ou proxy secret invalide |
404 | Request ID introuvable ou expiré |
429 | Limite de débit dépassée |
500 | Erreur interne serveur |
📬 Support & Documentation
Pour toute question : imrane.ouelfaquir@gmail.com
Documentation détaillée : Article Medium