Screenshots and PDF
Capture a rendered page as an image or a PDF in the same request that fetches its content. See the Screenshot API overview.
Screenshot
Full page
advanced.screenshot captures the whole page and returns screenshot_url. It requires render_js set to true; auto is rejected.
curl -X POST https://api.alterlab.io/api/v1/scrape \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/pricing",
"advanced": {"render_js": true, "screenshot": true}
}'consent to accept or reject to click the banner instead.Viewport
A screenshot action captures at that point in a browser action sequence. full_page defaults to true; set it to false for the visible viewport. Each captured image costs $0.0002, and a failed capture is free.
curl -X POST https://api.alterlab.io/api/v1/scrape \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/pricing",
"advanced": {
"render_js": true,
"actions": [{"type": "screenshot", "full_page": false}]
}
}'Formats
The capture is delivered as a stored image at screenshot_url and a document at pdf_url. The request has no option to choose an image format, quality or viewport size.
Element capture
Capturing a single element by selector is not available. A screenshot covers the full page or the viewport. Use the browser actions to scroll or click to the state you want, then capture.
PDF generation
Set advanced.generate_pdf to true with render_js true. The response carries pdf_url.
curl -X POST https://api.alterlab.io/api/v1/scrape \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/pricing",
"advanced": {"render_js": true, "generate_pdf": true}
}'Pricing
Captures need browser rendering, billed at the $0.004 browser tier. A screenshot adds $0.0002 and a PDF adds $0.0004. See pricing.