Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk5 min

How to Capture Screenshots for a List of URLs with ScreenshotMachine from the CLI

ScreenshotMachine’s documented curl request captures one URL at a time. A Bash loop can repeat it for a URL list, with safe filenames and adjustable capture settings.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can capture a list of URLs with ScreenshotMachine by putting one URL on each line and running a Bash loop that makes a separate request to its screenshot API for each one. ScreenshotMachine’s published example documents a single-URL curl request, not a dedicated list-reading CLI command. The loop below is a practical shell wrapper around that request.

What you need

  • A ScreenshotMachine account and customer key. Keep the key in an environment variable rather than committing it to a script.
  • curl and Bash.
  • A text file containing one HTTP or HTTPS URL per line.

The API endpoint is https://api.screenshotmachine.com. The endpoint and request parameters are documented on ScreenshotMachine’s API page.

As an Amazon Associate I earn from qualifying purchases.

Prepare the URL list and key

Create the input file

Save URLs in urls.txt, one complete address per line:

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

https://example.com
https://www.wikipedia.org
https://stripe.com

#1 Best Overall
Dell Optiplex 3060 Desktop Computer | Intel i5-8500 (3.2) | 32GB DDR4 RAM | 1TB SSD Solid State | Built in WiFi | Bluetooth | Windows 11 Professional | Home or Office PC (Renewed)
  • [INTEL POWERED CONTENT] - Built with a 8th Generation Hexa-Core Intel i5 and 32GB of DDR4 RAM; Modern, Windows 11 ready, with 4K support, Executive multitasking, media streaming and smooth, multi-tab web browsing; Perfect as an all-purpose multimedia computer; built for content creators; Plenty of RAM and Mass storage for photo and video editing powered by Intel HD 630
  • [LATEST WIRELESS TECH] - This Dell Desktop Computer easily connects to the internet through the Built In WiFi / Bluetooth
  • [SOLID STATE STORAGE] - This Dell Computer setup comes with an ultra-fast 1TB Solid State Drive (SSD); Setup as the primary boot device; Boot and load programs with lightning speed ; Additional expansion available
  • [BUY & OWN WITH CONFIDENCE] - From the world's largest Microsoft Authorized Refurbisher; Quality Guarantee and Free Tech Support; Award-winning Customer Service; | Support Sustainable Business
  • [MODERN HI-SPEED PORTS] - USB 3.0 (x4) | USB 2.0 (x4) | DisplayPort (x1) | HDMI Port (x1) | Audio Combo Jack (x1) | Audio Out (x1) | RJ-45 Ethernet (x1) | Internal SATA (x3)

Although the API documentation says the protocol prefix is optional, including https:// or http:// makes the list easier to check. Blank lines are ignored by the script.

Set the customer key privately

In Bash, set the key for the current shell session before running the script:

export SCREENSHOTMACHINE_KEY='YOUR_CUSTOMER_KEY'

Replace the example value locally. Do not publish a real key in a public script or repository. The API request sends the customer key as the key parameter.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Dell Optiplex 7050 SFF Desktop PC Intel i7-7700 4-Cores 3.60GHz 32GB DDR4 1TB SSD WiFi BT HDMI Duel Monitor Support Windows 11 Pro Excellent Condition(Renewed)
  • Model: Dell OptiPlex 7050 Small Form Factor (SFF)
  • Processor: Intel Core i7-7700 3.60 GHz
  • Memory: 32GB DDR4 Ram
  • Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
  • Operating System: Windows 11 Pro (64-bit)

Capture each URL with a Bash and curl loop

Save this as capture.sh. It follows ScreenshotMachine’s documented GET-request pattern and adds a sequential filename for each nonblank input line. The loop and naming are a shell implementation, not an official ScreenshotMachine list-CLI syntax.

#!/usr/bin/env bash
set -u

: "${SCREENSHOTMACHINE_KEY:?Set SCREENSHOTMACHINE_KEY before running}"
input="${1:-urls.txt}"
outdir="screenshots"

if [[ ! -f "$input" ]]; then
  printf 'Input file not found: %sn' "$input" >&2
  exit 1
fi
mkdir -p "$outdir"

index=0
while IFS= read -r url || [[ -n "$url" ]]; do
  [[ -z "${url//[[:space:]]/}" ]] && continue
  index=$((index + 1))
  outfile=$(printf '%s/%04d.png' "$outdir" "$index")

  printf 'Capturing %s -> %sn' "$url" "$outfile"
  if ! curl --fail --show-error --silent --get 
    'https://api.screenshotmachine.com' 
    --data-urlencode "key=$SCREENSHOTMACHINE_KEY" 
    --data-urlencode "url=$url" 
    --data-urlencode 'dimension=1366x768' 
    --data-urlencode 'device=desktop' 
    --data-urlencode 'format=png' 
    --data-urlencode 'cacheLimit=0' 
    --data-urlencode 'delay=2000' 
    --data-urlencode 'zoom=100' 
    --output "$outfile"; then
    rm -f "$outfile"
    printf 'Request failed for: %sn' "$url" >&2
  fi
done < "$input"

printf 'Processed %d URL(s). Check %s for captures.n' "$index" "$outdir"

Run it with:

chmod +x capture.sh
./capture.sh
# Or specify another input file:
./capture.sh sites.txt

The sample uses settings shown in ScreenshotMachine’s own Bash/curl example. They are starting values, not universal requirements. The script encodes parameter values with --data-urlencode; ScreenshotMachine says, “Url percent-encoding is strongly recommended.” See the vendor API documentation for current parameter descriptions and defaults.

Choose capture settings for the pages

Dimensions and full-page height

The dimension parameter uses widthxheight. The documented width range is 100–1920 pixels and height range is 100–9999 pixels. Use full as the height for a full-length capture, such as 1366xfull. For example, replace the dimension argument with:

Rank #3
Sale
HP All-in-OneDesktop Computer, 16GB DDR5 RAM, Intel Quad-Cores, 128GB SSD, WiFi6, Keyboard & Mouse, Windows 11
  • IMMERSIVE 24 INCH DISPLAY: Experience stunning clarity on a Full HD IPS screen with ultra-thin bezels, offering a 90% screen-to-body ratio that makes everything from spreadsheets to streaming come alive with vibrant colors and crisp details.
  • POWERFUL INTEL PROCESSING: Tackle demanding tasks with ease thanks to the Intel processor and 16GB of high-speed memory, delivering smooth performance whether you're multitasking between applications or running productivity software.
  • GENEROUS STORAGE: Store all your important files, photos, and programs with blazing-fast solid state drive technology that ensures quick boot times, rapid file access, and plenty of space for your digital life.
  • ENHANCED PRIVACY AND COLLABORATION: Work confidently with the pop-up privacy camera that tucks away when not in use, plus dual microphones with noise reduction for crystal-clear video calls that keep you connected professionally.
  • ECO-CONSCIOUS DESIGN: Feel good about your purchase with an EPEAT Gold registered and ENERGY STAR certified computer that combines premium performance with responsible environmental manufacturing practices.
--data-urlencode 'dimension=1366xfull'

Format

The API documentation lists JPG, PNG and GIF. Set format to the desired type and give output files a matching extension, such as format=jpg with .jpg filenames. The provided script uses PNG.

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.

Wait time and cache

delay controls the wait before capture; the documentation discusses increasing it for pages with images or animation. A longer wait may help a page finish rendering, but adds time to each request. The example’s delay=2000 is a sample setting. cacheLimit is documented as 0–14 days; 0 requests a fresh screenshot rather than a cached image.

Other documented controls

The API also documents zoom, cookies, accept-language, user-agent, CSS selector and crop settings. The vendor page is the reference for exact parameter syntax and defaults, which can change; avoid assuming defaults from the example apply to your account or use case.

Rank #4
Dell Optiplex 3050 SFF Desktop Computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD, WiFi, 4K Support, DP, HDMI, Windows 11 Pro 64 Bit (Renewed)
  • This Certified Refurbished product is tested and certified to look and work like new. The refurbishing process includes functionality testing, basic cleaning, inspection, and repackaging. The product ships with all relevant accessories, a minimum 90-day warranty, and may arrive in a generic box. Only select sellers who maintain a high-performance bar may offer Certified Refurbished products on Amazon.com.
  • Dell Optiplex 3050 SFF Desktop computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD
  • Includes: USB Keyboard & Mouse, USB WiFi adapter, Microsoft office 30 days free trail.
  • Port: Front: USB 3.0(2), USB 2.0(2); Rear: DP, HDMI, USB 3.0(2), USB 2.0(2), RJ-45.
  • Support 4K (3840x2160) Dual display, makes it easy to connect two monitors at the same time, and you can expand working Windows, mirror content, or expand a single window across multiple monitors.

Check the output and handle failures

The script creates a screenshots directory and assigns a zero-padded sequence number to each nonblank URL, so repeated or similar hostnames do not overwrite one another. Check the images, especially if the pages rely on JavaScript, delayed media or authentication.

  • Missing key: The script exits with a clear message if SCREENSHOTMACHINE_KEY is unset. Export the correct customer key in the same shell session.
  • Missing input file: Confirm the path passed to ./capture.sh, or create urls.txt in the current directory.
  • Malformed or inaccessible URL: Check that each line is a valid, reachable URL. The sources do not establish a complete API error-handling contract for every invalid input, so inspect the result rather than assuming every request failure is reported identically.
  • Unexpectedly incomplete page: Increase delay for content that loads late, or use a full-page dimension if you need the full document rather than the initial viewport.
  • File exists but is not a usable image: curl --fail rejects HTTP error responses, but a successful HTTP response alone does not prove the image looks right. Inspect file size and open a sample capture before relying on a large run.

There is no retry or parallelization logic here: it makes one request at a time, which keeps the mapping between input lines and output names straightforward. If a request fails, correct the URL or settings and rerun; successful filenames may be replaced on a later run.

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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Does ScreenshotMachine provide a list CLI?

The reviewed official materials establish a Bash/curl example for one URL and an organization listing example repositories, but do not establish a vendor-maintained CLI command that reads a URL list. The shell loop above repeats the documented API request. A separate D3 Security integration documents a “Get URL Screenshots” action accepting multiple URLs; that is a third-party integration, not the ScreenshotMachine shell interface, and its documentation warns that invalid URL inputs may return screenshots showing an invalid-URL message instead of an operation-level error.

Best Value
Dell Windows 11 Desktop Computer OptiPlex 5060 | Intel Core i5-8500 Six Core (4.3GHz Turbo) | 16GB DDR4 RAM | 500GB SSD Solid State + 1TB HDD | WiFi + Bluetooth | Home or Office PC (Renewed)
  • Connectivity: Includes WiFi, Bluetooth, and LAN for wireless and wired connections
  • Memory: Features 16GB DDR4 RAM for smooth multitasking and performance
  • Storage: Combines 500GB SSD and 1TB HDD for ample storage space
  • Graphics: Integrated Intel UHD Graphics 630 for crisp visuals and video playback
  • Design: Sleek desktop tower with black color and slim profile for modern look

Or skip the browser setup

ScreenshotNeo provides a screenshot API and MCP server; its one-call request can save a screenshot without setting up a browser locally. See the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie banners, popups and chat widgets before capture; bot checks, blank pages and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots per month with no card, and paid plans start at $5 for 3,000.

Sign up for ScreenshotNeo’s free plan.

Frequently Asked Questions

Can I use a URL without http:// or https://?

ScreenshotMachine’s API documentation says the protocol prefix is optional, though the example list uses complete URLs for clarity.

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

Can I save captures under names based on the URL?

Yes. The sample uses sequence numbers to avoid collisions; you can replace the filename logic with a carefully sanitized hostname if that better suits your workflow.

Quick Recap

Bestseller No. 2
Dell Optiplex 7050 SFF Desktop PC Intel i7-7700 4-Cores 3.60GHz 32GB DDR4 1TB SSD WiFi BT HDMI Duel Monitor Support Windows 11 Pro Excellent Condition(Renewed)
Dell Optiplex 7050 SFF Desktop PC Intel i7-7700 4-Cores 3.60GHz 32GB DDR4 1TB SSD WiFi BT HDMI Duel Monitor Support Windows 11 Pro Excellent Condition(Renewed)
Model: Dell OptiPlex 7050 Small Form Factor (SFF); Processor: Intel Core i7-7700 3.60 GHz; Memory: 32GB DDR4 Ram
$384.00
Bestseller No. 4
Dell Optiplex 3050 SFF Desktop Computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD, WiFi, 4K Support, DP, HDMI, Windows 11 Pro 64 Bit (Renewed)
Dell Optiplex 3050 SFF Desktop Computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD, WiFi, 4K Support, DP, HDMI, Windows 11 Pro 64 Bit (Renewed)
Includes: USB Keyboard & Mouse, USB WiFi adapter, Microsoft office 30 days free trail.; Port: Front: USB 3.0(2), USB 2.0(2); Rear: DP, HDMI, USB 3.0(2), USB 2.0(2), RJ-45.
$189.99
Bestseller No. 5
Dell Windows 11 Desktop Computer OptiPlex 5060 | Intel Core i5-8500 Six Core (4.3GHz Turbo) | 16GB DDR4 RAM | 500GB SSD Solid State + 1TB HDD | WiFi + Bluetooth | Home or Office PC (Renewed)
Dell Windows 11 Desktop Computer OptiPlex 5060 | Intel Core i5-8500 Six Core (4.3GHz Turbo) | 16GB DDR4 RAM | 500GB SSD Solid State + 1TB HDD | WiFi + Bluetooth | Home or Office PC (Renewed)
Connectivity: Includes WiFi, Bluetooth, and LAN for wireless and wired connections; Memory: Features 16GB DDR4 RAM for smooth multitasking and performance
$269.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.

Leave a Reply

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

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. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.