Skip to main content
Screenshot API

A screenshot API that captures full pages with one request

The Browserless screenshot API captures full-page screenshots, element crops, and viewport images from any URL or HTML payload, with real Chromium rendering, no browser to install, and no infrastructure to maintain.

The formats and capture modes Browserless screenshot API supports

The /screenshot endpoint gives you precise control over what gets captured and how it's returned.

Capture full-page screenshots
Screen capture an entire scrollable page, not just the viewport. Pair it with scrollPage: true when the page lazy-loads images as you scroll.
Crop to a specific element
Pass a selector at the top level of your request body and the API waits for the element and crops the capture to its bounding box automatically.
Set custom viewports
Control width, height, and device scale factor to capture exactly the screen size you need, including both desktop and mobile emulation.
Capture pages behind a login
Arrive already signed in on pages that are behind a login, then screenshot the authenticated view.
Render from raw HTML
Send an html field instead of a URL to render inline HTML directly – useful for generating screenshots of dynamically built content without hosting it first.
Inject scripts and styles
Use addScriptTag and addStyleTag to modify the page before capture – hide overlays, set dark mode, or manipulate content before the screenshot is taken.

How to take a screenshot with the Browserless API

Three steps, one POST request, and real Chrome doing the rendering.

1

Get your API token

Sign up for a free Browserless account – no credit card required. Your API token is available immediately in the account dashboard.

2

Send the request

POST to the /screenshot endpoint with your target URL and options. Swap the host for production-lon or production-ams to render closer to your users. The example below captures a full-page PNG:

3

Handle the response

The API returns image/png, image/jpeg, or image/webp binary. Save it directly to disk or pass it downstream to your pipeline.

cURL

curl -X POST \
  "https://production-sfo.browserless.io/screenshot?token=YOUR_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://example.com/",
    "options": {
      "fullPage": true,
      "type": "png"
    }
  }' \
  --output "screenshot.png"

Where the Browserless screenshot API goes beyond basic tools

Most screenshot tools work on simple, static pages. Here's where the Browserless screenshot API goes further.

How screenshot tools usually break

Cookie banners and consent overlays block the capture
blockConsentModals: true removes cookie banners automatically
Lazy-loaded images missing from full-page captures
scrollPage: true triggers lazy loading before full-page capture
JavaScript-heavy pages return blank or incomplete screenshots
Real Chromium rendering handles JavaScript-heavy pages correctly
Captures land at viewport size, with no way to crop to one element
selector parameter crops to any element's bounding box
Bot detection returns CAPTCHA pages instead of content
/unblock and stealth options handle most bot-detection defences, including passive CAPTCHAs
No proxy support for geo-restricted or region-specific pages
Residential and datacenter proxy support built in
No way to inject scripts or styles before capture
addScriptTag and addStyleTag modify the web page before capture

Handle cookie banners and dynamic content automatically

Cookie consent overlays, lazy-loaded images, and JavaScript-rendered content break many screenshot pipelines. The Browserless screenshot API is built to handle all three.

Block consent modals automatically
Pass "blockConsentModals": true in your request body, and the API dismisses the major consent platforms (OneTrust, CookieBot, and more) before capturing.
Trigger lazy-loaded images
Set "scrollPage": true to scroll through the page before capture, triggering lazy-loaded images so they appear in full-page screenshots rather than loading as blank placeholders.
Wait for the right moment
Use waitForSelector, waitForFunction, waitForEvent, or a timeout to delay capture until the page reaches the state you need – useful for animated content, late-loading widgets, and dynamic layouts.
Block ads and tracking scripts
Use rejectResourceTypes and rejectRequestPattern to block heavy resources, ads, and third-party tracking scripts before rendering, meaning faster captures and cleaner screenshots with less noise.

Use cases for the Browserless screenshot API

Teams use the /screenshot endpoint across a range of production workflows:

Visual monitoring
Capture scheduled screenshots of competitor pages, product listings, or marketing assets to track layout changes, pricing updates, and new content over time.
Link previews and thumbnails
Generate automated website screenshots for chat widgets, social cards, and URL preview embeds without storing or maintaining your own browser.
Compliance archiving
Capture dated, pixel-perfect screenshots of entire pages for regulatory records, audit trails, or dispute evidence.
Visual regression testing
Automate before-and-after screenshot comparisons as part of your CI/CD pipeline.
Report generation
Screenshot dashboards, analytics views, or data visualisations for client reports without manual exports.
E-commerce monitoring
Capture product pages, pricing pages, and promotional banners across multiple sites on a schedule.

Screenshot API FAQs

Ready to capture your first page?

Grab a token, paste the cURL call, and you've got a PNG in a few seconds. The free plan includes 1k units a month, no credit card required.