All API endpoints require an API key. Pass it via the x-api-key header or key query parameter.
curl -H "x-api-key: ds_your_key_here" https://diffshot.grabshot.dev/v1/screenshot?url=https://example.com
Compare two URLs or a URL against a baseline image.
url1 + url2 — Two URLs to compareurl + baseline — URL + base64 PNG baseline imagewidth (optional) — Viewport width, default 1280height (optional) — Viewport height, default 800curl -X POST "https://diffshot.grabshot.dev/v1/diff" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url1":"https://example.com","url2":"https://example.org"}'
{
"success": true,
"diff": {
"diffPercent": 42.5,
"changedPixels": 435200,
"totalPixels": 1024000,
"width": 1280,
"height": 800,
"diffImage": "data:image/png;base64,..."
}
}
Take a screenshot of a URL. Useful for creating baselines.
url (required) — URL to screenshotwidth (optional) — Viewport width, default 1280height (optional) — Viewport height, default 800curl "https://diffshot.grabshot.dev/v1/screenshot?url=https://example.com" \
-H "x-api-key: YOUR_KEY"
No-auth demo endpoint. Compares two example URLs.
curl "https://diffshot.grabshot.dev/v1/demo/diff"
Health check. No auth required.
curl "https://diffshot.grabshot.dev/v1/health"
POST /v1/register — Register with {"email":"..."}POST /v1/login — Login with {"key":"ds_..."}GET /v1/account — Get account info (auth required)GET /v1/keys — List API keys (auth required)POST /v1/keys — Create new API key (auth required)DELETE /v1/keys/:id — Revoke an API key (auth required)