Skip to main content
GET
Take a screenshot
Captures a page and returns a hosted image URL. 1 credit, whatever the options. Failed requests are never charged.

Guide: Screenshots

Devices, element captures, formats and examples.

Authorizations

X-API-Key
string
header
required

Your Prefetch API key. Obtain one from the dashboard.

Query Parameters

url
string
required

The website URL to process. https:// is prepended automatically if no protocol is provided.

Example:

"https://stripe.com"

width
integer
default:1440

Viewport width in pixels. Range: 320–2560. Default: 1440.

Required range: 320 <= x <= 2560
height
integer
default:900

Viewport height in pixels. Range: 240–5000. Default: 900.

Required range: 240 <= x <= 5000
format
enum<string>
default:jpeg

Output format: jpeg, png, webp, or pdf (the whole page as a PDF document). Default: jpeg.

Available options:
jpeg,
png,
webp,
pdf
full_page
boolean
default:false

Capture full scrollable page height. Default: false.

device
enum<string>

Render as a real device: its viewport, pixel density, touch support and user agent, so the page serves its phone or tablet layout. The image keeps the device's pixel density (an iphone_15 capture is 1179 px wide). Overrides width and height.

Available options:
iphone_15,
iphone_15_pro_max,
iphone_se,
pixel_7,
galaxy_s8,
ipad,
ipad_mini,
ipad_pro_11,
galaxy_tab_s4,
desktop_retina
Example:

"iphone_15"

dark_mode
boolean
default:false

Ask the page for its dark theme (prefers-color-scheme: dark). Pages without one render as usual. Pass "true" to enable.

selector
string

Capture only the first element matching this CSS selector, e.g. #pricing or header. Answers 422 TARGET_ELEMENT_NOT_FOUND when nothing matches within 10 s. Not available with format=pdf.

Example:

"#pricing"

wait_for
integer
default:0

Milliseconds to wait after the page loads, for content that arrives late (0–30000).

Required range: 0 <= x <= 30000
wait_for_selector
string

Wait (up to 10 s) for this CSS selector to be visible before capturing. Best effort: if it never appears, the page is captured as it is, with a warning.

Example:

".chart canvas"

block_ads
boolean
default:false

Block ad and tracker requests while the page loads, on top of the ad and cookie-banner hiding every screenshot gets. Pages load faster and cleaner. Pass "true" to enable.

quality
integer
default:85

Image quality for jpeg and webp (1–100). Default: 85.

Required range: 1 <= x <= 100

Response

Screenshot result.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required