Quickstart
From signup to your first capture in a few lines.
1. Get an API key
Create one in the dashboard. It is shown once — we store only a hash, so it cannot be revealed again.
2. Capture a page
curl -G https://api.pagecapture.dev/v1/take \
-H "X-Access-Key: $PAGECAPTURE_KEY" \
--data-urlencode "url=https://example.com" \
-d "format=png" \
-o screenshot.png
That is the whole integration. The response body is the PNG.
3. Handle errors
Errors always come back as JSON with a stable error_code, whatever the HTTP status:
{
"is_successful": false,
"error_code": "selector_not_found",
"error_message": "The requested selector was not found.",
"documentation_url": "https://api.pagecapture.dev/docs/errors/selector_not_found",
"request_id": "req_01..."
}
Branch on error_code, not on the status. The status may change between versions; the code will not.
4. Go to production
- Set
timeoutexplicitly for pages you know are slow. - Turn on
cachefor pages you capture repeatedly — hits are free. - Use
async=truewithwebhook_urlfor anything that does not need to block a user. - Keep the
request_idfrom every response. It is the one thing support needs.
Run this without writing code
These tools call the endpoint documented on this page. Whatever you configure there carries into the playground with you.