Docs
Log in
Migrate to the Crawling API (or crawl_screenshot via MCP)

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 -G
from 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

token
stringrequired
Your private Crawlbase token.
url
stringrequired
Target page URL. Must start with http or https and be fully URL-encoded.

Screenshot-specific

mode
viewport | fullpageviewport
Capture only the visible area, or the entire scrollable page.
format
png | jpegpng
PNG for crisp text and UI; JPEG for smaller payloads on photo-heavy pages.
width
int (px)1280
Viewport width.
height
int (px)800
Viewport height. Ignored when mode=fullpage.
device
desktop | mobiledesktop
Use a preset device profile. Mobile presets force width=375, height=812, and a phone User-Agent.
store
booleanfalse
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:

user_agent
stringoptional
Custom User-Agent forwarded to the target site verbatim. URL-encode it. If omitted, Crawlbase rotates a realistic UA per request.
css_click_selector
stringoptional
CSS selector for an element to click before the screenshot is captured (#some-button, .some-other-button). URL-encode the value.
scroll
booleanfalse
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.
page_wait
integer (ms)optional
Wait this many milliseconds after the page loads before capturing - gives time for animations or JS-heavy renders to settle.
ajax_wait
booleanfalse
Wait until in-flight AJAX requests finish before capturing.
country
ISO 3166optional
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 -G

Screenshot 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 -G

Common 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.