Web Capture

Screenshot API

Capture any public web page as a branded PNG, JPEG, or PDF. Full-page scrolls, mobile and desktop viewports, element-level capture, and dark mode emulation — all under 3 seconds, cached to the edge CDN.

Requires a paid plan. Get your API key at 1frx.com/dashboard.html

How it works

Request

Endpoint: POST /api/screenshot

Requires: X-1FRX-Key header

Parameters

Parameter Type Description
url string, required Public https:// URL to capture
format string, optional "png" (default), "jpeg", "webp", "pdf"
device string, optional "desktop" (1280×800, default), "laptop" (1440×900), "tablet" (768×1024), "mobile" (390×844)
viewport object, optional Custom { width, height } — overrides device
fullPage boolean, optional Capture full scroll height (default: true)
quality number, optional 1–100 for jpeg/webp (default: 90)
delay number, optional ms to wait after page load (default: 0)
darkMode boolean, optional Emulate prefers-color-scheme: dark (default: false)
blockAds boolean, optional Remove ad elements (default: true)
selector string, optional CSS selector to capture only one element

Example request

curl -X POST https://api.1frx.com/v1/screenshot \
  -H "X-1FRX-Key: sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://1frx.com",
    "device": "desktop",
    "format": "png",
    "fullPage": true,
    "blockAds": true
  }'

Response

{
  "success": true,
  "url": "https://assets.1frx.com/screenshots/b7d3e9f2.png",
  "width": 1280,
  "height": 800,
  "format": "png",
  "device": "desktop",
  "full_page": true,
  "size_bytes": 348210,
  "captured_at": "2024-03-15T14:22:01.000Z",
  "source_url": "https://1frx.com"
}

Device presets

Device Dimensions
desktop 1280×800
tablet 768×1024 (mobile UA)
mobile 390×844 (3× DPR, mobile UA)
laptop 1440×900

Common use cases

PDF capture

When format is "pdf", the output is a full A4-format PDF of the page. Useful for saving landing pages, reports, and articles as documents. Background colors are preserved.