API REFERENCE

Build an explicit screenshot request instead of relying on hidden defaults

Start from the endpoint and intended result, then choose only documented fields that describe target, output, responsive state, readiness, cleanup, and advanced preparation. Preserve the final specification with the artifact.

Target
Authorized URL
State
Viewport and readiness
Output
Format and full page
Install:POST /api/v1, /api/v2, or /api/v3
Auth:SNAPSHOT_SITE_API_KEY
Get started for free
Screenshot request specification
Snapshot Site themed screenshot API request parameters illustration
Good fits
Developers implementing the raw REST contract
SDK maintainers mapping typed request objects
Teams reviewing capture reproducibility
Support diagnostics comparing two requests

Parameters belong to an endpoint contract

Do not assume every field works on every version. Basic capture, advanced preparation, analysis, and comparison expose different operations and response shapes.

1

Target and output

URL and format describe the source and artifact.

2

Responsive state

Width, height, and fullSize select layout and visible or full-document output.

3

Readiness and cleanup

Delay, cookie handling, DOM waiting, and approved selectors shape the captured state.

4

Advanced operations

JavaScript preparation, analysis fields, and before-after comparison require their documented endpoints.

Implementation workflow

Create a reviewed capture specification

1

Choose the endpoint from the intended result

2

Start with required target and output fields

3

Add only measured viewport, readiness, and cleanup options

4

Validate the response and store the complete request context

Screenshot request parameter example

JSON

A basic explicit capture request

Every field corresponds to a visual requirement that should be tested and retained with the result.

{
  "url": "https://example.com",
  "format": "webp",
  "width": 1440,
  "height": 900,
  "fullSize": true,
  "hideCookie": true,
  "delay": 2
}

Start from the operation

A capture endpoint returns an artifact. Analyze returns documented structured insight. Compare accepts two states and returns before, after, diff, and metrics. Selecting an endpoint by version number without naming the result leads to copied fields and unclear behavior.

Read the current contract and create a typed application model that exposes only what the product needs.

Core capture state

URL identifies the target but does not make it authorized. Validate destination at your server boundary. Format selects the artifact. Width and height define responsive viewport, while fullSize chooses visible frame or scrollable document.

Readiness and cleanup require evidence. Add delay only when a measured wait solves a known page state. Use cookie cleanup or selectors only when those elements fall outside the artifact's purpose.

Advanced preparation and analysis

Custom JavaScript changes the rendered page and therefore belongs to a reviewed advanced workflow. Store the script revision with the output. Analysis and comparison fields have separate response contracts; do not mix them into a generic capture object.

Reject or surface unknown fields rather than assuming the provider ignores them. This catches spelling errors and stale client code.

Keep the final request, endpoint operation, response status, artifact reference, and capture time together. Use response formats for output selection and best practices for the production boundary.

Screenshot API Request Parameters FAQ

Which screenshot API parameters are required?

The target URL is fundamental, while exact requirements depend on the selected endpoint. Verify the current contract in API documentation.

What does width control?

It sets the browser viewport width and therefore selects responsive breakpoints and image sources.

What does height control?

It defines the visible viewport height. Full-page mode can extend output beyond that visible frame.

What does fullSize do?

It requests the complete scrollable document rather than only the current viewport, while width still determines responsive layout.

When should delay be used?

Use a measured fixed delay for predictable page settling. Prefer an application or DOM condition when completion varies.

What does hideCookie do?

It supports cleanup of common cookie or consent UI. Verify the actual page because custom banners may require an approved targeted strategy.

Can custom JavaScript be sent on every endpoint?

Use only the advanced endpoint and fields documented for JavaScript preparation. Do not assume cross-version support.

How should unknown parameters be handled?

Fail validation or remove them deliberately. Silently forwarding undocumented fields makes behavior difficult to reason about.

Write one explicit request contract

Start from the result you need, document every field, and preserve the specification with the generated artifact.