💡 Try this endpoint in the Playground →

Screenshots

Capture web pages as images, compare designs, detect visual regressions, and audit design systems — all via a single API.

All Endpoints

POST/v1/screenshot

Single screenshot. 1 credit.

POST/v1/screenshot/filmstrip

Scroll-through frames. 1 credit.

POST/v1/screenshot/viewports

Multiple viewports at once. N credits (one per viewport).

POST/v1/screenshot/diff

Visual regression diff between two URLs. 2 credits.

POST/v1/screenshot/design-audit

Section-by-section audit screenshots. Variable credits.

POST/v1/screenshot/design-analysis

AI design analysis of a page. 1 credit.

GET/v1/design-compare

Compare design of two URLs with scoring. 2 credits.

POST/v1/screenshot/animation

Capture animation/scroll as timed frames. 1 credit.

POST/v1/review

Combined: 3 viewports + design audit. 4 credits.

All screenshot endpoints require authentication (Authorization: Bearer YOUR_API_KEY). Responses include base64-encoded image data. Use "responseFormat": "binary" to get raw image bytes instead.

POST /v1/screenshot — Basic Screenshot

Request Body

ParameterTypeDefaultDescription
urlstringRequired. The URL to screenshot.
fullPagebooleanfalseCapture the full scrollable page height.
widthnumber1280Viewport width in pixels (100–5000).
heightnumber720Viewport height in pixels (100–5000).
formatstring"png"Image format: png, jpeg, or jpg.
qualitynumberJPEG quality (1–100). Only used with jpeg/jpg format.
waitFornumberMilliseconds to wait after page load (0–60000).
selectorstringCSS selector — screenshot only this element.
actionsarrayBrowser actions to perform before screenshotting (click, type, scroll, etc.).
stealthbooleanfalseEnable stealth mode for Cloudflare-protected pages.
scrollThroughbooleanfalseScroll through the page before capturing (triggers lazy-loaded content).
headersobjectCustom HTTP headers to send with the request.
responseFormatstring"json"Set "binary" to receive raw image bytes instead of base64 JSON.

Response

{
  "success": true,
  "data": {
    "url": "https://example.com",
    "screenshot": "data:image/png;base64,iVBORw0KGgo...",
    "metadata": {
      "sourceURL": "https://example.com",
      "format": "png",
      "width": 1280,
      "height": 720,
      "fullPage": false
    }
  }
}

POST /v1/screenshot/filmstrip

Scrolls through the page and captures evenly-spaced frames, useful for previewing long pages.

Request Body

ParameterTypeDefaultDescription
urlstringRequired.
framesnumber6Number of frames to capture (2–12).
widthnumber1280Viewport width (100–5000).
heightnumber720Viewport height (100–5000).
formatstring"png"Image format.
stealthbooleanfalseStealth mode.

Response

{
  "success": true,
  "data": {
    "url": "https://example.com",
    "format": "png",
    "frameCount": 6,
    "frames": [
      { "index": 0, "scrollY": 0, "screenshot": "data:image/png;base64,..." },
      { "index": 1, "scrollY": 720, "screenshot": "data:image/png;base64,..." }
    ]
  }
}

POST /v1/screenshot/viewports

Capture the same URL at multiple viewport sizes in a single request. Perfect for responsive design testing.

Request Body

ParameterTypeDefaultDescription
urlstringRequired.
viewportsarrayRequired. Array of {"width": N, "height": N, "label": "..."} objects. Max 6.
fullPagebooleanfalseFull-page capture for all viewports.
formatstring"jpeg"Image format.
qualitynumberJPEG quality (1–100).

Response

{
  "success": true,
  "data": {
    "url": "https://example.com",
    "format": "jpeg",
    "viewports": [
      { "label": "mobile", "width": 375, "height": 812, "screenshot": "data:image/jpeg;base64,..." },
      { "label": "desktop", "width": 1440, "height": 900, "screenshot": "data:image/jpeg;base64,..." }
    ]
  }
}

POST /v1/screenshot/diff

Compare two URLs pixel-by-pixel and return a diff image highlighting changes.

Request Body

ParameterTypeDefaultDescription
url1stringRequired. First URL (baseline).
url2stringRequired. Second URL (comparison). Must differ from url1.
widthnumber1280Viewport width.
heightnumber720Viewport height.
fullPagebooleanfalseFull-page comparison.
thresholdnumber0.1Per-pixel difference threshold (0–1). Higher = more tolerant.

Response

{
  "success": true,
  "data": {
    "diff": "data:image/png;base64,...",
    "diffPixels": 4821,
    "totalPixels": 921600,
    "diffPercent": 0.52,
    "dimensions": { "width": 1280, "height": 720 }
  }
}

POST /v1/screenshot/design-audit

Screenshot each major section of a page (e.g. <section> elements) individually. Useful for component-level visual audits.

Request Body

ParameterTypeDefaultDescription
urlstringRequired.
selectorstring"section"CSS selector for elements to capture individually.
rulesobjectCustom audit rules object.
scrollThroughbooleanfalseScroll before capturing to trigger lazy-loaded content.

Response

{
  "success": true,
  "data": {
    "url": "https://example.com",
    "format": "jpeg",
    "sections": [
      { "index": 0, "tag": "section", "id": "hero", "className": "hero", "top": 0, "height": 600, "screenshot": "..." },
      { "index": 1, "tag": "section", "id": "features", "className": "features", "top": 600, "height": 400, "screenshot": "..." }
    ]
  }
}

POST /v1/screenshot/design-analysis

AI-powered analysis of a page's design — colors, typography, layout structure, and UX observations.

Request Body

ParameterTypeDefaultDescription
urlstringRequired.
selectorstringAnalyze only a specific element.
widthnumber1280Viewport width.
stealthbooleanfalseStealth mode for protected pages.

Response

{
  "success": true,
  "data": {
    "url": "https://example.com",
    "analysis": {
      "colors": ["#18181B", "#FFFFFF", "#3B82F6"],
      "typography": { "headingFont": "Inter", "bodyFont": "Inter" },
      "layout": "single-column with hero, features grid, and CTA",
      "observations": ["Strong contrast ratio", "Consistent spacing", "Mobile-first layout"]
    }
  }
}

GET /v1/design-compare

Compare the design quality of two URLs and receive a similarity score with improvement suggestions.

Query Parameters

ParameterTypeDescription
urlstringRequired. Subject URL to evaluate.
refstringRequired. Reference URL (benchmark design).
widthnumberViewport width (100–5000).
heightnumberViewport height (100–5000).

POST /v1/screenshot/animation

Capture a sequence of frames at regular intervals to visualize animations, transitions, or scrolling behavior.

Request Body

ParameterTypeDefaultDescription
urlstringRequired.
framesnumber6Number of frames to capture (1–30).
intervalMsnumber500Milliseconds between frames (50–10000).
scrollTonumberScroll to this Y position before starting capture.
selectorstringCapture only this element.
formatstring"jpeg"Image format.

POST /v1/review

Convenience endpoint that runs mobile + tablet + desktop screenshots AND a design audit in one request.

Request Body

ParameterTypeDescription
urlstringRequired.
rulesobjectCustom design audit rules.
selectorstringCSS selector for the audit.

Examples

curl -X POST https://api.webpeel.dev/v1/screenshot \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://webpeel.dev",
    "fullPage": true,
    "width": 1440,
    "format": "jpeg",
    "quality": 85
  }'
curl -X POST https://api.webpeel.dev/v1/screenshot/viewports \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://webpeel.dev",
    "viewports": [
      { "width": 375, "height": 812, "label": "mobile" },
      { "width": 768, "height": 1024, "label": "tablet" },
      { "width": 1440, "height": 900, "label": "desktop" }
    ],
    "format": "jpeg",
    "quality": 80
  }'
curl -X POST https://api.webpeel.dev/v1/screenshot/diff \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url1": "https://staging.example.com",
    "url2": "https://production.example.com",
    "width": 1280,
    "height": 800,
    "threshold": 0.05
  }'
# Runs mobile + tablet + desktop + design audit in one request (4 credits)
curl -X POST https://api.webpeel.dev/v1/review \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://webpeel.dev"
  }'