API REFERENCE

Choose the output format from the job the artifact must perform

Snapshot Site can produce PNG, JPEG, WebP, PDF, and rendered HTML through its documented screenshot workflow. Format choice affects fidelity, compatibility, downstream processing, storage, and review—not page readiness.

3 image types
PNG, JPEG, WebP
PDF
Document output
HTML
Rendered DOM output
Install:format: png | jpeg | webp | pdf | html
Auth:SNAPSHOT_SITE_API_KEY
Get started for free
Screenshot response formats
Snapshot Site themed screenshot API response formats illustration
Good fits
Teams defining a capture data contract
Applications supporting several artifact consumers
Developers selecting a format for storage and review
Documentation for typed SDK request models

Rendering configuration comes before encoding

All formats depend on reaching the correct page state. Viewport, full-page behavior, timing, and cleanup should not become implicit merely because the output changes.

1

PNG

Lossless raster output for sharp interface evidence and controlled visual baselines.

2

JPEG

Lossy raster output for photographic previews where exact pixels are not required.

3

WebP

Modern raster output when the entire storage and consumer path supports it.

4

PDF and HTML

Document or rendered-DOM artifacts for workflows that need more than an image.

Implementation workflow

Select and validate a response format

1

Name the consumer and evidence requirement

2

Choose the format supported by its complete processing path

3

Send an explicit screenshot request and check status

4

Validate the artifact before storing or presenting it

Screenshot API format examples

JSON

Select a format in the request

Change the format only after the viewport and intended page state are defined.

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

Format is part of the data contract

A screenshot service may feed a review UI, archive, document system, diff engine, CMS, or parser. Each consumer has different expectations. Record the chosen format in the job specification and explain why it is suitable.

Avoid converting between formats repeatedly without preserving the original artifact and provenance. Each conversion can change pixels, metadata, or document behavior.

Image formats

PNG keeps raster data lossless and suits sharp UI evidence. JPEG is lossy and can suit photographic previews. WebP is a modern web-oriented format that requires compatibility through the entire processing chain. None of these choices defines when the page is ready.

Test small text, gradients, photography, transparency expectations, and final display size on representative routes.

Document and rendered-DOM outputs

PDF is appropriate when the consumer needs a document rather than an image. Validate page breaks, print styles, fonts, and downstream document handling. Rendered HTML is data: parse it safely and preserve the context that produced it.

A returned link or structured response is not complete success until the application validates expected fields and imports the artifact when stable ownership is required.

Use the individual PNG, JPEG, WebP, and HTML guides for format-specific implementation decisions.

Screenshot API Response Formats FAQ

Which screenshot response formats are supported?

The documented screenshot workflow supports PNG, JPEG, WebP, PDF, and rendered HTML output.

Which format is best for visual regression?

A controlled lossless PNG is a practical baseline when exact pixel evidence matters. Keep every capture setting identical.

When should I choose JPEG?

Use it for visually rich previews where lossy compression is acceptable and small interface details are not the primary evidence.

When should I choose WebP?

Use it when the full storage, processing, review, and delivery path supports WebP and the result fits the visual requirement.

Is PDF just a long screenshot?

No. Treat PDF as a document output with its own consumer and validation needs. Test page layout and print-related behavior.

What is rendered HTML useful for?

It supports authorized parsing, DOM analysis, and debugging after client JavaScript has built the page.

Does changing format change readiness?

No. The requested page must still reach the intended state before any output is meaningful.

What should response validation check?

Check HTTP status, expected structured fields, artifact availability, format expectations, and storage outcome before marking the job ready.

Document the format contract for one workflow

Name the consumer, choose the artifact intentionally, and validate it with representative pages before standardizing.