ScreenshotNeo

BlogComparisons

Best Screenshot API for Custom Device Pixel Ratios

Compare screenshot APIs for custom DPR, learn how viewport size affects output, and choose a documented capture workflow.

By the ScreenshotNeo team4 October 20269 min read

Short answer: ScreenshotOne is the clearest documented match when you need a custom, fractional device pixel ratio (DPR): its device_scale_factor option accepts values from 1 through 5 and documents 2.25 as an example. ScreenshotNeo is the first service to consider if you also want cookie banners, popups, and chat widgets removed before capture, with only clean shots billed; its provided product documentation does not specify a custom DPR option, so confirm that requirement before choosing it. Browserless documents a device scale factor option, but the reviewed guide does not state its accepted range or confirm fractional values.

1. What custom DPR changes

A screenshot has a CSS viewport size and a pixel density. The viewport controls the page’s layout dimensions in CSS pixels. DPR controls how many output image pixels represent each CSS pixel. For example, a 1200 by 800 CSS-pixel viewport at DPR 2 can yield an image around 2400 by 1600 pixels. The actual image bounds can vary with full-page capture, clipping, and page content.

Do not confuse DPR with resizing a finished image. DPR changes the browser’s rasterization density; resizing changes the image dimensions after rendering. ScreenshotOne documents viewport width and height separately from device_scale_factor, and documents image sizing as a separate option. [ScreenshotOne options](https://screenshotone.com/docs/options/)

2. Which screenshot API should you choose?

Service or tool What the reviewed documentation establishes Best fit and checks
ScreenshotNeo Website screenshot API and MCP server. It removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; only clean shots are billed. Try it first for clean captures, usage billing clarity, and AI-agent workflows. The supplied product facts do not confirm custom or fractional DPR support; verify this specific requirement before adopting it.
ScreenshotOne Explicit device_scale_factor from 1 to 5, including fractional values such as 2.25; explicit viewport dimensions; device presets whose scale factor and dimensions can be overridden. Strongest documented match in this comparison when a fractional DPR is required. Check current plan limits, pricing, throughput, and service terms with the vendor; they were not researched here.
Browserless Screenshot REST API documentation lists viewport sizing and device scale factor among supported Puppeteer-style options, along with formats, full-page capture, clipping, and selectors. Relevant hosted alternative. Confirm the exact accepted DPR values, including fractional values, in its current complete API reference before relying on them.
Playwright, self-managed The screenshot option scale selects CSS-pixel output or device-pixel output. Device-pixel output can make high-DPI screenshots larger. Useful if you already operate browser automation. This option is a CSS-versus-device output choice, not a documented arbitrary numeric DPR setting.

This is a documentation-based comparison, not a hands-on test. It does not establish measured quality, speed, reliability, or compatibility. [ScreenshotOne options](https://screenshotone.com/docs/options/) · [ScreenshotOne device presets](https://screenshotone.com/docs/viewport-devices/) · [Browserless screenshot API](https://docs.browserless.io/rest-apis/screenshot-api) · [Playwright Page API](https://playwright.dev/docs/api/class-page)

3. Set a custom DPR with ScreenshotOne

Use viewport_width and viewport_height for the CSS layout size and device_scale_factor for pixel density. The example uses a 1200 by 800 CSS-pixel viewport and DPR 2.25. ScreenshotOne documents the factor range as 1 through 5, including fractional values. If you specify a viewport_device preset, the explicit factor overrides the preset’s factor; explicit viewport dimensions can override preset dimensions too. [Options reference](https://screenshotone.com/docs/options/) · [Device presets](https://screenshotone.com/docs/viewport-devices/)

cURL

curl -G "https://api.screenshotone.com/take" \
  --data-urlencode "access_key=YOUR_API_KEY" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "viewport_width=1200" \
  --data-urlencode "viewport_height=800" \
  --data-urlencode "device_scale_factor=2.25" \
  --data-urlencode "format=png" \
  -o screenshot.png

Python

import requests

response = requests.get(
    "https://api.screenshotone.com/take",
    params={
        "access_key": "YOUR_API_KEY",
        "url": "https://example.com",
        "viewport_width": 1200,
        "viewport_height": 800,
        "device_scale_factor": 2.25,
        "format": "png",
    },
    timeout=90,
)
response.raise_for_status()
with open("screenshot.png", "wb") as image:
    image.write(response.content)

Node.js

const params = new URLSearchParams({
  access_key: process.env.SCREENSHOTONE_ACCESS_KEY,
  url: 'https://example.com',
  viewport_width: '1200',
  viewport_height: '800',
  device_scale_factor: '2.25',
  format: 'png',
});

const response = await fetch(`https://api.screenshotone.com/take?${params}`);
if (!response.ok) {
  throw new Error(`Screenshot request failed: ${response.status} ${await response.text()}`);
}
const bytes = new Uint8Array(await response.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('screenshot.png', bytes));

Keep API keys on the server or in a secrets manager. ScreenshotOne supports keys in query parameters, JSON POST bodies, or an X-Access-Key header; do not commit a key or expose it in a public page. Use HTTPS for requests containing keys, cookies, or authorization data because HTTP does not encrypt them in transit. [API keys](https://screenshotone.com/docs/api-keys/) · [Getting started and security](https://screenshotone.com/docs/getting-started/)

4. Configure the capture beyond DPR

  • Viewport dimensions: Set width and height for the CSS layout you want to reproduce. A high DPR does not turn a desktop layout into a mobile layout.
  • Device preset: Use a preset when its viewport and device behavior are useful, then explicitly set the viewport and DPR values you need. Confirm the preset has not left mobile mode, touch, or orientation in a state that changes rendering.
  • Output format: Choose PNG for lossless output and sharp text or interface details; JPEG or WebP can reduce file size when lossy compression is acceptable. Check the API’s current supported formats and quality controls.
  • Full-page versus viewport: Full-page captures can be much taller than the viewport. DPR increases pixel dimensions in both directions, so full-page, high-DPR output may become large.
  • Wait conditions: If the page renders asynchronously, use a documented selector wait, delay, or network-idle option as appropriate. A capture made before fonts, images, or client rendering finish can differ from the intended page.
  • Other page state: Custom headers, cookies, authorization, user agent, timezone, and geolocation can affect the content. Use only settings needed to reproduce the target state.
  • Image resizing: If you need a thumbnail or size limit, treat resizing as a separate post-render or API option. Do not use it as a substitute for DPR.

5. Browserless and Playwright alternatives

Browserless REST API

Browserless documents a POST request to its screenshot endpoint, with Puppeteer-style settings in an options object. Its guide confirms viewport sizing and device scale factor support, but the reviewed guide does not establish the valid numeric range or fractional support. The following uses integer DPR 2 as a conservative illustration of the documented option; check the current API reference for exact field support before use.

curl -X POST \
  "https://production-sfo.browserless.io/screenshot?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/",
    "options": {
      "viewport": { "width": 1200, "height": 800 },
      "deviceScaleFactor": 2,
      "type": "png"
    }
  }' \
  --output screenshot.png

See the [Browserless screenshot API guide](https://docs.browserless.io/rest-apis/screenshot-api) and verify exact option names and accepted values in its linked full reference.

Playwright you operate

Playwright’s documented screenshot scale option is css or device. It chooses whether output is one pixel per CSS pixel or one per device pixel; it is not itself a numeric DPR parameter. A viewport can be configured on the browser context, but do not assume that setting an arbitrary viewport property is equivalent to an API offering a numeric device_scale_factor. Consult the current browser-context and screenshot documentation for your language and version. [Playwright Page API](https://playwright.dev/docs/api/class-page)

6. Or skip the browser setup

ScreenshotNeo takes a screenshot through one GET request. This call uses the documented endpoint and parameters; 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 the shot. 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 a month with no card; paid plans start at $5 for 3,000. ScreenshotNeo’s supplied product facts do not specify custom DPR support, so verify that requirement if exact pixel density is essential. Sign up for 1,000 free screenshots a month, with no card.

7. Performance, reliability, and cost

  • Output size: Raising DPR increases image width and height and can increase total pixels, memory use, transfer size, and downstream processing. A 2× factor in each dimension can mean roughly four times the pixel area of the same viewport at 1×.
  • Keep the setting proportional to the need: Use the smallest viewport and DPR that preserve the detail your consumer needs. Avoid capturing a long page at very high DPR when a viewport or element capture is sufficient.
  • Plan around page variability: Ads, animations, live data, consent state, and asynchronous assets may cause captures to differ. Fix page state and wait conditions where repeatability matters; the dossier contains no benchmark or reliability figures for these vendors.
  • Handle failures explicitly: Check HTTP status and response content type before saving bytes as an image. Retry only transient transport or service failures with bounded backoff; avoid repeated retries for invalid parameters or access credentials.
  • Compare total workflow cost: Verify current plan quotas, concurrency limits, billing rules, and service-level terms with the vendor. These details were not researched for ScreenshotOne or Browserless. ScreenshotNeo’s stated plans are free for 1,000 shots monthly, then $5 for 3,000, $15 for 15,000, $39 for 60,000, $99 for 250,000, and $249 for 1,000,000; yearly billing gives two months free, and every feature is on every plan.

8. Troubleshooting

Symptom Likely cause Fix
Output dimensions are not what you expected Viewport dimensions and DPR were mixed up, or a device preset supplied dimensions. Set viewport width and height explicitly, set the numeric DPR explicitly, and inspect the actual image dimensions.
ScreenshotOne rejects the DPR The value is outside its documented 1–5 range, malformed, or passed under the wrong parameter name. Use device_scale_factor with a numeric value from 1 through 5; try a documented fractional value such as 2.25.
Capture looks like the wrong device layout A device preset may set mobile mode, touch, or orientation as well as dimensions and DPR. Inspect the preset behavior and explicitly configure the properties the target page requires. [Device preset fields](https://screenshotone.com/docs/viewport-devices/)
Image is unexpectedly huge High DPR, full-page capture, or both produced many output pixels. Lower DPR, capture only the viewport or relevant element, or resize after capture if the consumer needs a smaller image.
Screenshot is blank or content is missing Navigation failed, the site returned a bot check, content has not rendered, or lazy assets have not loaded. Check the rendered page and response behavior, use an appropriate wait condition, and investigate the site’s access policy. Do not treat a screenshot of a challenge page as proof of a successful content capture.
Browserless request fails on option parsing Option nesting or spelling may not match its endpoint’s current Puppeteer-style schema. Check the current Browserless OpenAPI reference and confirm the accepted numeric DPR values; the reviewed guide does not specify fractional support.
Saved file is JSON or an error page instead of an image The request returned an API error, such as invalid credentials or options, and the client saved the error body. Check the HTTP status and content type, inspect the error response, correct the request, and only then write the image file.
API key or protected page credentials are exposed Secrets were placed in client-side code, logs, a public URL, or sent over HTTP. Keep keys server-side, use HTTPS, avoid logging sensitive query strings, and rotate any exposed credential.

9. Frequently asked questions

Is DPR the same as browser zoom?

No. DPR sets the mapping between CSS pixels and device pixels. Browser zoom changes how content is laid out or scaled and can alter what fits in the viewport.

Is 2.25 a standard device preset?

It is a fractional value documented by ScreenshotOne for its device_scale_factor option. It does not imply every API or physical device preset accepts it.

Can I compare results across providers by requesting the same DPR?

Matching numeric settings helps, but it does not guarantee identical browser versions, fonts, page state, rendering, or capture timing. The research used here did not test cross-provider image equivalence.

Does ScreenshotNeo document fractional DPR?

The product details used in this article do not specify a custom DPR control. Confirm support with its documentation or team before selecting it for a workflow that depends on an exact fractional value.

Sources