API guide
Full Page Screenshot API: How to Capture Long Web Pages Without Cropping or Bugs
Updated
Use full_page=true to capture the document beyond the viewport with SnapshotFlow. Getting the whole document height and waiting for its content are separate tasks.
Below, compare two real captures of the same demonstration page, choose a readiness signal, and check the limits before automating long-page screenshots.
What is a Full Page Screenshot API?
A full page screenshot API captures an entire rendered document height, not just the visible viewport. Instead of scrolling manually in a browser and stitching images, you send one request to an endpoint and receive a finished image (or base64 / JSON response).
SnapshotFlow is built for production use: caching, async jobs, request blocking, metadata extraction, and deterministic parameterized captures.
Why Long Screenshots Are Usually Cropped or Broken
- Viewport-only capture when
full_pageis disabled. - Lazy-loaded sections not yet visible or loaded at capture time.
- Sticky headers and cookie banners covering content.
- Animations that shift layout between requests.
- Racing dynamic data where the page is captured too early.
- Inconsistent waits and missing deterministic selectors.
If you capture pages yourself with Puppeteer, the same causes are walked through symptom by symptom in fixes for blank or cut-off screenshots.
For a social thread, also check whether every post is present before capturing. Our guide to saving a Twitter thread as a PDF or image covers reader pages, overlapping captures and missing posts.
Quick Start: Capture a Long Screenshot
This request captures a full-page PNG and returns binary data:
curl "https://api.snapshotflow.com/screenshot?url=https://example.com&full_page=true&format=png" \ -H "X-Api-Key: your-api-key" \ --output full-page.png
For an application you control, set a ready attribute only after the required data has rendered. Replace the sample URL and selector below with your public page and its actual ready signal:
curl --get "https://api.snapshotflow.com/screenshot" \ -H "X-Api-Key: $SNAPSHOTFLOW_API_KEY" \ --data-urlencode "url=https://your-site.example/report" \ --data-urlencode "full_page=true" \ --data-urlencode "width=960" \ --data-urlencode "height=700" \ --data-urlencode "wait_until=load" \ --data-urlencode 'wait_for_selector=#report[data-capture-ready="true"]' \ --data-urlencode "cache=false" \ --output full-page-ready.png
The placeholder domain is not a live demo. The selector must match a state your application really sets; otherwise the request fails with SELECTOR_NOT_FOUND after the selector wait expires. This wait is currently limited to 10 seconds. cache=false requests a fresh capture while you check the result.
Before and after: full height is not ready content
This controlled report renders its data five seconds after the document loads. Both images use a 960 × 700 viewport, a device scale factor of 1 and fullPage: true. The first capture includes the whole document while the report is still loading. The second waits for #report[data-capture-ready="true"].
Before: document loaded, report missing

After: report ready selector matched

To reproduce the images, download capture.mjs into an empty folder, then run:
npm install puppeteer node capture.mjs
The script includes the HTML and produces screenshots/before.png and screenshots/after.png without an API key. It was run with Puppeteer 24.42.0, Chrome 147.0.7727.57 and Node.js 24.15.0. The API request above uses the corresponding full_page and wait_for_selector options; it was not used to generate these images.
This example isolates delayed rendering. It does not test infinite scrolling, virtualized lists, animation freezing or every website's loading behavior.
Choose a capture strategy for the page
- Set
full_page=truefor long captures; otherwise only viewport height is returned. - Wait for rendered data. Prefer a ready-state selector over the mere presence of a container.
loadand network-idle events do not prove that charts, fonts or later application updates are complete. - Handle lazy loading separately.
full_page=truedoes not scroll through the page to trigger every lazy image. Content loaded on scroll needs a page-specific scrolling step before capture; a fixeddelaydoes not trigger it. See the lazy-loading troubleshooting example. Lazy-loaded ad slots behave the same way; the ad screenshots guide shows a tested fix. - Check nested scroll containers. A dashboard panel with its own scrollbar is not the full document. Capture it separately or deliberately adjust its CSS before capture. For a manual capture in Chrome, the extension's Scrolling area mode captures a selected panel.
- Block overlays with
block_cookie_banners,hide_selectors, andclick(see clean captures without cookie banners). - Treat reduced motion as a preference.
reduced_motion=trueemulatesprefers-reduced-motion: reduce. It helps when the website honors that preference; it does not forcibly stop every CSS animation, JavaScript animation, video or GIF. A fixed delay does not freeze looping content either. Use a page-specific still state where needed, with controlled viewport settings. - Use caching for repeatable snapshots and lower cost on repeated requests.
Parameters for full-page captures
These options control document size, readiness and overlays in the workflow above. Use the full API parameter reference for authentication, other output types and delivery options.
| Parameter | Default | Use for long pages |
|---|---|---|
full_page | false | Set true to capture the loaded document height. It does not load missing content or expand nested scroll panels. |
width / height | 1280 / 800 | Set the viewport before navigation. Width controls responsive layout; height is not a cap on the full-page image. |
device_scale_factor | 1 | Control pixel density at the same layout width. Larger scale factors increase the pixel count of long images. |
wait_until | networkidle2 | Choose a navigation event: load, domcontentloaded, networkidle0 or networkidle2. None guarantees that the application's visual content is complete. |
wait_for_selector | Empty | Wait up to 10 seconds for a matching element. Use a selector that marks rendered data, rather than a container that exists while loading. |
delay | 0 | Add up to 10,000 ms after interactions and injected scripts. This does not trigger lazy loading or stop looping animations by itself. |
styles / scripts | Empty | Apply page-specific layout or preparation code before capture. Check that the changes preserve the content you need to show. |
block_cookie_banners / hide_selectors | false / Empty | Attempt banner blocking, or hide known overlays by CSS selector. Inspect the output; blocking is not a guarantee for every site. |
reduced_motion | false | Emulate prefers-reduced-motion: reduce. The page must honor it; this does not force all animations to stop. |
cache | true | Reuse a previous result for the same capture settings. Set false when validating a fresh render. |
For a component crop, use the element screenshot API guide. For paginated output, use the webpage-to-PDF guide.
Production Checklist
- Always pass API key in
X-Api-Key. - Use
full_page=truefor long-page mode. - Tune
wait_until,wait_for_selector, anddelayper site profile. - Set
response_type=jsonwhen your pipeline needs metadata/content payloads. - Use async mode for large volume jobs and monitor
/jobs/:id. - Use consistent parameter sets to maximize cache hit ratio.
FAQ
How do I prevent full-page screenshots from cutting off bottom sections?
full_page=true captures the document height, but does not load missing content. Wait for a selector that marks the required data as rendered. Lazy-loaded content may need scrolling, and nested scroll containers need separate handling.
Can I capture authenticated states?
Yes, provide session cookies via cookies and any required headers via headers.
Is this API suitable for SEO monitoring snapshots?
Yes. Use deterministic viewport settings, reduced motion, and stable content waits to reduce screenshot variance.
Start Capturing Long Pages Reliably
If you need a full page screenshot API that works in production, SnapshotFlow is ready to use.