ScreenshotNeo

BlogGuides

Microlink screenshot API: supported image formats and output sizes

Learn which image formats Microlink documents, how to set screenshot dimensions, and what its documentation does—and does not—say about size limits.

By the ScreenshotNeo team4 October 20267 min read

Microlink documents PNG as the default screenshot format and JPEG as an alternative. You can set viewport width, height, and device scale factor. The reviewed API references do not specify a universal maximum viewport dimension, pixel count, or output-file size. WebP appears in Microlink product copy and as a possible CDN delivery optimization, but the parameter reference does not establish screenshot.type=webp as a supported request value.

This guide shows how to request each documented format, choose capture dimensions and mode, read the returned asset metadata, and avoid treating examples as hard limits.

1. Supported screenshot formats

Format Request support in the reviewed reference When to use it
PNG Documented default Use when lossless image data or transparency matters.
JPEG Documented alternative Use when a smaller photographic or colorful image is more important than lossless fidelity. Quality is configurable.
WebP Product page mentions it; direct request support is not established by the parameter reference Treat it as a possible optimized CDN delivery format, not as a confirmed screenshot.type request value.

The request format and the representation delivered by a CDN are separate questions. Microlink’s performance guidance says its CDN may deliver an optimized format such as WebP to compatible browsers, and the stored and delivered asset can differ. If your integration needs a specific file type, inspect the response and asset metadata instead of inferring it from browser behavior.

JPEG quality

For JPEG, screenshot.quality accepts values from 0 to 100, with 80 documented as the default. Lower values can reduce file size while losing image fidelity. The quality parameter is ignored for PNG, so changing it does not make a PNG smaller.

2. Request a screenshot and inspect the asset

The screenshot option is disabled by default. Enable it with screenshot=true or use its object form to set format and quality. The response is JSON containing data.screenshot; its asset metadata includes a URL, width, height, type, byte size, and human-readable size.

cURL: request PNG (the default)

curl -G 'https://api.microlink.io' \
  --data-urlencode 'url=https://example.com' \
  --data-urlencode 'screenshot=true'

cURL: request JPEG with quality 80

curl -G 'https://api.microlink.io' \
  --data-urlencode 'url=https://example.com' \
  --data-urlencode 'screenshot.type=jpeg' \
  --data-urlencode 'screenshot.quality=80'

Python: request JPEG and read the returned metadata

import requests

response = requests.get(
    'https://api.microlink.io',
    params={
        'url': 'https://example.com',
        'screenshot.type': 'jpeg',
        'screenshot.quality': 80,
    },
    timeout=90,
)
response.raise_for_status()
payload = response.json()
asset = payload['data']['screenshot']
print({
    'url': asset['url'],
    'width': asset['width'],
    'height': asset['height'],
    'type': asset['type'],
    'size_bytes': asset['size'],
    'size_pretty': asset['size_pretty'],
})

Node.js: request JPEG and read the returned metadata

const params = new URLSearchParams({
  url: 'https://example.com',
  'screenshot.type': 'jpeg',
  'screenshot.quality': '80',
});

const response = await fetch(`https://api.microlink.io?${params}`);
if (!response.ok) {
  throw new Error(`Microlink returned HTTP ${response.status}`);
}
const payload = await response.json();
const asset = payload.data.screenshot;
console.log({
  url: asset.url,
  width: asset.width,
  height: asset.height,
  type: asset.type,
  sizeBytes: asset.size,
  sizePretty: asset.size_pretty,
});

For a file response rather than JSON, Microlink documents embed=screenshot.url. See the screenshot parameter reference and API overview for request and embed details.

3. Set output dimensions and capture mode

Set viewport.width, viewport.height, and optionally viewport.deviceScaleFactor. For example, a 1920×1080 viewport at device scale factor 2 is shown in Microlink’s material. That is an example configuration, not a maximum, guarantee, or universal output size.

Request a specific viewport

curl -G 'https://api.microlink.io' \
  --data-urlencode 'url=https://example.com' \
  --data-urlencode 'screenshot=true' \
  --data-urlencode 'viewport.width=1440' \
  --data-urlencode 'viewport.height=900' \
  --data-urlencode 'viewport.deviceScaleFactor=1'
Setting or mode Effect Practical note
viewport.width and viewport.height Set the browser viewport in CSS pixels. Page layout may change at different viewport sizes, so choose dimensions that match the layout you need to capture.
viewport.deviceScaleFactor Controls rendered image pixels per CSS pixel. At 1, one image pixel corresponds to one CSS pixel; this can reduce output bytes but may look softer on high-density displays when shown at full size.
Viewport screenshot Captures the visible browser area. The asset dimensions reflect the capture and any composition applied.
fullPage Captures the entire scrollable page. Its output height can be much larger than the viewport and depends on page geometry.
CSS selector capture Captures a selected visible element. The element’s size and visibility affect the resulting image dimensions.
Browser frame overlay Composes a frame and background around the capture. Read width and height from the response; the composed result need not equal the viewport dimensions.

Use the returned asset’s width and height as the authoritative dimensions of the output file. For full-page, element, or framed captures, do not assume the asset matches the viewport.

4. Are there maximum output sizes?

The reviewed official references describe configurable dimensions and show example values, but they do not document a universal maximum viewport width or height, maximum pixel count, or maximum screenshot file size. Do not present 1920×1080, the sample asset size, or another example as a service limit. If a particular page or dimension fails, reduce the capture size or complexity and consult the current API documentation for applicable request limits.

5. Reduce bytes and avoid unnecessary waiting

  • Choose JPEG when lossy compression is acceptable, and tune its quality for your use case. PNG ignores the quality setting.
  • Use device scale factor 1 when a one-to-one CSS-pixel capture is sufficient; a lower rendered pixel count can reduce output bytes.
  • Capture the viewport or a selector when you do not need the full scrollable page.
  • Microlink’s performance guide documents meta=false to skip metadata extraction when you only need the screenshot.
  • Wait for a relevant selector when possible instead of adding an unnecessarily long fixed delay.
  • Use the response’s size and dimensions to validate output against your downstream storage, upload, or display requirements.

These choices affect rendered work and asset size; they do not imply a documented maximum or a guaranteed response time. Microlink publishes a 2.8-second screenshot P95 and a 99.9% SLA for paid plans on its API page. These are vendor-published figures, not independent benchmarks, and the reviewed page does not state a year. Check current service terms before relying on them.

6. Troubleshooting

Symptom Likely cause What to do
No screenshot field in the JSON The screenshot option is disabled or the request was not parsed as intended. Set screenshot=true or a documented screenshot object and inspect the complete API response for errors.
PNG remains large after setting quality The quality setting is ignored for PNG. Use JPEG with an appropriate quality if lossy output is acceptable, or reduce dimensions/device scale factor.
Unexpected dimensions Full-page, selector capture, responsive layout, or a frame overlay changes the resulting bounds. Check capture mode and read width and height from the returned asset.
WebP was expected but another type is returned CDN delivery optimization is distinct from direct request format selection; direct WebP request support is not established by the reviewed parameter reference. Request the documented PNG or JPEG format and inspect the actual returned asset type.
Capture is too slow or has excessive output bytes Large full-page capture, high device scale factor, unnecessary metadata extraction, or a broad wait condition can add work. Reduce capture scope or scale, set meta=false if appropriate, and wait for a specific selector.
Target content is absent from the image The page may not have rendered the content before capture, or the chosen viewport/selector does not include it. Use a suitable viewport and a selector-based wait; inspect whether the content is inside the captured area.
Request fails at a desired large size The reviewed documentation provides no universal size cap, so the cause cannot be inferred from a documented maximum. Inspect the API error, try smaller dimensions or a narrower capture, and consult the current reference rather than assuming a fixed limit.

7. Or skip the browser setup

For a one-call screenshot API alternative, ScreenshotNeo returns an image or PDF from a URL. Its capture flow accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, with the page verdict and billing status reported in response headers. An MCP server lets AI agents use screenshot tools. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

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

See the ScreenshotNeo API documentation for request options. Sign up for 1,000 free screenshots a month, with no card required.

8. Frequently asked questions

Does changing the viewport guarantee an exact output image size?

It sets the browser viewport. Full-page, selector, and framed captures can produce asset dimensions that differ, so use the response metadata to confirm the actual result.

Can I request WebP directly?

The reviewed parameter reference documents PNG and JPEG request formats, not a confirmed WebP request value. WebP may be delivered as a CDN optimization to compatible browsers.

What is the documented maximum screenshot dimension?

No universal maximum width, height, pixel count, or file size is stated in the reviewed official references.

The API overview says its free endpoint can be used without a key and lists a daily allowance. That plan detail can change, so verify it on the current API page before building around it.

Sources