Scrape a YouTube video's comments
curl --request POST \
--url https://api.scrapeunblocker.com/content/youtube-comments \
--header 'x-scrapeunblocker-key: <api-key>'import requests
url = "https://api.scrapeunblocker.com/content/youtube-comments"
headers = {"x-scrapeunblocker-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-scrapeunblocker-key': '<api-key>'}};
fetch('https://api.scrapeunblocker.com/content/youtube-comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Plugins
Scrape a YouTube video's comments
Returns a YouTube video’s comments as JSON. For each comment: commentId, author, authorChannelId, authorThumbnail, text, likeCount, publishedTimeText, replyCount, and the isPinned, isHearted, isAuthorVerified and isUploader flags, plus the video title and total commentCount. Sort by top or newest and collect up to max_results across pages.
Scrape a YouTube video's comments
curl --request POST \
--url https://api.scrapeunblocker.com/content/youtube-comments \
--header 'x-scrapeunblocker-key: <api-key>'import requests
url = "https://api.scrapeunblocker.com/content/youtube-comments"
headers = {"x-scrapeunblocker-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-scrapeunblocker-key': '<api-key>'}};
fetch('https://api.scrapeunblocker.com/content/youtube-comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Your ScrapeUnblocker API key. Apply on every request.
Query Parameters
Video id (dQw4w9WgXcQ) or any YouTube video URL.
Comment order: top, newest.
How many comments to collect across pages (~20 per page).
Required range:
1 <= x <= 2000Exit-IP country (ISO-2) for the watch page. Default US.
Response
JSON with a comments array plus counts.

