ScreenshotNeo

BlogComparisons

ScreenshotMachine CLI vs Playwright for Full-Page Captures

Compare Playwright’s full-page screenshot API and CLI with ScreenshotMachine’s hosted API, including runnable examples and guidance on choosing a workflow.

By the ScreenshotNeo team4 October 20267 min read

Short answer: Playwright documents both a browser automation API and a CLI command for full-page screenshots. ScreenshotMachine’s official documentation describes a hosted HTTP screenshot API, including a full-page dimension option; the available documentation does not establish a dedicated official ScreenshotMachine CLI. If by “ScreenshotMachine CLI” you mean a shell command that calls its API, that is an API caller rather than a verified native CLI.

Use Playwright when capture is part of code or browser automation and you need to control the page before taking the image. Use ScreenshotMachine when you prefer to send a request to a hosted rendering service and its documented parameters cover your needs. There is no source-backed speed or fidelity winner in the available evidence.

1. What “ScreenshotMachine CLI” means

ScreenshotMachine’s official product documentation presents a website screenshot API. It accepts an HTTP request and documents 1024xfull as a full-page screenshot at 1024 pixels wide. That supports calling the API from a shell script, but does not verify a first-party executable named ScreenshotMachine CLI.

Playwright has two documented routes: its browser automation API, and a CLI screenshot command documented in its agent CLI reference. Those are distinct interfaces. The examples below use the documented commands and API rather than assuming a separate ScreenshotMachine command-line product.

2. Playwright full-page capture with JavaScript

Install Playwright and its Chromium browser, save this as full-page.js, then run it with Node.js. The example writes a PNG to disk and closes the browser even if capture fails.

npm init -y
npm install playwright
npx playwright install chromium
const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({ headless: true });
  try {
    const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
    await page.goto('https://example.com', { waitUntil: 'networkidle', timeout: 60000 });
    await page.screenshot({ path: 'full-page.png', fullPage: true });
  } finally {
    await browser.close();
  }
})().catch(error => {
  console.error(error);
  process.exitCode = 1;
});

fullPage: true captures the full scrollable page. The browser must be installed in the environment where the script runs. If the site keeps background requests open, networkidle may never occur; use domcontentloaded or load and wait for a meaningful selector instead.

The API can also return image bytes when no path is supplied. This is useful when you want to pass the screenshot to an image processor or upload it without first saving a file:

const image = await page.screenshot({ fullPage: true, type: 'png' });
// image is a Buffer; pass it to your image processing or storage code.

For API details, including screenshot options, see the Playwright screenshot documentation and API parameters.

3. Playwright CLI full-page capture

Playwright’s agent CLI documentation shows this full-page command:

playwright-cli screenshot --full-page --filename=full-page.png https://example.com

The documented CLI also supports choosing an output filename and image type. This command belongs to the agent CLI documentation; it is separate from the Page screenshot API. See the Playwright CLI screenshot reference for its current command options and setup.

4. ScreenshotMachine full-page capture through its API

The documented ScreenshotMachine workflow is an HTTP request to its hosted API. Its API page uses the dimension value 1024xfull for a full-page capture 1024 pixels wide. The exact authentication and other parameters should follow the current ScreenshotMachine API documentation.

The following is a shell-shaped request pattern illustrating how a command-line caller sends an HTTP request. Check the API documentation for the required key parameter, endpoint, and response behavior for your account before using it; this is not a ScreenshotMachine CLI command:

curl -G 'SCREENSHOTMACHINE_API_ENDPOINT' \
  --data-urlencode 'YOUR_API_KEY_PARAMETER=YOUR_API_KEY' \
  --data-urlencode 'url=https://example.com' \
  --data-urlencode 'dimension=1024xfull' \
  -o screenshot.png

Replace the endpoint and parameter names with the ones specified by ScreenshotMachine. A shell script around this request is still an API client. Do not assume this illustrative request has the provider’s exact parameter names or authentication scheme.

5. Choosing between Playwright and a hosted screenshot API

Need Playwright ScreenshotMachine
Where rendering runs Your process launches and manages a browser. The documented workflow sends a request to a hosted API.
Full-page option fullPage: true in the API; --full-page in the documented CLI. Documented full-page dimension value: 1024xfull.
Page interaction before capture Browser automation API can be used to control the page before capture. The reviewed documentation establishes API parameters, not an equivalent arbitrary browser interaction workflow.
Output handling Save to a path or receive screenshot bytes for further processing. Receive a rendered image response from the service.
Operational responsibility Manage browser installation, runtime, and execution environment. Integrate with the hosted service and its documented request and account limits.

Choose Playwright when the screenshot is part of a test or automation flow, when the script must interact with the page, or when code needs the screenshot bytes directly.

Choose ScreenshotMachine when you want a hosted rendering request and its documented parameters fit the job. Confirm current pricing, request limits, and output options in the provider’s documentation before planning sustained volume; comparable figures were not established in the research for this comparison.

6. Capture details, edge cases, and operational notes

Full page is not the same as a fixed viewport

A full-page capture includes the page’s scrollable content. In Playwright, the viewport still affects layout: a narrow viewport can trigger a mobile layout even though the image extends down the page. Set the viewport deliberately when desktop-versus-mobile rendering matters.

Wait for the content you need

Pages that load content as you scroll, rely on client-side rendering, or keep polling can make a generic page-load wait unreliable. In Playwright, wait for a relevant selector or use a deliberate delay when the page’s behavior requires it. A full-page option does not guarantee that every lazy-loaded image or delayed widget has finished loading.

Very long pages

Tall pages produce large images and can consume significant memory during browser capture and image processing. Consider whether the consumer needs the entire page as one image, or whether a PDF or a sequence of viewport captures better fits the downstream workflow. Confirm hosted service limits before requesting exceptionally long pages.

Reliability and cost

Playwright’s operational cost includes browser setup and the compute used to run captures in your environment. A hosted API shifts browser operation to the service but has its own account pricing and limits. The sources gathered do not support comparative speed, reliability, or fidelity claims, so validate both approaches against your actual pages and workload. Avoid using a single successful page as evidence of performance across sites.

7. Troubleshooting

Symptom Likely cause What to do
Playwright says the browser executable is missing The browser binary was not installed in this environment. Run npx playwright install chromium in the deployment environment, and ensure the runtime user can access the installed browser.
Navigation times out while waiting for network idle Analytics, streaming, or other recurring requests keep the network active. Use domcontentloaded or load, then wait for a page-specific selector or a bounded delay.
The screenshot cuts off content that appears later Lazy-loaded or client-rendered content was not ready when capture started. Wait for the required content; if the page loads items on scroll, scroll through it before capture and verify the resulting image.
Capture layout differs from the expected device The viewport or device scale differs from the target. Set the viewport deliberately in Playwright and check the provider’s supported dimensions when using a hosted API.
The ScreenshotMachine request returns an error or unexpected file Endpoint, authentication parameter, dimensions, URL encoding, or account limits may be wrong. Compare the request with the current official API documentation, URL-encode the target URL, and inspect the HTTP status and response headers before treating the body as an image.
No official ScreenshotMachine executable can be found The reviewed official source documents an HTTP API, not a dedicated native CLI. Call the HTTP API from a shell or language client, or verify the identity and maintenance status of any third-party wrapper before adopting it.

8. Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. It can accept cookie and consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status.

For full-page capture, use the documented full-page option with your request. See the ScreenshotNeo API documentation for parameters and authentication.

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

ScreenshotNeo also has an MCP server with 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.

Create a free ScreenshotNeo account and start with 1,000 screenshots a month at no charge, with no card required.

9. FAQ

Does ScreenshotMachine have an official CLI?

The official source reviewed documents an HTTP screenshot API. It does not establish a dedicated native CLI. A shell command that sends an HTTP request is an API client.

Can Playwright return screenshot data without writing a file?

Yes. Its screenshot API returns image bytes when you omit the output path, so code can process or upload the result directly.

Which option is faster or more reliable?

The gathered documentation does not establish a controlled speed or reliability comparison. Measure both against representative pages and your own workload.

Sources