URL2PNG’s v6 API can be called from Python by URL-encoding the request parameters, creating an MD5 token from that exact encoded query string plus your secret, and placing the API key and token in the request path. The example below builds the signed URL with Python’s standard library; it returns a URL you can open or pass to an HTTP client to download the screenshot.
What you need before making a request
- A URL2PNG API key and secret from your account. The key identifies the account; the secret is used to sign requests. Keep the secret in server-side configuration or an environment variable rather than exposing it in client-side code.
- Python 3, with no third-party packages needed for URL construction and signing.
- A target page URL and the capture options you want to use.
The v6 authentication format and Python example are documented in the URL2PNG Quickstart Guide. Use the provider’s SSL endpoint where it is available for your account or plan; the plans page lists SSL as a feature: URL2PNG plans.
Build and sign a URL2PNG request in Python
This runnable example uses the standard-library urllib.parse and hashlib modules. Set the two environment variables before running it. It prints the signed PNG URL; it does not download the image.
import hashlib
import os
from urllib.parse import urlencode
API_KEY = os.environ["URL2PNG_API_KEY"]
SECRET = os.environ["URL2PNG_SECRET"]
params = {
"url": "https://example.com/",
"fullpage": "true",
"thumbnail_max_width": 800,
"unique": "20261003-001",
"viewport": "1280x1024",
}
# Encode once, then use this identical string for signing and transmission.
query_string = urlencode(params)
token = hashlib.md5((query_string + SECRET).encode("utf-8")).hexdigest()
request_url = f"https://api.url2png.com/v6/{API_KEY}/{token}/png/?{query_string}"
print(request_url)
Replace https://example.com/ with the page to capture. The URL path follows the documented v6 pattern: API key, token, then /png/? and the encoded parameters. The token is the lowercase MD5 hex digest of the encoded query string followed by the secret.
#1 Best Overall
- 14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
Why the exact query string matters
Sign the query string that you actually send. URL encoding changes how values such as spaces and punctuation are represented, and changing parameter order or encoding after generating the token can cause authentication to fail. This example computes query_string once and appends that same string to the request URL.
Do not rebuild the query with a second encoding step or add, remove, or reorder parameters after signing. If you add a parameter, add it to params before calling urlencode.
Send boolean and zero values deliberately
The URL2PNG quickstart’s Python example filters falsey values when building parameters. That can accidentally omit explicit values such as fullpage=False or delay=0. In the example above, values are included as supplied, so an explicit false setting can be sent as a string:
Rank #2
- 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
- 4GB DDR4 System Memory; 128GB Solid State Drive
- 11.6" HD (1366 x 768) Multi-Touch Display
- Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
- Windows 11 Pro
params["fullpage"] = "false"
Choose the provider’s accepted spelling for each option and keep it in the signed query string. Do not rely on Python truthiness to decide whether an option should be transmitted.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallDownload the screenshot bytes
The signed URL can be retrieved with an HTTP client. For example, install requests with python -m pip install requests, then use:
import requests
response = requests.get(request_url, timeout=90)
response.raise_for_status()
with open("screenshot.png", "wb") as image_file:
image_file.write(response.content)
This download step assumes the API returned a successful image response. Check the response status and content before treating the body as an image; an unsuccessful API response may instead contain diagnostic text or an error page.
Rank #3
- 256 GB SSD of storage.
- Multitasking is easy with 16GB of RAM
- Equipped with a blazing fast Core i5 2.00 GHz processor.
Choose the capture options that match the page
URL2PNG’s quickstart describes these relevant v6 parameters and behaviors:
| Parameter | Purpose and documented behavior |
|---|---|
fullpage |
Set to true to ask for the entire document canvas. The documented default is viewport-only (false). |
viewport |
Sets the viewport dimensions. The advanced-options documentation gives an API default of 1480x1037. The sample Python function uses 1280 by 1024 as its own default, which is a sample choice, not the API default. |
thumbnail_max_width |
Constrains the rendered screenshot width. |
unique |
Varies the request identity to request a fresh screenshot rather than reuse cached output. The docs suggest a timestamp. |
custom_css_url |
Injects CSS loaded from a URL. |
say_cheese |
Delays capture until a named element is available. |
delay |
Adds a fixed delay after document readiness and assets load. |
accept_languages |
Customizes the accepted language header. |
user_agent |
Customizes the user-agent header. |
ttl |
Sets screenshot time to live. The documented default is 2,592,000 seconds (30 days). |
See the Quickstart Guide for the full documented parameter syntax. If the capture must reflect current page content, use a changing unique value; otherwise a cached result may be returned.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Cache behavior, usage, and plans
According to URL2PNG’s plans FAQ, a newly generated screenshot counts as one render, while loading a cached screenshot does not count against the plan. The FAQ says screenshots are cached for 30 days by default and that the TTL can be adjusted. This means request volume and billable fresh-render volume may differ when the same request is served from cache.
Rank #4
- EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
- 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
- RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
- ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
- LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.
The following are vendor-listed monthly plan details on the URL2PNG plans page, checked October 3, 2026. Pricing and allowances can change; confirm the current terms before budgeting.
| Plan | Monthly fresh screenshots | Monthly price | Additional screenshot price | Workers | Support |
|---|---|---|---|---|---|
| Bootstrapped | 5,000 | $29 | $0.006 each | 10 | |
| Traction | 20,000 | $99 | $0.005 each | 15 | |
| Killinit | 50,000 | $199 | $0.004 each | 35 | Priority |
| Enterprise | Unlimited workers and screenshots listed | Contact-based details | Not stated | Unlimited | Premium support; annual billing listed |
These are URL2PNG’s published figures, not independent pricing estimates. The same page lists SSL endpoint availability as a feature. Source: URL2PNG plans.
Or skip the browser setup
If you need a screenshot without building and maintaining the capture request yourself, ScreenshotNeo provides a one-request screenshot API and an MCP server for AI agents. Its API can return PNG, JPEG, WebP, or PDF output.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
- 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
- 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
- CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
- LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
cURL example (see the ScreenshotNeo API documentation 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
ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing status in headers. An MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting common request problems
Authentication or invalid-token response
- Confirm that the token uses the complete URL-encoded query string followed by the secret, with no separator inserted between them.
- Make sure the encoded query in the URL is exactly the one used to calculate the token.
- Check that the API key and secret belong together and that the secret has not been accidentally trimmed or replaced.
Unexpected default capture or missing option
- Check that the option appears in the final query string, not just in the Python dictionary.
- Avoid filtering parameters by truthiness if you need to transmit explicit false or zero values.
- Remember that viewport-only capture is the documented default; set
fullpage=truewhen you want the full document canvas.
Old screenshot returned
The plans FAQ describes caching, with a 30-day default TTL. To request a new capture, vary unique (for example, use a timestamp) and sign the updated query string again.
Screenshot is cut off or content is missing
- Set the viewport intentionally; the API documentation’s default is 1480×1037, while the sample function’s 1280×1024 is merely its own default.
- For a page whose content appears after initial readiness, use
say_cheeseto wait for a named element ordelayto add a fixed post-readiness wait. - For content that extends beyond the viewport, request full-page capture.
Python raises an environment-variable error
os.environ["URL2PNG_API_KEY"] and os.environ["URL2PNG_SECRET"] raise an error if the variables are not set. Define both in the process environment, or replace those lines with a secure server-side configuration source. Avoid committing the secret to a repository.
Security and operational notes
- Keep the signing secret on a trusted server. Anyone who obtains it can create signed requests under the associated account.
- Use the SSL endpoint where it is available for your plan so the request is sent over HTTPS.
- Use an explicit timeout when downloading images, and handle HTTP errors instead of saving every response body as a PNG.
- Account for cache hits separately from fresh renders when estimating usage, since URL2PNG says cached loads do not count as new renders.
Frequently Asked Questions
Does URL2PNG’s Python example download the screenshot?
No. The documented Python snippet constructs and returns the request URL; use an HTTP client such as Requests to retrieve the image bytes.
Can I use Python’s standard library for signing?
Yes. The v6 signing example uses the standard-library `urllib.parse` and `hashlib` modules.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




