ScreenshotNeo

BlogHow-to

How to Take a Full-Page Screenshot with URL2PNG

Use URL2PNG's fullpage=true option to capture beyond the viewport, sign the request securely, and tune rendering for pages that load late.

By the ScreenshotNeo team4 October 20267 min read

To capture a page beyond the visible browser viewport with URL2PNG, include fullpage=true in the request’s signed query string. URL2PNG documents this option as an attempt to capture the entire document canvas; the default is false, which captures only the viewport. You also need to sign the complete query string with your account secret. Keep that secret on a server you control, never in public browser code. URL2PNG’s quickstart and API options describe the request parameters and signing workflow.

1. Build and sign the URL2PNG request

The sequence is: choose the target URL, add fullpage=true, include any rendering options, generate the signature from the complete query string and secret using URL2PNG’s documented signing example, then request the resulting URL and save the image. The signature must correspond to the query string you actually send. If you change a parameter after signing, generate the signature again.

URL2PNG’s API examples use an account API key, a token, and a query string. The exact signing code depends on the language and the current URL2PNG quickstart. Follow that official example rather than guessing the signing algorithm or copying a hard-coded signature. Store the secret in an environment variable or server-side secret manager. The examples below leave signature creation as an explicit step because the supplied documentation does not specify a language-independent signing formula.

  1. Set your API key and secret in server-side configuration.
  2. Construct the complete query string with the target url, fullpage=true, and any desired options.
  3. Use URL2PNG’s official example to create the token/signature from that complete query string and secret.
  4. Request the signed URL from your server and save or stream the returned image.

2. Set the capture viewport when it matters

The viewport option sets the browser viewport used to render the page, using a value such as WIDTHxHEIGHT. URL2PNG’s advanced-options documentation gives 1480×1037 as a default, while its quickstart example shows a maximum of 5000×5000. The documentation also includes a 1280×1024 example, so do not infer one universal default from an example. Specify the viewport explicitly when layout width or responsive breakpoints matter, and consult the current documentation for accepted limits.

A full-page capture asks the service to capture beyond that viewport across the document canvas. A very tall page can still produce a large image, and the docs’ stated maximum viewport is not a guarantee that every long document will fit into one useful image. If the result is impractical, capture sections or use a PDF workflow instead.

3. Wait for content that appears late

Ordinary document readiness may not mean that a modern page has finished rendering. Use the options conditionally:

  • delay waits a fixed number of seconds after document readiness and asset loading. Use it when the page needs a known additional interval for client-side rendering or animation.
  • say_cheese=true tells URL2PNG to wait for a page readiness marker: a div whose id is url2png-cheese. Add that marker only when you control the target page and can make it appear after the content is ready.

These options address different cases: a delay is a time-based wait; the marker is a page-signaled wait. Avoid adding a long delay to every request when most pages are static, since it increases capture time without improving those captures.

4. Download the resulting image

After signing, request the generated URL and save or stream its image response. URL2PNG’s quickstart includes client examples, including writing a Node.js response stream to a file. Use the official examples for the language and signing method you deploy; do not expose the secret by generating signed requests in browser JavaScript.

Options at a glance

Option What it does When to use it
fullpage=true Attempts to capture the entire document canvas. The documented default is viewport-only. Use for a page-length capture rather than just the visible area.
viewport=WIDTHxHEIGHT Sets the browser viewport used to render the page. Set explicitly when the page’s responsive layout or rendered width matters.
delay Waits a fixed number of seconds after readiness and asset loading. Use when known late content needs extra time.
say_cheese=true Waits for a div with id url2png-cheese. Use when you control the page and can signal that rendering is complete.
unique Forces a fresh screenshot when varied, instead of reusing a cached result. Use when the page changed and a cached screenshot is stale.

Common problems and fixes

Symptom Likely cause Fix
Only the visible area appears fullpage=true is missing from the signed request, or the query string changed after signing. Include the parameter before signing, then sign and send the same complete query string.
The page renders at the wrong width or layout The viewport differs from the intended responsive breakpoint. Set viewport=WIDTHxHEIGHT explicitly and check the current documented limits.
Content or images are missing The page’s client-side rendering or assets were not ready when capture began. Try a suitable delay; if you control the page, use the documented marker with say_cheese=true.
The image is stale A cached screenshot is being reused. Vary the unique parameter to force a fresh screenshot. URL2PNG’s plans FAQ says cached screenshots are kept for 30 days; check its current plan details for billing behavior.
The signed request is rejected The signature may not match the query string, or a parameter was changed after signature generation. Rebuild the full query string and regenerate the signature using the official quickstart’s method. Keep the secret private.
A very tall capture is too large or unwieldy The page’s document canvas produces a large image; the documented viewport maximum does not promise unlimited full-page output. Capture smaller sections or choose a format/workflow suited to long documents.

Performance, freshness, and cost

Full-page capture can take longer and return more image data than viewport capture, especially on long pages. Add only the wait option needed for the page, and choose a viewport that matches the layout you need. A fixed delay trades extra waiting for a chance to include late content; a readiness marker can avoid guessing a fixed wait when you control the page.

URL2PNG’s plans page says cached screenshots are retained for 30 days, cached loads do not count against the plan, and fresh generated screenshots count as renders. Varying unique forces a fresh capture, so use it when freshness matters rather than on every request by default. Pricing and plan allowances can change; check the [URL2PNG plans page](https://url2png.com/pricing) before choosing a plan.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a screenshot or PDF. Its clean-shot flow accepts cookie and consent banners like a visitor, then removes more than 60 known consent platforms plus newsletter popups and chat widgets before capture. Each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

For a full-page image, add full_page=true to the API request. See the ScreenshotNeo API documentation for parameter details.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com --data-urlencode full_page=true -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com", "full_page": "true"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com', full_page: 'true' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`ScreenshotNeo returned ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo includes full-page capture with lazy images loaded, and its other available options include element capture, viewport and device presets, retina scale, custom CSS or JavaScript, selector waits, delay or network-idle waits, request blocking, headers and cookies, caching with a chosen TTL, and async jobs. Free includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. The same features are available on every plan.

Sign up for 1,000 free screenshots a month, with no card required.

FAQ

Does URL2PNG capture the full page by default?

No. Its documented default is viewport-only. Include fullpage=true.

Do I need to control the target site to use URL2PNG?

No. The readiness marker is only useful when you control the page; a fixed delay is the documented alternative for pages that render late.

Does the viewport maximum guarantee a successful full-page image?

No. The 5000×5000 maximum appears in a quickstart example, and the docs say URL2PNG will attempt to capture the document canvas. Check current limits and verify the returned image for unusually tall pages.

Can I expose the URL2PNG secret in frontend code?

No. Generate the signed request server-side so visitors cannot retrieve your secret.