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_page is 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

Full-height report screenshot with loading placeholders instead of the report metrics

After: report ready selector matched

The same full-height report after its ready signal, showing all three synthetic metrics
Actual local Puppeteer captures, not API benchmark results. Both images are 960 × 1200 pixels; the report values are synthetic. A taller capture alone did not make the data appear.

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

  1. Set full_page=true for long captures; otherwise only viewport height is returned.
  2. Wait for rendered data. Prefer a ready-state selector over the mere presence of a container. load and network-idle events do not prove that charts, fonts or later application updates are complete.
  3. Handle lazy loading separately. full_page=true does not scroll through the page to trigger every lazy image. Content loaded on scroll needs a page-specific scrolling step before capture; a fixed delay does 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.
  4. 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.
  5. Block overlays with block_cookie_banners, hide_selectors, and click (see clean captures without cookie banners).
  6. Treat reduced motion as a preference. reduced_motion=true emulates prefers-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.
  7. 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.

ParameterDefaultUse for long pages
full_pagefalseSet true to capture the loaded document height. It does not load missing content or expand nested scroll panels.
width / height1280 / 800Set the viewport before navigation. Width controls responsive layout; height is not a cap on the full-page image.
device_scale_factor1Control pixel density at the same layout width. Larger scale factors increase the pixel count of long images.
wait_untilnetworkidle2Choose a navigation event: load, domcontentloaded, networkidle0 or networkidle2. None guarantees that the application's visual content is complete.
wait_for_selectorEmptyWait up to 10 seconds for a matching element. Use a selector that marks rendered data, rather than a container that exists while loading.
delay0Add up to 10,000 ms after interactions and injected scripts. This does not trigger lazy loading or stop looping animations by itself.
styles / scriptsEmptyApply page-specific layout or preparation code before capture. Check that the changes preserve the content you need to show.
block_cookie_banners / hide_selectorsfalse / EmptyAttempt banner blocking, or hide known overlays by CSS selector. Inspect the output; blocking is not a guarantee for every site.
reduced_motionfalseEmulate prefers-reduced-motion: reduce. The page must honor it; this does not force all animations to stop.
cachetrueReuse 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=true for long-page mode.
  • Tune wait_until, wait_for_selector, and delay per site profile.
  • Set response_type=json when 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.