Keyword: full page screenshot api
Full Page Screenshot API: How to Capture Long Web Pages Without Cropping or Bugs
If you need stable long-page screenshots for monitoring, SEO audits, regression testing, or user-generated reports, this guide shows exactly how to do it with ScreenshotAPI.
You will get practical examples, reliability tips, and a complete reference for every available /screenshot parameter.
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).
ScreenshotAPI 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.
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
Recommended reliable variant for dynamic pages:
curl "https://api.snapshotflow.com/screenshot?url=https://example.com&full_page=true&width=1440&wait_until=networkidle2&delay=1200&block_cookie_banners=true&block_ads=true" \
-H "X-Api-Key: your-api-key" \
--output full-page-stable.png
Best Practices for Bug-Free Full Page Screenshots
- Set
full_page=true for long captures; otherwise only viewport height is returned.
- Use deterministic waits with
wait_for_selector for key blocks.
- Add small
delay (300-1500 ms) on animation-heavy pages.
- Block overlays with
block_cookie_banners, hide_selectors, and click.
- Disable flakiness using
reduced_motion=true and controlled viewport settings.
- Use caching for repeatable snapshots and lower cost on repeated requests.
All Available /screenshot Parameters
The table below maps directly to the backend query schema and defaults.
Source
| Parameter | Default | Description |
url | "" | Target URL to capture. Required unless html is passed. |
html | "" | Raw/base64 HTML source to render instead of URL navigation. |
Viewport
| Parameter | Default | Description |
width | 1280 | Viewport width in pixels (100-3840). |
height | 800 | Viewport height in pixels (100-2160). |
device_scale_factor | 1 | Device pixel ratio for sharper captures (0.5-3). |
viewport_mobile | false | Use a mobile-like viewport behavior. |
Capture
| Parameter | Default | Description |
format | png | Output format: png, jpeg, webp, pdf. |
quality | 80 | JPEG/WebP quality (1-100). |
full_page | false | Capture full document height. Core flag for long screenshots. |
omit_background | false | Allows transparent background when format supports it. |
selector | "" | Capture a single DOM element by CSS selector. |
clip_x | 0 | X coordinate for manual clipping. |
clip_y | 0 | Y coordinate for manual clipping. |
clip_width | 0 | Clip area width (0 = disabled). |
clip_height | 0 | Clip area height (0 = disabled). |
Timing
| Parameter | Default | Description |
delay | 0 | Extra wait in milliseconds before capture (0-10000). |
wait_until | networkidle2 | Navigation readiness: load, domcontentloaded, networkidle0, networkidle2. |
wait_for_selector | "" | Wait until a CSS selector appears before screenshot. |
Emulation
| Parameter | Default | Description |
dark_mode | false | Emulate dark color scheme. |
reduced_motion | false | Reduce motion/animations for stable output. |
media_type | screen | Emulate CSS media: screen or print. |
timezone | "" | Override browser timezone. |
geolocation_latitude | 0 | Latitude for location emulation. |
geolocation_longitude | 0 | Longitude for location emulation. |
geolocation_accuracy | 100 | Accuracy radius for geolocation. |
user_agent | "" | Override user-agent string. |
Injection and Interaction
| Parameter | Default | Description |
headers | "" | Custom request headers (JSON string). |
cookies | "" | Cookie list to preload (JSON string). |
scripts | "" | JavaScript to inject before capture. |
styles | "" | CSS to inject before capture. |
hide_selectors | "" | Selectors to hide (for popups, chat widgets, banners). |
click | "" | CSS selector to click before capture. |
Image Resize
| Parameter | Default | Description |
image_width | 0 | Post-capture resize width (0 = keep original). |
image_height | 0 | Post-capture resize height (0 = keep original). |
PDF
| Parameter | Default | Description |
pdf_print_background | false | Print CSS backgrounds for PDF output. |
pdf_landscape | false | Use landscape orientation in PDF. |
pdf_paper_format | a4 | PDF page size: a4, a3, a2, a1, letter, legal, tabloid. |
Blocking
| Parameter | Default | Description |
block_ads | false | Blocks common ad resources and placements. |
block_trackers | false | Blocks tracking scripts/resources. |
block_cookie_banners | false | Attempts to suppress cookie dialogs. |
block_requests | "" | Custom network blocking patterns. |
Content and Metadata
| Parameter | Default | Description |
extract_content | false | Return extracted page content together with response. |
content_format | markdown | Extracted content format: html, markdown, text. |
metadata | false | Include page metadata (title, og tags, status). |
Cache and Response
| Parameter | Default | Description |
cache | true | Enable cache reads/writes for deterministic requests. |
response_type | image | Response shape: image, json, base64, url. |
Async
| Parameter | Default | Description |
async | false | Queue a background job and return job_id. |
webhook_url | "" | Webhook endpoint for async completion notifications. |
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?
Set full_page=true and add a deterministic wait strategy. For dynamic pages, combine wait_for_selector and a short delay.
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, ScreenshotAPI is ready to use.