Capture website screenshot
Capture a screenshot of a public web page URL as a hosted image artifact.
Headers
Get your API keyAPI key (`sfk_...`)
Web page URL to fetch.
min 1 chars · max 2083 chars
When true, capture the full scrollable page. Default: false (viewport).
Viewport width in CSS pixels. Default: 1280.
≥ 320 · ≤ 3840
Viewport height in CSS pixels. Default: 800.
≥ 320 · ≤ 3840
Device scale factor (1–3). Default: 1.
≥ 1 · ≤ 3
CSS selector to clip the screenshot to a single element. Cannot be combined with fullPage.
min 1 chars · max 500 chars
Output image format. Default: png.
one of: png, jpeg, webp
JPEG/WebP quality 1–100. Invalid when format is png.
≥ 1 · ≤ 100
Extra settle delay in milliseconds after load (0–10000).
≥ 0 · ≤ 10000
CSS selector to wait for before capturing.
min 1 chars · max 500 chars
Navigation wait condition. `networkidle` is bounded and resolves on idle or a short cap, whichever comes first. Default: load.
one of: load, domcontentloaded, networkidle
Dismiss/block cookie consent banners. Default: true.
Block ads and trackers during render. Default: true.
Request prefers-color-scheme: dark. Default: false.
Optional ISO 3166-1 alpha-2 country for geo-located rendering (+1 credit).
Cache behavior. `enabled`: read from cache if present, else fetch and write to cache. `bypass`: always fetch fresh, ignoring and not updating the cache. `write_only`: always fetch fresh, but write the result to cache without reading from it first. Default: `enabled`.
one of: enabled, bypass, write_only
Optional Redis artifact-cache TTL in seconds (60–604800). Must stay strictly below the 7-day object lifetime.
≥ 60 · ≤ 604800
Delivery mode. `url` (default) returns a hosted CDN URL valid for 7 days. `base64` returns the image bytes inline when small enough.
one of: url, base64
Endpoint-specific response payload.
Whether page content could be extracted. Restricted means bot protection or similar access controls blocked automated fetching.
one of: found, restricted
URL that was rendered.
Final URL after redirects, when available.
HTTP status of the main document when available; null when restricted.
Document title when available.
Hosted screenshot artifact when capture succeeded (found or restricted). Null only when no image was produced.
Public HTTPS URL of the artifact on the media CDN. Valid until expiresAt.
Encoded image format of the artifact.
one of: png, jpeg, webp
MIME type of the artifact, e.g. image/png.
min 1 chars
Artifact size in bytes.
≥ 0
Pixel width when known; null for non-raster artifacts.
≥ 0
Pixel height when known; null for non-raster artifacts.
≥ 0
ISO 8601 timestamp when the hosted URL expires and the object is deleted.
Base64-encoded image bytes when response=base64 and the payload is within size limits.
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
True when served from shared response cache. Credits still apply (full endpoint price); Age header may be present.
Code example
curl "https://api.socialfetch.dev/v1/web/screenshot?url=https://www.socialfetch.dev" \
-H "x-api-key: YOUR_API_KEY"Responses
Screenshot capture result.