WEB RENDERING

Turn a reachable web page into a browser-rendered production asset

Use Snapshot Site when HTML, CSS, web fonts, client-side JavaScript, responsive breakpoints, and late content must become a stable image, PDF, or rendered HTML result without a local browser service.

HTML + CSS
Layout rendered
JavaScript
Client page state
Output choice
Image, PDF, HTML
Install:curl -X POST https://api.prod.ss.snapshot-site.com/api/v1/screenshot
Auth:SNAPSHOT_SITE_API_KEY
Get started for free
Browser Rendering API workflow
Snapshot Site themed illustration for browser rendering api
Good fits
Dynamic product previews and documentation assets
Server-rendered and client-rendered marketing pages
PDF export from print-aware web pages
Rendered HTML inputs for approved extraction workflows

Rendering is state reconstruction

A URL is only the starting input. Browser state, responsive dimensions, asset readiness, consent UI, and dynamic content decide the final pixels or HTML.

1

Resolve the origin

A reachable page gives relative assets, fonts, scripts, and security policy a real browser origin.

2

Select layout

Viewport dimensions trigger the same responsive rules as a browser window.

3

Reach readiness

Wait for the page-specific state rather than assuming the first load event is visually complete.

4

Choose output

Image, PDF, and rendered HTML serve different downstream consumers.

Implementation workflow

Build a reliable browser rendering api job

1

Expose the intended page at an approved URL

2

Choose viewport and output format

3

Apply readiness and cleanup options

4

Validate and persist the returned asset

Browser Rendering API example

Example

Start a browser rendering api request

Keep credentials server-side, check the response, and persist the returned asset only after validation.

curl --request POST   --url https://api.prod.ss.snapshot-site.com/api/v2/screenshot   --header 'Content-Type: application/json'   --header 'x-snapshotsiteapi-key: YOUR_API_KEY'   --data '{
    "url": "https://example.com/dynamic",
    "format": "html",
    "width": 1280,
    "height": 720,
    "delay": 2,
    "hideCookie": true,
    "hide": ".live-clock,.chat-widget"
  }'

Browser Rendering API: define the result before the browser

A browser rendering API converts a URL into the state a modern browser produces after HTML parsing, stylesheet layout, font loading, JavaScript execution, and asynchronous content work. That process is more than downloading markup.

Snapshot Site keeps the input model deliberately URL-based. Hosting a template or preview gives relative assets and scripts a real origin and prevents the API from pretending an isolated HTML string has the same environment as the application.

The output choice changes the capture policy. A screenshot needs visual stability, a PDF needs print-aware CSS and pagination review, and rendered HTML needs careful downstream sanitization and extraction.

A production workflow

A URL is only the starting input. Browser state, responsive dimensions, asset readiness, consent UI, and dynamic content decide the final pixels or HTML. A useful implementation separates request creation, browser work, result validation, storage, and downstream review. That separation makes failures observable and prevents a rendering option from becoming undocumented business logic.

  1. Expose the intended page at an approved URL.
  2. Choose viewport and output format.
  3. Apply readiness and cleanup options.
  4. Validate and persist the returned asset.

Version the rendering specification with the artifact: route or document identity, viewport, readiness signal, CSS or JavaScript preparation, output format, and capture time. This turns a visual result into traceable production data.

Controls that determine the output

Asset availability

Fonts, images, and scripts must be reachable from the rendering environment. A local filesystem path in CSS cannot resolve in the hosted browser.

Hydration and data

Client-rendered pages may complete after navigation. Wait for the smallest reliable interval or use a deterministic preview state.

Print behavior

PDF output follows browser print behavior. Test page breaks, backgrounds, fixed elements, and print styles rather than applying screenshot assumptions.

HTML handling

Treat returned HTML as untrusted web content. Parse it in a controlled backend and never inject it blindly into an administrative interface.

Security and product boundary

Snapshot Site renders reachable URLs. It does not accept arbitrary raw HTML as a screenshot input and does not expose a persistent browser session for interactive flows.

Allow only approved rendering destinations and review any preparation code before execution. Credentials stay server-side, while screenshots, HTML, and PDFs inherit the access and retention rules of the content they contain.

Production checklist

  • Publish a stable preview URL.
  • Make dependent assets reachable.
  • Choose output based on the consumer.
  • Remove only documented transient regions.
  • Store request settings with every artifact.

Follow the API documentation for supported rendering controls, explore JavaScript rendering for dynamic state, and consult pricing before expanding a representative fixture set.

Browser Rendering API FAQ

Does a browser rendering API execute JavaScript?

Yes. The page is opened in a managed browser. Use a measured delay or documented DOM readiness controls when important content appears asynchronously.

Can I send raw HTML directly?

Snapshot Site screenshot endpoints require an HTTP or HTTPS URL. Host the document on a controlled preview route before rendering it.

Is rendered HTML the same as an image?

No. Rendered HTML preserves a DOM-oriented representation for downstream processing, while an image records final visual pixels.

Can the API render a private localhost page?

The service needs a reachable approved URL. Deploy a preview environment or use a secure tunneling approach authorized for the content.

What is a Browser Rendering API?

Render JavaScript websites through a managed browser API and return images, PDFs, or HTML. Control responsive viewport, timing, cleanup, and full-page output.

Which Snapshot Site endpoint should I use for browser rendering api?

Use /api/v1/screenshot for basic capture, /api/v2/screenshot for advanced preparation, /api/v3/analyze for rendered-page analysis, or /api/v3/compare for before-and-after visual comparison.

Does browser rendering api work with dynamic pages?

A managed browser renders JavaScript. Use the smallest reliable delay or documented DOM readiness controls when meaningful content appears after initial navigation.

How should I protect the Snapshot Site API key?

Keep it in server-side environment or secret management and send it only through the x-snapshotsiteapi-key header. Never expose it in public client code.

Test one browser rendering api workflow

Start with a representative authorized URL, preserve the request settings, and review the output before expanding volume.