All API tools

Web & HTTP

Website Screenshot API

GET/v1/screenshot Paid10 credits / call

Authentication

Send your API key as a bearer token. Create one free in the dashboard.

Authorization: Bearer $TOOLSXPO_KEY

Parameters

Passed as query-string parameters. Example values shown.

NameExample
urlhttps://example.com
fullPagefalse
formatpng
width1280
height800

Example request

curl "https://api.toolsxpo.com/v1/screenshot?url=https%3A%2F%2Fexample.com&fullPage=false&format=png&width=1280&height=800" \
  -H "Authorization: Bearer $TOOLSXPO_KEY"

Response

A standard JSON envelope: { ok, data, meta }. The result is in data (json); meta.credits reports what the call cost.

How to use the Screenshot API

Capture a pixel-perfect PNG or JPEG of any public web page. A real headless browser loads the URL, waits for it to render, and returns the image base64-encoded inside the JSON envelope (the API is JSON-only) — so you decode data.base64 to get the file.

Options that matter

  • fullPagefalse (default) captures just the viewport; true captures the entire scrollable page. Use true for long articles, false for above-the-fold previews and social cards.
  • formatpng for crisp UI/text (lossless), jpeg for photo-heavy pages and smaller payloads.
  • width / height — the viewport, in pixels. Set a mobile width (e.g. 390) to capture responsive layouts.

Turning the result into a file

JAVASCRIPT
const res = await fetch(
  "https://api.toolsxpo.com/v1/screenshot?url=https://example.com&fullPage=true",
  { headers: { Authorization: `Bearer ${process.env.TOOLSXPO_KEY}` } },
);
const { data } = await res.json();
// Node: write it to disk
import { writeFileSync } from "node:fs";
writeFileSync("shot.png", Buffer.from(data.base64, "base64"));
// Browser: embed it directly
img.src = `data:${data.contentType};base64,${data.base64}`;

Tips & gotchas

  • Pages behind a login or a hard bot-wall can't be captured — the browser sees what an anonymous visitor sees.
  • Very heavy pages may take a few seconds; the call waits for render, so budget for it in your own timeouts.
  • This is a paid tool (it runs a real browser). Any credit purchase or plan unlocks it.