Screenshots API
Render any URL as a PNG or JPEG. Viewport-only or full-page, desktop or mobile, with all the JS rendering controls of the main API. Perfect for previews, monitoring, and snapshots.
Same JS-rendering pipeline, screenshot parameters added on the standard endpoint. The standalone Screenshots API has been closed to new sign-ups since Nov 1, 2024 - existing integrations continue to work, no shutdown is scheduled.
Endpoint
GEThttps://api.crawlbase.com/screenshots?token=YOUR_JS_TOKEN&url=ENCODED_URL
# Requires a JavaScript token (rendering happens in headless Chrome).
# Returns the image bytes directly. Content-Type: image/png (default).Quickstart
# Save the screenshot to disk
curl 'https://api.crawlbase.com/screenshots?token=YOUR_JS_TOKEN' \
--data-urlencode 'url=https://github.com/anthropic' \
-o screenshot.png -Gfrom crawlbase import ScreenshotsAPI
api = ScreenshotsAPI({'token': 'YOUR_JS_TOKEN'})
res = api.get('https://github.com/anthropic')
with open('screenshot.png', 'wb') as f:
f.write(res['body'])const { ScreenshotsAPI } = require('crawlbase');
const fs = require('node:fs/promises');
const api = new ScreenshotsAPI({ token: 'YOUR_JS_TOKEN' });
const res = await api.get('https://github.com/anthropic');
await fs.writeFile('screenshot.png', res.body);Parameters
Required
Your private Crawlbase token.
Target page URL. Must start with
http or https and be fully URL-encoded.Screenshot-specific
Capture only the visible area, or the entire scrollable page.
PNG for crisp text and UI; JPEG for smaller payloads on photo-heavy pages.
Viewport width.
Viewport height. Ignored when
mode=fullpage.Use a preset device profile. Mobile presets force
width=375, height=812, and a phone User-Agent.Persist the screenshot in Cloud Storage. When
true, the response includes a screenshot_url header pointing at the stored copy - useful when you want a stable URL to embed in dashboards or share with downstream systems.Rendering control
Inherited from the Crawling API parameter set. The rendering controls clients use most often with screenshots:
Custom User-Agent forwarded to the target site verbatim. URL-encode it. If omitted, Crawlbase rotates a realistic UA per request.
CSS selector for an element to click before the screenshot is captured (
#some-button, .some-other-button). URL-encode the value.Auto-scroll the page before capture. Defaults to a 10-second scroll. Pair with
scroll_interval (10–60 s) to extend it. Useful for lazy-loaded content above the fold of a mode=fullpage shot.Wait this many milliseconds after the page loads before capturing - gives time for animations or JS-heavy renders to settle.
Wait until in-flight AJAX requests finish before capturing.
Geolocate the screenshot from a specific country (e.g.
US, GB, DE). Country availability is plan-gated; full country list lives on the Crawling API parameters reference.Common patterns
Full-page mobile screenshot
curl 'https://api.crawlbase.com/screenshots?token=YOUR_JS_TOKEN' \
--data-urlencode 'url=https://news.ycombinator.com' \
--data-urlencode 'mode=fullpage' \
--data-urlencode 'device=mobile' \
--data-urlencode 'format=jpeg' \
-o hn-mobile.jpg -GScreenshot after a click
# Open a "Show details" panel before capturing
curl 'https://api.crawlbase.com/screenshots?token=YOUR_JS_TOKEN' \
--data-urlencode 'url=https://example.com/product/123' \
--data-urlencode 'css_click_selector=button.show-details' \
--data-urlencode 'page_wait=1500' \
-o detail.png -GCommon use cases
- Link previews: generate Open Graph fallbacks for sites without proper meta tags.
- Visual monitoring: capture a site weekly to detect layout regressions.
- Compliance archives: pair with Cloud Storage to archive what a page looked like on a specific date.
- Email reports: embed live screenshots in scheduled reports.

