Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
You can process multiple URLs with ScreenshotMachine by looping over a URL list and making one screenshot API request per URL. ScreenshotMachine’s documented API guide describes a single url parameter for each call, not a multi-URL batch endpoint. The script below is client-side batch automation: it reads URLs from a file, requests screenshots sequentially, checks each response for an API error, and saves successful results separately.
What ScreenshotMachine supports for multiple URLs
ScreenshotMachine documents an HTTP GET screenshot API at https://api.screenshotmachine.com. A request includes your API key and one target url. Its documented request shape does not establish that one call can accept multiple target URLs. To handle a list, your code must make a separate request for each URL.
This is client-side batch automation, not a vendor-documented bulk endpoint. The reviewed documentation does not establish a maximum list size, a concurrency allowance, or a rate limit. For a large job, check your current account terms with ScreenshotMachine before running it; begin with sequential requests rather than assuming parallel requests are supported.
Prepare the URL list and Python environment
Create a plain-text file named urls.txt, with one complete URL on each line:
#1 Best Overall
https://example.com/
https://www.iana.org/domains/reserved
https://www.wikipedia.org/
Install the Python requests package if it is not already available:
python -m pip install requests
Keep your ScreenshotMachine key in an environment variable instead of putting it in a script you might share or commit. In a Unix-like shell, set it for the current session with:
export SCREENSHOTMACHINE_KEY='YOUR_API_KEY'
In PowerShell, use:
$env:SCREENSHOTMACHINE_KEY = 'YOUR_API_KEY'
Run a sequential capture script
Save this as capture_urls.py. It sends one GET request per nonblank line, asks for a full-page PNG, and writes each successful image using its list position and hostname. The API documentation describes dimensions, format, and full-page capture as request options; use the parameters relevant to your job.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- Intuitive interface of a conventional FTP client
- Easy and Reliable FTP Site Maintenance.
- FTP Automation and Synchronization
import os
import re
from pathlib import Path
from urllib.parse import urlparse
import requests
API_ENDPOINT = "https://api.screenshotmachine.com"
URLS_FILE = Path("urls.txt")
OUTPUT_DIR = Path("screenshots")
api_key = os.environ.get("SCREENSHOTMACHINE_KEY")
if not api_key:
raise SystemExit("Set SCREENSHOTMACHINE_KEY before running this script.")
if not URLS_FILE.is_file():
raise SystemExit(f"URL list not found: {URLS_FILE}")
urls = [line.strip() for line in URLS_FILE.read_text(encoding="utf-8").splitlines()
if line.strip() and not line.lstrip().startswith("#")]
if not urls:
raise SystemExit("urls.txt has no URLs to capture.")
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
with requests.Session() as session:
for index, page_url in enumerate(urls, start=1):
parsed = urlparse(page_url)
if parsed.scheme not in ("http", "https") or not parsed.hostname:
print(f"SKIP {index}: not a valid HTTP(S) URL: {page_url}")
continue
host = re.sub(r"[^A-Za-z0-9.-]+", "_", parsed.hostname)
output_path = OUTPUT_DIR / f"{index:04d}_{host}.png"
params = {
"key": api_key,
"url": page_url,
"dimension": "full",
"format": "png",
}
try:
response = session.get(API_ENDPOINT, params=params, timeout=120)
response.raise_for_status()
except requests.RequestException as exc:
print(f"FAIL {index}: {page_url}: {exc}")
continue
api_error = response.headers.get("X-Screenshotmachine-Response")
if api_error:
print(f"FAIL {index}: {page_url}: API reported {api_error}")
continue
content_type = response.headers.get("Content-Type", "").lower()
if not content_type.startswith("image/"):
print(f"FAIL {index}: {page_url}: unexpected Content-Type {content_type!r}")
continue
output_path.write_bytes(response.content)
print(f"OK {index}: {page_url} -> {output_path}")
Run it from the directory containing urls.txt:
python capture_urls.py
The script creates a screenshots directory and continues to later URLs when an individual URL is invalid or a request fails. It uses a 120-second client timeout; that is a script setting, not a stated ScreenshotMachine processing guarantee.
Choose capture settings for the pages
ScreenshotMachine’s API guide lists these request options. The default dimension is 120×90 and the default format is JPG, so set the values explicitly when those defaults are not suitable. The example script uses dimension=full and format=png.
| Option | What it controls | Documented details |
|---|---|---|
dimension |
Image width and height, or full-page capture | Use [width]x[height]; width is 100–1920 pixels and height is 100–9999 pixels. full is accepted for a full-length webpage. Default: 120×90. |
format |
Output image format | JPG, PNG, or GIF. Default: JPG. |
device |
Rendering device | Changes the rendering device; consult the vendor’s current guide for accepted values. |
delay |
Wait before creating the capture | Use when a page needs additional time to render. |
zoom |
Page scale | Changes the scale used for the page. |
cacheLimit |
Cache policy | Controls the cache setting for the request. |
selector |
Element capture | Captures a DOM element instead of the whole page. |
click |
Page interaction before capture | Can activate a CSS-selected element before the screenshot. |
crop |
Pixel-region capture | Captures a specified pixel rectangle; use the API guide’s required syntax. |
cookies |
Cookies sent with the request | Provide semicolon-separated name/value pairs and percent-encode reserved characters. |
accept-language |
Language preference | Sets the request’s language preference. |
user-agent |
Browser identification string | Sets the user-agent value for the capture. |
The vendor’s screenshot generator separately exposes device type, width and height, full-page capture, zoom, and image format if you want to inspect those choices before building requests. Parameter names and accepted values can be account- or documentation-version-sensitive; check ScreenshotMachine’s current API guide rather than guessing at syntax for options such as crop, cookies, or device.
Rank #3
Use cURL for a single URL or adapt it for a loop
This cURL command demonstrates one request. The URL is encoded as a query parameter by --data-urlencode, avoiding manual encoding errors. Repeat the command with a different target URL and output filename for each item, or use the Python loop above.
curl -G "https://api.screenshotmachine.com"
--data-urlencode "key=YOUR_API_KEY"
--data-urlencode "url=https://example.com/"
--data-urlencode "dimension=full"
--data-urlencode "format=png"
-o example.png
Do not place a real API key in a public webpage or repository. ScreenshotMachine’s guide describes a hash safeguard for calls made from public HTML: the hash is an MD5 value formed from the URL and a configured secret phrase. When that phrase is configured, requests with a missing or incorrect hash are ignored. Keep the phrase secret and follow the vendor’s current instructions for generating the hash.
Check errors instead of trusting every saved file
An HTTP response may contain an error image rather than a usable screenshot. ScreenshotMachine documents a custom X-Screenshotmachine-Response header for API errors. The script checks for that header, checks the HTTP status, and verifies that the content type is an image before saving.
Rank #4
| Reported error | What to check |
|---|---|
missing_key, invalid_key |
Confirm the key is present, copied correctly, and valid for the account. |
missing_url, invalid_url |
Check that each line contains a complete, valid URL, including its http:// or https:// scheme. |
invalid_hash |
If using the public-HTML safeguard, regenerate the hash using the configured secret phrase and the required URL value. |
no_credits |
Review account credits and current plan terms before rerunning the job. |
invalid_selector |
Verify the CSS selector matches an element on that page, or remove the selector option to capture the page instead. |
invalid_crop |
Check the crop rectangle and syntax against the API guide. |
system_error |
Log the affected URL and response, then retry cautiously or contact the vendor if it persists. |
Keep a record of each URL and its outcome. For production jobs, consider writing successes and failures to a CSV or JSON log so a rerun can target only failed URLs. The sample script prints outcomes to the terminal; it does not implement automatic retries, since retry policy and current service limits are not established here.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Plan for throughput, reliability, and billing
The example deliberately makes requests sequentially. Neither a supported concurrency level nor a rate limit is established by the documented material, so do not infer that sending many simultaneous calls is safe. If a run is large, confirm account-level limits with ScreenshotMachine and test a small subset first.
ScreenshotMachine’s pricing page states that only new, fresh screenshots are charged and that reused cached screenshots are not billed within the stated 14-day period. It also says additional screenshot counts are rounded down in groups of 1,000; its example says 999 or fewer additional captures do not incur an additional thousand-count charge. These are the vendor’s stated billing terms and may change, so check the current pricing page and account terms before estimating a large batch.
Best Value
Or skip the browser setup
ScreenshotNeo is a screenshot API with an MCP server for AI agents. Its one-request-per-URL API can return a screenshot or PDF; for a batch, your script still iterates over URLs. This cURL example captures one page; see the ScreenshotNeo API documentation for request options and batch capture details.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
- Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; each cleanup step can be turned off.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; responses identify the page verdict and billing status in headers.
- Its MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents and MCP clients. - The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Every feature is available on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
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.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →

