Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

How to Call ScreenshotMachine from Python to Capture Web Pages

Use ScreenshotMachine’s Python URL-generation pattern to request and save web-page screenshots, with guidance on authentication, dimensions, caching, delays and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To capture a web page with ScreenshotMachine in Python, send its HTTP GET endpoint your customer key, target URL and any capture options, then save the returned image. ScreenshotMachine’s official Python example builds the request URL with its helper and saves the result using urllib.request.urlretrieve. The API parameters, defaults and limits below are those stated in ScreenshotMachine’s documentation; they are not independently tested results.

What you need before making the request

  • A ScreenshotMachine account and customer key, available from the account profile. Keep the key private, especially in code that will be published or run in a browser.
  • The full URL of the page to capture, including its scheme, such as https://example.com.
  • Python’s standard-library urllib modules. The vendor’s sample also relies on its URL-generation helper, so use the helper and imports from the official repository rather than assuming it is a built-in Python function.

ScreenshotMachine documents its API as an HTTP GET request to https://api.screenshotmachine.com/. The required query parameters are key and url. The API reference recommends percent-encoding the page URL.

Build and save a screenshot using the official Python pattern

The vendor’s sample generates an API URL from the customer key, an optional secret phrase and a dictionary of options, then retrieves the response into a local file. Its helper implementation and imports are part of the vendor repository; include those when adapting the sample.

import urllib.request

# Import or define generate_screenshot_api_url using the official
# ScreenshotMachine Python repository's helper implementation.
customer_key = "YOUR_CUSTOMER_KEY"
secret_phrase = ""  # Use the configured secret phrase, if applicable.
options = {
    "url": "https://example.com",
    "dimension": "1366x768",
    "device": "desktop",
    "cacheLimit": "0",
    "delay": "200",
    "zoom": "100",
}

api_url = generate_screenshot_api_url(customer_key, secret_phrase, options)
urllib.request.urlretrieve(api_url, "output.jpg")
print("Saved output.jpg")

This follows the vendor’s documented example shape; it is not a claim that the code was independently run against every site. Since the example does not itself show the helper’s import or implementation, copy that part from the vendor’s Python repository. The default format is JPG, so the example uses a .jpg filename; if you request another format, use the matching extension.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
  • Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
  • Built-In Mic: The built-in microphone lets others hear you clearly during video calls
  • Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works

Choose the capture options that fit the page

These are API parameters, not separate ScreenshotMachine products. The following defaults and bounds are vendor-documented values.

Option What it controls Documented values and behavior
dimension Viewport or output dimensions Use WIDTHxHEIGHT. Width range: 100–1920 pixels; height range: 100–9999 pixels. Use full for full-page height. Documented default: 120x90.
device Device profile desktop, phone or tablet; default: desktop.
format Image file type jpg, png or gif; default: jpg.
cacheLimit How long a cached capture may be reused 0–14 days; default: 14. Set it to 0 to request a fresh screenshot rather than a cached one. Decimal values are documented for periods shorter than a day.
delay Wait time before capture 0–10,000 milliseconds in the increments listed in the API reference; default: 200 ms. ScreenshotMachine recommends a longer delay, such as 2,000 ms or more, for full-page captures that need time for images or animations to load.
zoom Capture zoom 10–400 percent; default: 100. The vendor notes that zoom may be ignored for screenshots smaller than typical device dimensions.
click Click an element before capture Accepts a CSS selector. The API documentation gives dismissing a cookie banner as an example.
selector Limit the capture to a DOM element Use a CSS selector for the element to capture.
cookies, accept-language, user-agent Set cookies or alter request context Supply the required values as query parameters. Percent-encode cookies and values containing reserved characters.
crop Capture a rectangular region Specify x,y,width,height in pixels.

Viewport or full-page capture

Use a dimension such as 1366x768 when you want a fixed viewport. Choose full for the full page height. A long page may need more rendering time, so consider a longer delay when images or animation are part of the page.

Rank #2
Sale
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
  • The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
  • C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
  • The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.

Fresh capture or cache reuse

The default cacheLimit is 14 days. Set cacheLimit to 0 when the capture needs to reflect the page now rather than reuse a cached screenshot.

Cookie banners and other page controls

The documented click option can click a CSS selector before capture, including a cookie-banner dismissal control. Selectors depend on the target page’s markup; a selector that does not match the relevant element cannot perform the intended action.

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

Authentication and secret-phrase protection

The key parameter identifies your customer account. If you configure a secret phrase in account settings, the optional hash must be calculated as MD5 over the URL value concatenated with that phrase. ScreenshotMachine says requests with a missing or incorrect hash are ignored when a secret phrase is configured. Follow the vendor’s hashing instructions when using this option.

Rank #3
Sale
NexiGo N60 1080P Webcam with Microphone, Software Control & Privacy Cover, USB HD Computer Web Camera, Plug and Play, for Zoom/Skype/Teams, Conferencing and Video Calling
  • 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
  • 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
  • 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
  • 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
  • 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.

Do not put a secret phrase in public client-side code. ScreenshotMachine recommends the hash mechanism for direct calls from public HTML pages, but that does not make the secret phrase safe to expose; keep account credentials on a server you control.

Common problems and practical fixes

  • The request is ignored when a secret phrase is configured: check that the request includes the required hash and that it was calculated from the URL value concatenated with the configured phrase, as specified by ScreenshotMachine.
  • The captured page is missing images or animation: increase delay. For full-page captures, the vendor recommends considering 2,000 ms or more when those elements need time to load.
  • The wrong part of the page is captured: check whether dimension describes the intended viewport or whether you need full height. For a single element, review the CSS selector supplied to selector.
  • A click does not dismiss a banner: verify that the click selector matches the page’s actual control and that the target page presents that control in the capture context.
  • The saved file does not match its extension: match the output filename extension to format; ScreenshotMachine documents JPG, PNG and GIF, with JPG as the default.
  • Special characters in URLs, cookies or header-like values break the request: percent-encode the target URL and encode values with reserved characters as instructed in the API reference.
  • The image is not fresh: set cacheLimit to 0 to request a fresh screenshot instead of a cached one.

The vendor documentation establishes parameter options and sample usage, but does not establish a general latency, uptime, or success rate for arbitrary websites. Site-specific behavior can vary, and no response-handling or error guarantees should be inferred from the simple urlretrieve sample.

Rank #4
Sale
EMEET C960 1080P Webcam with Microphone, 2 Mics, 90° FOV, Computer Camera
  • 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
  • Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
  • Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
  • Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
  • High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you would rather call a screenshot service directly, ScreenshotNeo accepts a URL in one GET request and returns an image or PDF. For example, the following saves a WebP screenshot:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

See the ScreenshotNeo API documentation for request options. It removes cookie banners, newsletter popups and chat widgets before capture; bot checks, blank pages and failed loads are not billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for free.

Frequently Asked Questions

Can I capture a full web page rather than just the viewport?

Yes. Set ScreenshotMachine’s dimension to full for full-page height.

Best Value
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • HD lighting adjustment and autofocus: The Logitech webcam automatically fine-tunes the lighting, producing bright, razor-sharp images even in low-light settings. This makes it a great webcam for streaming and an ideal web camera for laptop use
  • Advanced capture software: Easily create and share video content with this Logitech camera that is suitable for use as a desktop computer camera or a monitor webcam
  • Stereo audio with dual mics: Capture natural sound during calls and recorded videos with this 1080p webcam, great as a video conference camera or a computer webcam
  • Full HD 1080p video calling and recording at 30 fps. You'll make a strong impression with this PC webcam that features crisp, clearly detailed, and vibrantly colored video

Which image formats does ScreenshotMachine document?

The API documentation lists JPG, PNG and GIF; JPG is the documented default.

Quick Recap

SaleBestseller No. 1
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
Compatible with Nintendo Switch 2’s new GameChat mode; Built-In Mic: The built-in microphone lets others hear you clearly during video calls
$35.80
SaleBestseller No. 2
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
Compatible with Nintendo Switch 2’s new GameChat mode
$16.89
Bestseller No. 5
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black
Logitech C920x HD Pro PC Webcam Full 1080p/30fps Video - Black
Compatible with Nintendo Switch 2’s new GameChat mode; Fully compatible with Windows 11
$69.99

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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.