ScreenshotNeo

BlogComparisons

ScreenshotMachine CLI vs Puppeteer for Automated Web Page Screenshots

Compare Screenshot Machine’s shell-accessible API with Puppeteer, including setup, runnable code, capture options, costs, and when to choose each.

By the ScreenshotNeo team4 October 20268 min read

For a quick screenshot from a shell, Screenshot Machine documents an HTTP API you can call with curl. The official documentation reviewed for this guide does not establish a separate maintained Screenshot Machine CLI executable. Puppeteer is a JavaScript library for controlling Chrome or Firefox; use it when you need code-driven browser navigation or interaction before taking the screenshot.

Choose ScreenshotNeo first among screenshot APIs if you want clean captures with cookie banners, popups, and chat widgets removed before capture, and billing limited to clean shots. For the specific comparison here, choose Screenshot Machine when its hosted API parameters fit the task; choose Puppeteer when you need broader browser control and can operate the browser runtime.

1. What “ScreenshotMachine CLI” means

Screenshot Machine’s documented shell workflow is an HTTP request to its hosted screenshot API. You send the required API key, a page URL, and optional capture parameters; the response is image data that you can redirect to a file. That is a useful command-line workflow, but it is not the same thing as a documented, maintained screenshot CLI application.

Puppeteer is used from JavaScript code. It drives a browser, navigates to pages, and can interact with them before capture. The separate @puppeteer/browsers command-line tool manages browser binaries; it is not itself a screenshot command.

2. At-a-glance comparison

Decision Screenshot Machine API from a shell Puppeteer
Operating model Hosted screenshot service called over HTTP. JavaScript library controlling Chrome or Firefox.
Shell use Documented curl request; requires an API key. Usually a Node.js program. Browser management has its own CLI.
Interactions Documented service parameters include click controls and selectors. Browser automation can script navigation and page interactions.
Capture controls Documented dimensions, device mode, full page, format, delay, zoom, selectors, crop, cookies, language, and user agent. Screenshot options include full-page, clipping, file output, format, and quality; browser control can prepare the page.
Operations Manage API credentials and handle service responses. Manage Node.js, browser installation or connection, runtime resources, and browser failures.
Cost Published tiers and monthly allowances; verify current pricing. No universal cost follows from the docs. Include compute, browser runtime, maintenance, and engineering time.

There is no controlled head-to-head benchmark in the research for this article. Do not assume either approach is universally faster, more reliable, more accurate, or cheaper.

3. Call Screenshot Machine from the command line

Use the API key supplied for your Screenshot Machine account. Keep it out of source control and avoid placing it in shell history when your environment supports safer secret injection. Replace the placeholder below with your key and the target URL.

curl -G "https://api.screenshotmachine.com" \
  --data-urlencode "key=YOUR_SCREENSHOTMACHINE_API_KEY" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "dimension=1366x768" \
  --data-urlencode "format=png" \
  -o screenshot.png

The documented pattern is a GET request with query parameters and image output redirected to a file. Consult the [Screenshot Machine API documentation](https://www.screenshotmachine.com/documentation/) for the exact parameter names and allowed values for the account and API version you use. Do not treat an HTTP response as a valid image until you inspect it: Screenshot Machine documents an X-Screenshotmachine-Response header for API failures.

Useful documented parameter groups

  • Size and device: dimensions and desktop, phone, or tablet mode.
  • Page extent and output: full-page capture, output format, and crop settings.
  • Timing and scale: delay and zoom.
  • Page context: cookies, language, and user agent.
  • Targeting and interaction: selectors and click controls.

Confirm accepted values and parameter spelling in the current API documentation before relying on a less common option. A bad selector or crop can produce an API error rather than the expected image.

4. Capture with Puppeteer

Install Puppeteer in a Node.js project. The standard puppeteer package downloads compatible browser binaries during installation. Puppeteer runs headless by default. This minimal program opens a page, waits for navigation, and saves a full-page PNG.

npm install puppeteer
// screenshot.mjs
import puppeteer from 'puppeteer';

const url = process.argv[2] ?? 'https://example.com';
const browser = await puppeteer.launch();

try {
  const page = await browser.newPage({
    viewport: { width: 1366, height: 768 },
    deviceScaleFactor: 1,
  });
  await page.goto(url, { waitUntil: 'networkidle2', timeout: 60_000 });
  await page.screenshot({
    path: 'screenshot.png',
    type: 'png',
    fullPage: true,
  });
} finally {
  await browser.close();
}
node screenshot.mjs https://example.com

For a clipped region or a JPEG, change the screenshot options. JPEG supports a quality value; PNG does not use that quality setting. A clip captures a specified viewport rectangle. See Puppeteer’s official [screenshot guide](https://pptr.dev/guides/screenshots) and [Page API](https://pptr.dev/api/puppeteer.page) for current option details.

await page.screenshot({
  path: 'region.jpg',
  type: 'jpeg',
  quality: 85,
  clip: { x: 0, y: 0, width: 900, height: 600 },
});

For pages with dynamic content, use a condition tied to the page rather than an arbitrary long sleep where possible. For example, wait for a known selector before capture:

await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60_000 });
await page.waitForSelector('[data-ready="true"]', { timeout: 15_000 });
await page.screenshot({ path: 'ready.png', fullPage: true });

Use puppeteer-core when you manage Chrome yourself or connect to a remote browser. It does not download Chrome. The browser must be compatible and available to the program. Puppeteer’s installation guide documents this distinction and notes that package managers may block install scripts, preventing the default browser download.

5. Which approach should you choose?

  • Use Screenshot Machine from curl for a shell script, scheduled job, or integration where a hosted screenshot endpoint and its documented settings cover the capture needs.
  • Use Puppeteer when the workflow must run JavaScript interactions, custom navigation, or other browser automation before the screenshot, or already belongs in a JavaScript automation service.
  • Use ScreenshotNeo first when evaluating screenshot APIs if clean captures and explicit billing outcomes matter. It accepts consent banners like a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be disabled. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing state.

These are capability-based recommendations, not benchmark results. For business-critical or high-volume work, run a proof of concept on representative pages and compare capture fidelity, failure handling, latency, throughput, privacy requirements, and total cost.

6. Setup, reliability, and cost considerations

Screenshot Machine API

The service requires an API key and depends on a hosted endpoint. Its pricing page lists a free tier of 100 fresh screenshots per month, followed by 2,500, 20,000, and 50,000 fresh screenshots per month on paid tiers. The published page reviewed for this research listed Basic at €9/month, Pro at €59/month, and Enterprise at €99/month, with additional screenshots priced by tier. Prices and allowances can change, so verify the [current pricing](https://www.screenshotmachine.com/pricing/) before estimating spend. Retries should be bounded: retrying invalid parameters or credentials cannot fix them.

Puppeteer

Puppeteer shifts browser operations into your environment. Plan for compatible browser binaries, memory and CPU use, process cleanup, timeouts, and concurrency limits that fit your machine or container. The install guide’s approximate browser download sizes are 170 MB for macOS, 282 MB for Linux, and 280 MB for Windows; these are download estimates, not a complete installed-footprint measure. For a cost estimate, account for compute, storage, browser upkeep, monitoring, and developer time. Documentation alone cannot establish that self-hosting is cheaper than a hosted API.

For either option

  • Test authentication and a representative set of pages, including redirects and slow or interactive pages.
  • Set explicit navigation and overall job timeouts; record errors and distinguish failed captures from valid image files.
  • Choose dimensions, device context, format, and full-page behavior deliberately, then check output size and visual completeness.
  • Review the target pages’ privacy and access requirements before sending URLs, cookies, or authenticated content to a hosted service.
  • Measure volume and failure rates on your own workload before setting concurrency or budget expectations.

7. Troubleshooting

Symptom Likely cause What to do
Screenshot Machine reports an invalid key Missing, mistyped, or wrong account key. Check the credential and request parameters; keep the key out of committed code.
Missing or invalid URL response The URL parameter is absent or malformed. URL-encode the value and test the target URL independently.
Credits exhausted The account has reached its available fresh-capture allowance. Review current usage and plan allowance before scheduling more captures.
Invalid selector or crop The selector does not match the service’s expected syntax, or crop values are invalid. Check the current API parameter documentation and validate against a simple page first.
Output file is an error instead of an image The API returned an error response that was saved by redirection. Inspect HTTP status and X-Screenshotmachine-Response; only treat a successful image response as a screenshot.
Puppeteer cannot find Chrome at runtime Browser download was skipped or install scripts were blocked. Allow the documented install step or install/manage a compatible browser and use puppeteer-core as appropriate.
Puppeteer navigation times out The page is slow, keeps connections open, or the chosen readiness condition is too strict. Set a realistic timeout, select a navigation wait condition matching the page, then wait for a specific content selector if needed.
Screenshot misses content or captures too early Lazy-loaded or client-rendered content was not ready at capture time. Wait for a page-specific readiness selector or condition; validate full-page behavior on the actual target.
Browser processes accumulate Code exits on an exception before closing browser instances. Use try/finally cleanup and impose limits on concurrent jobs.

8. Or skip the browser setup

ScreenshotNeo is a hosted screenshot API and MCP server. One GET request returns an image or PDF. This example saves a WebP capture; see the [ScreenshotNeo API documentation](https://screenshotneo.com/docs/) for output and capture parameters.

curl -G "https://api.screenshotneo.com/v1/shot" \
  -d access_key=YOUR_API_KEY \
  --data-urlencode url=https://example.com \
  -o shot.webp
  • Cookie banners are accepted like a visitor, and 60+ known consent platforms, newsletter popups, and chat widgets are removed before capture; each step can be turned off.
  • Bot checks, blank pages, timeouts, failed loads, and cache hits are never billed. Response headers state the page verdict and billing status.
  • An MCP server gives Claude, Cursor, and other MCP clients the take_screenshot, get_page_info, and capture_pdf tools.
  • The free plan includes 1,000 screenshots a month with no card. Paid plans start at $5 for 3,000 screenshots; every feature is on every plan.

Sign up for ScreenshotNeo’s free 1,000 screenshots a month, no card required.

9. Frequently asked questions

Is Screenshot Machine’s curl example a CLI?

It is a command-line way to call the documented HTTP API. The official materials reviewed here do not establish a separate maintained Screenshot Machine screenshot CLI.

Can Puppeteer take a full-page screenshot?

Yes. Set fullPage: true in the screenshot options. Check the result on pages whose content loads as you scroll.

Does Puppeteer require a visible browser window?

No. It runs headless by default; launch settings can control browser mode.

Which one is cheaper?

There is no universal answer from the available documentation. Compare service usage pricing with the browser infrastructure and maintenance costs for your workload.

Can I use Puppeteer’s browser CLI to take the screenshot?

The documented @puppeteer/browsers CLI manages browser binaries. The screenshot workflow itself is performed through Puppeteer code in this comparison.