#What the Screenshot API does
The Screenshot API turns any URL or HTML into a high-quality image, PDF, or scrolling video using a headless Chromium browser. It handles viewport emulation, device presets, ad/cookie blocking, CSS/JS injection, and more — so you don't have to manage browser infrastructure yourself.
- 11 endpoints covering capture, PDF, video, bulk, scheduling, diff, metrics, OCR, and device listing.
- 20+ device presets — iPhone, iPad, Pixel, Galaxy, MacBook, desktop resolutions.
- Sync & async modes — get results immediately or queue jobs with webhook notifications.
- Visual monitoring — schedule captures and get email alerts when pages change visually.
#Endpoints & actions
| Endpoint | Credits | Description |
|---|---|---|
capture | 0.05+ | URL screenshot (PNG/JPG/WebP). +0.03 full_page, +0.03 retina. |
capture-html | 0.03+ | Render custom HTML as an image. |
capture-pdf | 0.10+ | Generate PDF from URL or HTML with page settings. |
capture-video | 0.50+ | Scrolling video/GIF (MP4, WebM, GIF). |
bulk | 0.04/url | Capture multiple URLs (up to 50) in one request. |
schedule-* | 0.10 | Create/update/delete/list/run scheduled captures. |
diff | 0.10 | Pixel-level visual comparison between two screenshots. |
metrics | 0.05 | Core Web Vitals (LCP, FCP, CLS, TTI). |
ocr | 0.20 | OCR text extraction from screenshots (11 languages). |
status / download | Free | Check job status or download the output file. |
devices | Free | List all available device presets. |
#Quick start examples
#Basic screenshot
curl -s -X POST "https://yeb.to/v1/screenshot/capture" \
-H "X-API-Key: YOUR_KEY" \
-d "url=https://example.com&format=png"
#Mobile device screenshot
curl -s -X POST "https://yeb.to/v1/screenshot/capture" \
-H "X-API-Key: YOUR_KEY" \
-d "url=https://example.com&device=iphone-15&full_page=true"
#Clean capture with blocking
curl -s -X POST "https://yeb.to/v1/screenshot/capture" \
-H "X-API-Key: YOUR_KEY" \
-d "url=https://news-site.com&block_ads=true&block_cookie_banners=true&block_chat_widgets=true&block_tracking=true"
#Async capture with webhook
curl -s -X POST "https://yeb.to/v1/screenshot/capture" \
-H "X-API-Key: YOUR_KEY" \
-d "url=https://example.com&async=true&webhook_url=https://yoursite.com/webhook"
# Response: {"success":true,"job_id":12345,"status":"queued"}
# Your webhook will receive a POST when the job completes.
#Key parameters explained
#Viewport & device
viewport_width/viewport_height— Set exact dimensions (320-3840 x 200-2160).device— Use a preset likeiphone-15to auto-set viewport, pixel density, and user agent. Overrides manual viewport settings.full_page— Capture the entire scrollable page, not just the visible viewport. Adds 0.03 credits.retina— Render at 2x pixel density for sharp images. Adds 0.03 credits.
#Blocking options
block_ads— Blocks requests to known ad networks (Google Ads, DoubleClick, etc.).block_cookie_banners— Removes common cookie consent overlays (OneTrust, CookieBot, etc.).block_chat_widgets— Hides Intercom, Drift, Zendesk, and other chat widgets.block_tracking— Blocks analytics and tracking scripts (Google Analytics, Facebook Pixel, etc.).
#Element targeting
selector— Capture only a specific CSS element (e.g.#hero-section).click_selectors— Click elements before capture (accept cookies, close popups).blur_selectors— Apply CSS blur to sensitive content.remove_selectors— Remove elements entirely from the DOM.
#Output format
- Images:
png(default, lossless),jpg(smaller),webp(best compression). - Documents:
pdf— with page format, orientation, margins, headers/footers. - Videos:
mp4,webm,gif— scrolling capture with configurable FPS and speed. quality— 1-100 for JPG/WebP (default: 80). Higher = larger file, better quality.thumbnail_width— Auto-generate a thumbnail (50-800px wide).
#Async mode & webhooks
For heavy operations (video capture, bulk jobs), use async=true to queue the job.
You have two options to get the result:
- Polling: Call
/statuswith thejob_idevery 2-5 seconds untilstatusiscompletedorfailed. - Webhook: Set
webhook_urland your server will receive a POST with the full result when the job finishes. Includes retry logic (3 attempts).
// Webhook payload example
{
"event": "screenshot.completed",
"job_id": 12345,
"status": "completed",
"url": "https://cdn.yeb.to/.../screenshot.png",
"file_size": 245678,
"timestamp": "2026-02-06T12:00:03Z"
}
#Bulk screenshot processing
Send up to 50 URLs in a single /bulk request. Each URL can have individual
settings, plus you can set default_settings applied to all. URLs are processed in parallel.
curl -s -X POST "https://yeb.to/v1/screenshot/bulk" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": [
{"url": "https://site1.com", "device": "iphone-15"},
{"url": "https://site2.com", "format": "jpg", "quality": 90},
{"url": "https://site3.com"}
],
"default_settings": {
"block_ads": true,
"full_page": true
}
}'
#Scheduled captures & visual monitoring
Create cron-based schedules to capture pages automatically. Enable change detection to compare each capture with the previous one. When the visual difference exceeds your threshold, you get an email alert.
curl -s -X POST "https://yeb.to/v1/screenshot/schedule-create" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Daily Homepage Check",
"url": "https://mysite.com",
"cron_expression": "0 9 * * *",
"timezone": "Europe/Sofia",
"detect_changes": true,
"change_threshold": 5.0,
"notify_on_change": true,
"notify_email": "[email protected]",
"screenshot_settings": {
"full_page": true,
"block_ads": true
}
}'
#Visual diff comparison
Compare any two completed screenshot jobs. The API generates a diff image highlighting changed pixels in red, and returns the difference percentage and bounding boxes of changed regions.
difference_percent— 0.00 means identical, 100.00 means completely different.diff_regions— Array of{x, y, width, height}bounding boxes for changed areas.diff_image_url— A PNG overlay showing changes in red against a dimmed background.
#Credit pricing breakdown
| Action | Base | Modifiers |
|---|---|---|
capture | 0.05 | +0.03 full_page, +0.03 retina, +0.10 4K viewport |
capture-html | 0.03 | Same modifiers as capture |
capture-pdf | 0.10 | +0.05 per page over 5 |
capture-video | 0.50 | +0.05 per second of video |
bulk | 0.04/URL | Max 50 URLs per request |
schedule-create | 0.10 | One-time setup; each run costs capture price |
diff | 0.10 | Per comparison |
metrics | 0.05 | Core Web Vitals capture |
ocr | 0.20 | Per screenshot OCR |
extract-html / extract-text | 0.02 | DOM/text extraction |
status / devices / schedule-list | Free (0 credits) | |
#Troubleshooting & tips
- Timeouts: Increase
timeout_msfor slow pages (max 60000). Usedelay_msto wait for lazy-loaded content. - Blank screenshots: Some SPAs need
delay_ms=2000or more. Trylazy_load=truefor infinite scroll pages. - Cookie walls: Use
click_selectors=["#accept-cookies"]to auto-accept consent dialogs before capture. - Large pages: Full-page captures of very long pages may take 10+ seconds. Use
async=truefor reliability. - Video quality: For sharper GIFs, reduce
viewport_widthto 800-1024. GIFs are limited to 256 colors. - OCR accuracy: Higher resolution screenshots produce better OCR results. Use
retina=truewhen possible. - Rate limits: Default burst is 10 req/s. For bulk operations, use the
/bulkendpoint instead of parallel single requests.
#API Changelog
capture, capture-html,
capture-pdf, capture-video, bulk, schedule,
diff, metrics, ocr, extract-html,
extract-text, status, download, and devices endpoints.