Screenshot YouTube with an API
Capture YouTube channel and video pages with the consent banner handled and thumbnails loaded — one API call, no browser to run.

100 screenshots free · No credit card required
What makes YouTube hard to capture
YouTube shows a consent banner and loads thumbnails as you scroll. blockCookieBanners clears the prompt, and a short delay lets the grid populate — no stealth mode needed. Channel and video URLs render reliably; the signed-out home feed is intentionally sparse.
- Consent banner
- Lazy loading
- Heavy JavaScript
- Geo content
The request that works
curl -X POST https://api.allscreenshots.com/v1/screenshots \
-H "X-API-Key: $ALLSCREENSHOTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/@NASA",
"blockAds": true,
"blockCookieBanners": true,
"viewport": {
"width": 1440,
"height": 1000
},
"waitUntil": "networkidle",
"delay": 4000
}' \
--output screenshot.pngFAQ
Can you screenshot YouTube with an API?
Yes. Send a YouTube channel or video URL to the Allscreenshots API and you get back a PNG of the rendered page — no browser to run.
How do I remove the YouTube consent banner from a screenshot?
Set blockCookieBanners: true and the consent prompt is dismissed before capture, so it never appears in the image.
Why is the YouTube home page empty in my screenshot?
The signed-out home feed is intentionally sparse. Capture a specific channel or video URL for a page full of content, or pass session cookies for a signed-in feed.
Do I need stealth mode for YouTube?
No. Channel and video pages render with a standard capture, so stealth mode is not needed — and they count toward the 100 free screenshots on every plan.
Screenshot other sites
See all screenshot guides →Capture YouTube.
And everything else.
Start with 100 free screenshots every month. No credit card required.
Get started free