URL to Image API

URL to image API for turning public web pages into PNG or JPEG

Send Scrnpix a public URL, viewport, and output format. The screenshot API renders the page in a hosted browser and returns image bytes you can save, attach, or pass into downstream workflows.

Good fit

  • Converting public landing pages, docs, changelogs, and articles into image files.
  • Creating product previews, thumbnails, and workflow attachments from live URLs.
  • Adding URL-to-image capture to automation without maintaining Chromium, Playwright, or Puppeteer infrastructure.

Not a fit

  • Private pages, logged-in dashboards, or URLs that need a browser session.
  • Custom image templating, OG card composition, or design generation from arbitrary text.
  • Full visual-review platforms with diffing, approvals, and collaboration built in.

Example request

The integration surface stays small on purpose: one endpoint, one key header, and a few predictable parameters.

curl "https://api.scrnpix.com/screenshot?url=https%3A%2F%2Fexample.com&width=1280&height=720&format=png" \
  -H "X-KEY: your-api-key" \
  -o url-to-image.png

Supported parameters

url

https://example.com

The public HTTP or HTTPS URL to render into an image.

width

1280

Viewport width in pixels before the screenshot is captured.

height

720

Viewport height in pixels for the rendered page image.

format

png

Use `png` for lossless output or `jpeg` for a smaller image file.

full_page

false

Set to `true` when the image should include the full scrollable page.

Sample output

  • Returns image bytes directly as `image/png` when `format=png` is requested.
  • Returns `image/jpeg` when `format=jpeg` is requested for smaller files.
  • Each screenshot costs 1 credit and includes the `X-Credit-Cost` response header.
  • Responses are cache-friendly for repeated captures of the same public URL and capture settings.

Known boundaries

  • Scrnpix captures public URLs only. Localhost, private networks, and authenticated pages are outside the hosted API flow.
  • Cookie banners, chat widgets, and other public overlays appear when the target site renders them for normal visitors.
  • The API returns a rendered image, not parsed HTML, extracted text, or structured crawl data.

Related docs and tools

Use these resources to validate the endpoint behavior, capture mode, and production workflow before automating it.

Pricing examples

Scrnpix charges in credits. Screenshots cost 1 credit. Animations cost 1 credit per second of GIF duration (minimum 1).

Free

50 credits per month for validating URL-to-image conversion in development.

Basic

2,000 credits per month for lightweight preview, documentation, and internal automation jobs.

Growth

10,000 credits per month for recurring capture workflows across product, QA, or ops teams.

No automatic overage billing is exposed in the current product. When you outgrow a monthly credit bucket, move up to the next plan instead of relying on surprise overage charges.

Frequently asked questions

How do I convert a URL to an image with Scrnpix?

Call the /screenshot endpoint with the public URL, your API key in the X-KEY header, and the output settings you need. The response body is the image file.

Which image formats can the API return?

The screenshot endpoint returns PNG by default. Set format=jpeg when you prefer a smaller JPEG file.

Can this capture private app screens?

No. The hosted API is for public URLs. Private pages, logged-in dashboards, and internal URLs need a separate authenticated browser flow before capture.

Get an API key and test the flow end to end

Start with the free tier, verify the capture shape you need, then move up when the workflow becomes recurring.