Shotfly

Use case

Website screenshot API

Render pages in a real browser and get a clean image back: ads blocked, cookie banners rejected, lazy content loaded for full-page captures.

en.wikipedia.org/wiki/Screenshot
Wikipedia article “Screenshot”, captured by Shotfly on a 1280 × 800 desktop viewport
The same article captured by Shotfly with device=iphone_15
Real captures · device=desktop and device=iphone_15 · en.wikipedia.org, CC BY-SA 4.0 · 2026-11-30 UTC
  1. 01

    Viewport, device presets (iPhone, Pixel, iPad), dark mode and pixel density.

  2. 02

    Full page up to 20,000 CSS pixels tall, a single element via selector, or a clip rectangle.

  3. 03

    Wait for load, network idle, a selector, or a fixed delay.

  4. 04

    Failures, bot challenges and blank pages are not charged.

One request.

Every option is a parameter; see the parameter reference.

Example
curl "https://api.shotfly.dev/v1/screenshot?url=https://example.com&device=iphone_15&full_page=true&format=webp" \
  -H "Authorization: Bearer $SHOTFLY_SECRET_KEY" -o page.webp

How do I take a screenshot of a website with an API?

Send the page URL to GET /v1/screenshot with your secret key. Shotfly opens the page in a real browser, waits for it to load, removes cookie banners and ads, and returns the image in the response body. Every other option, such as the device, the format or a full-page capture, is a query parameter.

curl -G "https://api.shotfly.dev/v1/screenshot" \
  --data-urlencode "url=https://example.com" \
  -d full_page=true -d format=webp \
  -H "Authorization: Bearer $SHOTFLY_SECRET_KEY" \
  --fail-with-body -D headers.txt -o page.webp

Which sizes, devices and formats can I capture?

WhatParametersLimits
Viewportviewport_width, viewport_height100–3,840 × 100–2,160 CSS pixels; default 1,280 × 800
Device presetsdevicedesktop, desktop_hd, iphone_15, pixel_8, ipad
Pixel densitydevice_scale_factor1–3; default 1
Full pagefull_page, full_page_max_height10,000 CSS pixels by default, at most 20,000
Part of the pageselector, or clip_x, clip_y, clip_width, clip_heightThe first element that matches, or a rectangle
Outputformat, quality, thumbnail_widthpng (default), jpeg, webp or pdf; WebP is at most 16,383 pixels on each side
Dark modedark_modeEmulates prefers-color-scheme: dark

Does Shotfly charge for failed screenshots?

No. A request costs credits only when Shotfly returns a usable screenshot. Bot challenges, blank pages, HTTP errors, cookie banners or walls that could not be removed, timeouts and errors on Shotfly's side return an error code and cost nothing, and results served from cache are free. The X-Credits-Charged header says what each request cost.

How long can a capture take?

Each request has a time budget of 5 to 60 seconds (timeout, default 30). Within it, Shotfly waits for wait_until (load by default, or domcontentloaded or networkidle), for wait_for_selector when you set one, and for delay (up to 10 seconds). For batches or slow pages, queue the captures with async jobs and receive each result by webhook.

Can I capture pages behind a login?

Yes, when you can hand the session to the browser: cookies takes a JSON array of {name, value, domain?, path?}, and headers adds request headers such as Authorization. Shotfly does not fill in login forms. Use an account made for this rather than a personal session.

What can't it capture?

  • Private and internal addresses: localhost, private networks and cloud metadata addresses are refused with url_not_allowed, including when a page redirects there during the render.
  • Sites that block automated browsers: the request fails with target_blocked and costs nothing. escalation=auto lets Shotfly retry on its premium anti-bot tier, but some sites block every automated browser.
  • Video or animation: the output is a still image or a PDF.
  • Full-page captures taller than 20,000 CSS pixels: the capture stops at full_page_max_height.
  • More than 2 MB of raw markup in the html field.