Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

URL2PNG’s v6 API can be called from Python by URL-encoding the capture parameters, signing that exact query string with your account secret, and requesting a URL whose path contains your API key and signature. The official example uses Python’s standard library; the function below returns the screenshot URL, which you can then fetch as image bytes.

What you need before calling URL2PNG

  • A URL2PNG API key and secret from your account. The key identifies your account; the secret is used to sign requests. See the URL2PNG Quickstart Guide.
  • Python 3 with its standard-library urllib.parse and hashlib modules.
  • An HTTPS endpoint if available for your account or plan; URL2PNG lists SSL access as a plan feature on its plans page.

Keep the secret in server-side configuration, such as an environment variable, rather than in source code committed to a repository. That is prudent credential handling because the secret authorizes request signing.

Build and sign the request in Python

For v6, URL2PNG’s token is the lowercase hexadecimal MD5 digest of the URL-encoded query string followed by the secret. The query string used to calculate the token must be identical to the one sent in the request—including parameter order, values, and percent encoding.

import hashlib
from urllib.parse import urlencode

API_KEY = "YOUR_API_KEY"
API_SECRET = "YOUR_API_SECRET"

params = {
    "url": "https://example.com",
    "fullpage": "true",
    "thumbnail_max_width": 1200,
    "unique": 0,
    "viewport": "1280x1024",
}

# Encode once, then use this exact string for signing and transmission.
query_string = urlencode(params)
token = hashlib.md5((query_string + API_SECRET).encode("utf-8")).hexdigest()

image_url = f"https://api.url2png.com/v6/{API_KEY}/{token}/png/?{query_string}"
print(image_url)

This produces the signed screenshot URL; it does not download the image. The documented v6 path shape is /v6/{api_key}/{token}/png/?{query_string}. Use the endpoint and path specified in your URL2PNG account documentation if its current instructions differ.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Download the screenshot bytes

To save the returned image, make a second request to the generated URL. This standard-library example also checks for an HTTP error before writing the file:

from urllib.request import urlopen
from urllib.error import HTTPError, URLError

try:
    with urlopen(image_url, timeout=90) as response:
        image_bytes = response.read()
    with open("screenshot.png", "wb") as output:
        output.write(image_bytes)
except HTTPError as exc:
    raise RuntimeError(f"URL2PNG returned HTTP {exc.code}: {exc.reason}") from exc
except URLError as exc:
    raise RuntimeError(f"Could not reach URL2PNG: {exc.reason}") from exc

Choose an output extension that matches the format you requested. The example path uses /png/, so it writes a PNG.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Keep false values when they matter

Do not discard parameters merely because their values are false-like. For example, fullpage=False may be intentionally sent to request a viewport capture; filtering false values out would omit the parameter. The safest approach is to serialize once and use the resulting string both for the signature and the request, as above.

Choose capture parameters deliberately

Parameter Purpose and guidance
fullpage Set to true to ask for a full-document capture. The documented default is viewport-only (false).
viewport Sets the viewport dimensions. The advanced-options documentation gives an API default of 1480x1037. A Python sample function uses 1280x1024 as its own default; that sample default is not the API default.
thumbnail_max_width Limits the rendered screenshot width.
unique Changes request identity to force a fresh screenshot instead of reusing a cached result. The docs suggest a timestamp; provide a changing value for each capture that must be unique.
custom_css_url Loads custom CSS from a URL for the rendered page.
say_cheese Waits until a named element is available before capturing.
delay Adds a fixed delay after document readiness and asset loading. Use it when the page needs additional time to settle.
accept_languages, user_agent Customize the request language and user-agent values.
ttl Sets screenshot time to live. The documented default is 2,592,000 seconds (30 days).

Consult the official quickstart and advanced options for supported formats and parameter details. The complete set of parameters must be assembled before signing; adding or changing one afterward invalidates the signature.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Cache behavior, usage, and plan costs

URL2PNG’s plans FAQ says a newly generated screenshot counts as one render, while loading a cached screenshot does not count against the plan. The FAQ also says screenshots are cached for 30 days by default and that the TTL can be adjusted. Use unique only when a new render is needed; a unique value changes the request identity and can bypass reuse of the cached image.

The following vendor-listed plan figures were checked on October 3, 2026. Prices and allowances can change, so confirm them on the URL2PNG plans page before budgeting.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Plan Monthly price Fresh screenshots included Additional screenshot price Workers Support
Bootstrapped $29/month 5,000 $0.006 each 10 Email
Traction $99/month 20,000 $0.005 each 15 Email
Killinit $199/month 50,000 $0.004 each 35 Priority
Enterprise Contact-based details Unlimited, as listed Not stated on the plans page Unlimited workers Premium support; annual billing listed

These are vendor-published plan terms, not an independent price comparison. A cache hit and a fresh render affect usage differently, so estimate volume using the number of genuinely new captures rather than every request your application makes.

Troubleshooting common request problems

Authentication or signature errors

  • Cause: The query string changed after the token was calculated, or the transmitted parameter order or encoding differs.
  • Fix: Call urlencode once, build the digest from that exact string, and append that same string to the request URL without rebuilding it.
  • Also check: The API key and secret are from the same account, and there is no whitespace accidentally included in either credential.

A false or zero option seems to be ignored

  • Cause: A helper filters falsey values and omits values such as False or 0.
  • Fix: Keep parameters whose values you intend to send; encode them explicitly as strings if necessary. Do not alter the parameter set between signing and sending.

The image is not fresh

  • Cause: The request is being served from cache under the same request identity.
  • Fix: Include a new unique value, such as the current timestamp, when a fresh render is required. Remember that a fresh render counts as a render according to the plans FAQ.

The capture is cropped or misses content

  • Cause: The default is viewport-only, the viewport is too small, or page content has not appeared when capture occurs.
  • Fix: Set fullpage=true for a full-document capture, choose an appropriate viewport, and use say_cheese or delay if the page needs additional time or a specific element to load.

The request times out or returns an HTTP error

  • Cause: Connectivity trouble, an unavailable endpoint, invalid request parameters, or a target page that does not finish loading can all prevent a usable response.
  • Fix: Inspect the HTTP status and response details, verify the endpoint and parameters against the account’s current documentation, and retry transient network failures with a bounded retry policy. Avoid logging the full signed URL if it exposes credentials or sensitive target URLs.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

Instead of assembling a URL2PNG signature and downloading the result, ScreenshotNeo accepts a single GET request with the target URL. Replace the example URL with the page you need to capture. See the ScreenshotNeo API documentation for request options.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
  • Cookie banners are accepted and removed before capture, along with known newsletter popups and chat widgets; each cleanup 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.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
  • The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo’s free plan.

Frequently Asked Questions

Does URL2PNG’s Python quickstart download the screenshot file?

No. It constructs and returns the signed image URL; make a separate HTTP request to retrieve and save the image bytes.

What is the documented default URL2PNG cache TTL?

The quickstart lists 2,592,000 seconds, or 30 days.

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.