Home / APIs / screenshot API

Website Screenshot API for Developers

Capture a PNG screenshot of a public URL with one POST. FatBaby fetches the page through SSRF-safe controls and renders with Gotenberg Chromium — useful for previews, monitoring, and automation without running your own browser farm.

Features

What this API actually supports in production today.

  • PNG screenshot from a public URL
  • SSRF-protected URL fetching
  • Chromium rendering via Gotenberg
  • Same API key and credit wallet as other FatBaby APIs
  • Matching browser tool for quick manual captures

Common use cases

  • Generate link previews and social cards
  • Archive page visuals in QA or monitoring jobs
  • Capture marketing pages for change detection
  • Build internal tools that need a visual snapshot of a URL

API endpoints

Base URL https://thefatbaby.com/api. Authenticate with Authorization: Bearer fb_live_YOUR_KEY.

MethodPathSummaryCredits
POST/v1/web/screenshotScreenshot a public URL; returns image/png5 credits per successful capture (default)

Examples

Primary endpoint /v1/web/screenshot · 5 credits per successful request (default; admin overrides may apply)

cURL

curl -X POST https://thefatbaby.com/api/v1/web/screenshot \
  -H "Authorization: Bearer fb_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}' \
  --output screenshot.png

JavaScript

const res = await fetch('https://thefatbaby.com/api/v1/web/screenshot', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer fb_live_YOUR_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ url: 'https://example.com' })
});
const buf = Buffer.from(await res.arrayBuffer());
// Content-Type: image/png

Python

import requests
r = requests.post(
  'https://thefatbaby.com/api/v1/web/screenshot',
  headers={'Authorization': 'Bearer fb_live_YOUR_KEY'},
  json={'url': 'https://example.com'},
  timeout=120,
)
open('screenshot.png', 'wb').write(r.content)

Request

{
  "url": "https://example.com"
}

Binary response: HTTP 200 with Content-Type: image/png and Content-Disposition filename screenshot.png

Pricing & credits

Default charge is 5 credits per successful screenshot. See Pricing for plans and free starting credits.

Common errors

  • 401Missing or invalid API key
  • 402Insufficient credits
  • 400Invalid or blocked URL (SSRF / validation)

FAQ

Does this support full-page and custom viewport options?

The public screenshot endpoint accepts a URL and returns a PNG via Gotenberg. Advanced viewport/full-page knobs are not exposed as separate request fields on this route today.

Can I screenshot private intranet sites?

No. URLs are fetched through SSRF-safe public-network controls. Private/local addresses are blocked.

Is there a browser tool?

Yes — use Screenshot Website under Tools for the same workflow without writing code.

Try without code

Use the matching online tool, then automate the same workflow with this API.