Blog/Tutorial

How to Capture Full Page Screenshots via API

Regular screenshots only capture the visible viewport. Full-page screenshots capture everything -- from header to footer, no matter how long the page is.

March 14, 2026|7 min read

What is a full-page screenshot?

A full-page (or "scrolling") screenshot captures the entire length of a web page, not just what is visible in the browser window. This means a page that scrolls for 5000px vertically will produce a tall image containing all the content.

Common use cases for full-page captures:

Capturing full-page screenshots with ScreenshotAPI

Set the fullpage parameter to true. That is it. The API handles scrolling, lazy-loaded content, and stitching automatically.

cURL

curl "https://screenshotapi-api-production.up.railway.app/v1/screenshot\
  ?url=https://stripe.com/pricing\
  &width=1280\
  &fullpage=true\
  &format=png" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o stripe-pricing-full.png

Node.js

const fetch = require('node-fetch');
const fs = require('fs');

async function captureFullPage(url, outputPath) {
  const apiUrl = new URL('https://screenshotapi-api-production.up.railway.app/v1/screenshot');
  apiUrl.searchParams.set('url', url);
  apiUrl.searchParams.set('width', '1280');
  apiUrl.searchParams.set('fullpage', 'true');
  apiUrl.searchParams.set('format', 'png');

  const response = await fetch(apiUrl.toString(), {
    headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
  });

  if (!response.ok) {
    throw new Error(`Screenshot failed: ${response.status}`);
  }

  const buffer = await response.buffer();
  fs.writeFileSync(outputPath, buffer);

  console.log(`Full page screenshot saved: ${outputPath}`);
  console.log(`Render time: ${response.headers.get('X-Screenshot-Time-Ms')}ms`);
}

captureFullPage('https://stripe.com/pricing', 'stripe-full.png');

Python

import requests

def capture_full_page(url, output_path):
    api_url = "https://screenshotapi-api-production.up.railway.app/v1/screenshot"
    params = {
        "url": url,
        "width": 1280,
        "fullpage": "true",
        "format": "png",
    }
    headers = {"Authorization": "Bearer YOUR_API_KEY"}

    response = requests.get(api_url, params=params, headers=headers)
    response.raise_for_status()

    with open(output_path, "wb") as f:
        f.write(response.content)

    print(f"Full page screenshot saved: {output_path}")

capture_full_page("https://stripe.com/pricing", "stripe-full.png")

Handling lazy-loaded content

Many modern websites use lazy loading -- images and content only load when you scroll to them. For full-page screenshots, you want all content loaded before capture.

ScreenshotAPI handles this automatically by scrolling through the page before capture. For pages with particularly slow lazy loading, use the wait parameter:

// Wait 3 seconds for lazy content to load
curl "https://screenshotapi-api-production.up.railway.app/v1/screenshot\
  ?url=https://example.com\
  &fullpage=true\
  &wait=3000" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o full-page.png

Controlling the output size

Full-page screenshots of long pages can be very large (10,000+ pixels tall). You have several options:

Option 1: Resize with output dimensions

Use output_width to create a thumbnail while maintaining the full page:

// Full page at 50% size
?url=https://example.com&fullpage=true&output_width=640

Option 2: Use WebP format

WebP produces significantly smaller files than PNG with comparable quality:

// WebP for smaller file size (Pro plan)
?url=https://example.com&fullpage=true&format=webp&quality=80

Option 3: JPEG with quality control

// JPEG at 70% quality for balance of size and clarity
?url=https://example.com&fullpage=true&format=jpeg&quality=70

Full page vs viewport: when to use which

Use caseFull pageViewport only
Social media previews-Best
Design reviewBest-
QA testingBest-
Link previews-Best
ArchivingBest-
Thumbnails-Best

Pricing for full-page screenshots

Full-page screenshots count as a single screenshot regardless of page length. A 10,000-pixel tall capture uses the same quota as a 800-pixel viewport screenshot.

Try it now

Test full-page capture in the playground -- check the "Full page" option and capture any URL. No API key needed for the demo.

Try Full Page Capture

Related articles