A viewport screenshot only captures what's visible on screen — typically the first 720-1080 pixels. But most web pages are much longer. Landing pages can be 5,000-15,000 pixels tall. Documentation pages, product listings, and dashboards often stretch even further. A full page screenshot captures everything from the top of the page to the very bottom, including all content that requires scrolling.
This is essential for visual archiving, compliance documentation, design review, competitor monitoring, and QA testing. Here's how to capture full page screenshots in every major language and framework.
Playwright — Full Page Screenshot
import { chromium } from 'playwright';
const browser = await chromium.launch();
const page = await browser.newPage();
await page.setViewportSize({ width: 1280, height: 720 });
await page.goto('https://example.com', { waitUntil: 'networkidle' });
// The key option: fullPage: true
await page.screenshot({
path: 'full-page.png',
fullPage: true, // Captures the ENTIRE scrollable page
type: 'png',
});
await browser.close();
- Lazy-loaded images: Images below the fold may not load until scrolled into view. You need to scroll the page first or inject CSS to force-load all images.
- Infinite scroll: Pages like Twitter or Pinterest load more content as you scroll. Full page screenshots will only capture what's loaded at capture time.
- Fixed/sticky elements: Navigation bars and floating buttons appear multiple times in full page screenshots. Use CSS injection to hide them.
- Memory limits: Very tall pages (20,000+ pixels) can cause Chromium to run out of memory.
Handling Lazy-Loaded Content
// Scroll to bottom to trigger lazy loading
async function scrollToBottom(page) {
await page.evaluate(async () => {
await new Promise((resolve) => {
let totalHeight = 0;
const distance = 500;
const timer = setInterval(() => {
window.scrollBy(0, distance);
totalHeight += distance;
if (totalHeight >= document.body.scrollHeight) {
clearInterval(timer);
window.scrollTo(0, 0); // Scroll back to top
resolve();
}
}, 100);
});
});
}
await page.goto(url, { waitUntil: 'domcontentloaded' });
await scrollToBottom(page);
await page.waitForTimeout(1000); // Let images finish loading
await page.screenshot({ path: 'full-page.png', fullPage: true });
Hiding Sticky Elements
// Inject CSS to hide fixed/sticky elements
await page.addStyleTag({
content: `
* {
position: static !important;
}
[style*="position: fixed"],
[style*="position: sticky"],
nav, header {
position: relative !important;
}
`
});
API Approach — One Parameter
With a screenshot API, full page capture is a single parameter. No scrolling logic, no lazy-load handling, no sticky element issues — the API handles all of it:
// SnapAPI — full page screenshot in one request
const response = await fetch('https://api.snapapi.pics/v1/screenshot', {
method: 'POST',
headers: {
'X-Api-Key': 'sk_live_your_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://example.com/pricing',
full_page: true, // Captures entire scrollable page
format: 'png',
width: 1280,
block_ads: true, // Remove ad banners
}),
});
const screenshot = Buffer.from(await response.arrayBuffer());
fs.writeFileSync('full-page.png', screenshot);
Full Page + Device Emulation
// Full page screenshot on mobile device
const response = await fetch('https://api.snapapi.pics/v1/screenshot', {
method: 'POST',
headers: {
'X-Api-Key': 'sk_live_your_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://example.com/pricing',
full_page: true,
device: 'iphone-15-pro', // Mobile full page capture
block_ads: true,
}),
});
Python Example
import requests
response = requests.post(
'https://api.snapapi.pics/v1/screenshot',
headers={'X-Api-Key': 'sk_live_your_key_here'},
json={
'url': 'https://example.com/pricing',
'full_page': True,
'format': 'webp',
'width': 1440,
'block_ads': True,
}
)
with open('full-page.webp', 'wb') as f:
f.write(response.content)
print(f"Full page screenshot: {len(response.content)} bytes")
Use Cases for Full Page Screenshots
- Visual archiving: Save complete snapshots of web pages for legal, compliance, or research purposes
- Design review: Capture entire page designs for stakeholder feedback
- Competitor monitoring: Track competitor landing page changes over time
- QA testing: Verify full page layouts across devices and browsers
- Content documentation: Create visual records of long-form content
- SEO auditing: Screenshot entire pages to review content structure and layout
Full Page Screenshots — One API Call
Capture entire web pages across 30+ devices. Handles lazy loading, sticky elements, and anti-bot automatically. 200 free requests/month.
Get Your Free API Key