How to Capture a Website After It Finishes Loading with URL2PNG
Use URL2PNG’s fixed delay or page-ready marker to capture content after it loads. Learn how signing, capture size, caching, and troubleshooting affect the result.
To capture a website after it finishes loading with URL2PNG, add the delay option to wait a fixed number of seconds after document readiness and asset loading, or use say_cheese=true to wait for a page element with the ID url2png-cheese. Use a delay when a stable settling interval is enough. Use the marker when you control the page and can signal when the content you need is ready. Neither option guarantees that every animation, third-party widget, or lazy-loaded element has finished. See the URL2PNG Quickstart Guide for the documented request semantics.
1. Choose how URL2PNG should know the page is ready
A browser reaching document readiness is not necessarily the same as an application reaching its useful visual state. A client-rendered chart, asynchronously loaded data, or an animation may still be changing after the initial page and assets are ready.
| Method | How it works | Best fit | Tradeoff |
|---|---|---|---|
delay |
Waits a fixed number of seconds after document readiness and asset loading. | You cannot change the target page, and a predictable settling time is sufficient. | It is a time-based heuristic: short waits can capture too early, while long waits add latency. |
say_cheese=true |
Waits until an element with ID url2png-cheese is available. |
You control the page and can add a marker when the relevant content is ready. | It requires a page-specific readiness signal. The documentation does not promise that unrelated content is also finished. |
2. Add a fixed delay
For example, add delay=2 to request a two-second wait. This is an illustrative value, not a universal setting. Adjust it based on the page’s behavior and the content that must appear in the screenshot.
https://api.url2png.com/v6/P_API_KEY/P_TOKEN/https://example.com?delay=2
URL2PNG v6 signs requests using the API key and a token computed from the full query string and secret key. The example above shows the shape of the request, not a usable token. Generate a valid signature on a trusted server; do not put the secret key in browser-visible code. When you change delay or another query option, generate the token for the resulting query string.
3. Use a page-ready marker for variable load times
If you can modify the page being captured, make it expose the documented marker when the content you care about is ready:
<div id="url2png-cheese"></div>
Then request the screenshot with say_cheese=true:
https://api.url2png.com/v6/P_API_KEY/P_TOKEN/https://example.com?say_cheese=true
Place or reveal the marker only after the target content is ready for capture. If you cannot add page code, use delay. As with the fixed wait, sign the complete query string on your server. A marker signals the condition your page implements; it does not automatically establish that every external widget, animation, or below-the-fold image is complete.
4. Keep readiness separate from capture size and cache settings
These options affect what image you get or whether URL2PNG reuses a capture. They do not wait for application content to finish rendering.
| Option | Documented behavior | When to use it |
|---|---|---|
fullpage=true |
Attempts to capture the entire document canvas. The documented default is viewport-only. | Use when the screenshot should include content beyond the visible browser area. |
viewport |
Sets browser dimensions. The Quickstart lists 1480×1037 as the default and a maximum of 5000×5000 in its examples. | Choose dimensions that match the layout you need to inspect. |
thumbnail_max_width |
Scales the resulting image to the requested width; no scaling is the documented default. | Use when you need a smaller output image. Scaling does not change when the page is ready. |
unique |
Varying this value requests a fresh screenshot; the guide suggests a timestamp and shows an hourly uniqueness example. | Use when the page may have changed and cached output is not wanted. |
ttl |
Sets screenshot cache lifetime. The documented default is 2,592,000 seconds (30 days). | Choose a lifetime suitable for how often the target changes and whether reuse is acceptable. |
URL2PNG’s product page also advertises user-agent and language overrides, CSS injection, full-height capture, and a JavaScript-controlled shutter. Check the current documentation for their request syntax and limits. Do not treat viewport, scaling, or cache options as readiness controls.
5. Sign requests safely
- Build the full request, including the target URL and every option such as
delay,say_cheese,viewport, orfullpage. - Compute the URL2PNG v6 token using the API key, secret key, and full query string as specified in the Quickstart Guide.
- Return or use the signed request from trusted server-side code. Keep the secret key out of browser JavaScript, public pages, and client apps.
- If any signed parameter changes, compute a new token for that request.
A signature made for one option set should not be reused after changing the query. URL encoding also matters: encode query values according to the provider’s documented signing procedure.
6. Tune the capture without guessing blindly
- Start with the page’s ordinary load behavior and identify the visual element that must be present.
- If you control the page, signal readiness with
url2png-cheeseafter that element is ready. - If you cannot alter the page, try a short fixed
delay, then inspect the output and adjust it to the observed page behavior. - Set viewport and full-page behavior independently so the requested capture area matches your goal.
- Decide whether cached output is acceptable. Vary
uniquewhen you require a fresh capture, and setttlfor your cache needs.
There is no documented cross-site delay that works for every site. A value that is enough for one page may be too short for another, and a longer delay costs time without proving that all asynchronous activity has stopped.
7. Troubleshoot common results
| Symptom | Likely cause | What to check |
|---|---|---|
| The screenshot misses content that appears later. | The capture happened before that content was ready. | Increase delay as a measured adjustment, or add the documented marker after the relevant content becomes ready. |
| The request waits for the marker but does not reach the intended capture point. | The page did not expose the exact expected element, or did not expose it on the rendered page. | Confirm the element ID is exactly url2png-cheese and that the target page creates it in the state URL2PNG captures. |
| A request fails after an option was changed. | The token may have been computed for a different query string. | Regenerate the token using the full updated request and the documented signing process. |
| The image has the wrong dimensions or cuts off content. | Viewport capture, full-page capture, or output scaling does not match the intended result. | Review viewport, fullpage, and thumbnail_max_width separately from readiness. |
| The screenshot looks unchanged after the page changed. | A cached capture may be reused within its TTL. | Vary unique to request a fresh image, or review the ttl setting. |
| The screenshot still misses a third-party widget or animation state. | The chosen delay or marker only represents a limited readiness condition; neither guarantees all asynchronous activity is complete. | Signal the specific state you need when you control the page, or adjust the delay and verify the resulting capture. |
8. Performance, reliability, and cost considerations
A fixed delay adds that waiting interval to capture time, so using an unnecessarily long value can slow a batch of captures. A page marker can avoid choosing one fixed interval for pages with variable load time, but it depends on the page exposing the right element. The cited URL2PNG documentation describes these controls but does not provide an optimal delay, a completeness guarantee, or a benchmark.
Cache behavior is a separate reliability and freshness decision. URL2PNG documents a 30-day default TTL; reuse can mean an older image remains available, while changing unique requests a fresh capture. Choose based on whether repeatability or current page state matters for your workflow. Check URL2PNG’s current pricing and service terms directly for cost details; the cited technical sources do not establish a price for a particular request.
9. Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. It accepts one GET request for a PNG, JPEG, WebP, or PDF capture. Cookie banners are accepted and removed before the shot, along with more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response reports the page verdict and billing status in headers.
For a quick capture, adapt this cURL call with your API key and target URL. See the ScreenshotNeo API docs for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The same endpoint can be called from Python:
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
Or from Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', new Uint8Array(await res.arrayBuffer()));
ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. Plans include 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000, and every feature is available on every plan. Sign up free and get 1,000 screenshots a month with no card.
10. FAQ
Does URL2PNG wait for every JavaScript request?
The documented controls are a fixed delay after document readiness and asset loading, or a page element used as a shutter signal. The docs do not say that either waits for every JavaScript request or third-party activity.
Can I use the page-ready marker if I do not own the website?
Only if the target page already provides the required element. Otherwise, use a fixed delay or another capture approach whose readiness controls fit your access to the page.
Does fullpage=true make URL2PNG wait longer?
It changes the capture scope to attempt the full document canvas. It is not documented as a readiness setting.
Is two seconds the recommended delay?
No. It is an example value from the guide. Choose based on the specific page and confirm the result.


