curl --request POST \
--url https://api.snapopa.com/capture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com"
}
'{
"success": true,
"error": null,
"data": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileUrl": "<string>",
"fromCache": true,
"tokenCost": 123,
"processingTimeMs": 123,
"metadata": {
"url": "<string>",
"capturedAt": "2023-11-07T05:31:56Z",
"format": "<string>",
"mimeType": "<string>",
"fileSizeBytes": 123,
"viewport": {
"width": 123,
"height": 123
},
"fullPage": true,
"expiresAt": "2023-11-07T05:31:56Z"
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}Create Screenshot or PDF
Captures a screenshot or PDF of a specified URL with customizable options.
Token Cost
Base cost: 1 token
Additional costs:
- Anti-Bot Mode: +1 token
curl --request POST \
--url https://api.snapopa.com/capture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com"
}
'{
"success": true,
"error": null,
"data": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fileUrl": "<string>",
"fromCache": true,
"tokenCost": 123,
"processingTimeMs": 123,
"metadata": {
"url": "<string>",
"capturedAt": "2023-11-07T05:31:56Z",
"format": "<string>",
"mimeType": "<string>",
"fileSizeBytes": 123,
"viewport": {
"width": 123,
"height": 123
},
"fullPage": true,
"expiresAt": "2023-11-07T05:31:56Z"
}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>"
},
"data": null
}Authorizations
API key authentication. Get your API key at https://snapopa.com/dashboard
Body
URL to capture
2048Raw or base64-encoded HTML to render. Mutually exclusive with url.
1048576Return JSON metadata or the raw file.
json, file Output file format. One of: png, jpeg, webp, pdf.
png, jpeg, webp, pdf Reuse cached results to avoid duplicate captures.
Show child attributes
Show child attributes
Viewport dimensions.
Show child attributes
Show child attributes
Browser prefers-color-scheme value.
light, dark, no-preference Image quality for JPEG and WebP. Ignored for other formats.
1 <= x <= 100CDN storage lifetime in seconds. Ignored when persistence is enabled.
60 < x <= 2592000Capture the full scrollable page. Overrides viewport height.
Process in the background and return immediately.
Long-term storage with optional auto-refresh.
Show child attributes
Show child attributes
Navigation timeout in milliseconds.
5000 <= x <= 120000Page load state to wait for before capturing.
load, domcontentloaded, networkidle, commit Max time in milliseconds to wait for images to load. Returns early if all images load sooner.
0 <= x <= 15000Extra wait in milliseconds after page load before capturing. Useful for animations or delayed content.
0 <= x <= 15000Geographic region for browser rendering.
auto, us-east, us-west, eu-west, eu-central, asia-east, asia-southeast Use stealth providers to bypass bot detection.
Block ads, trackers, and media to speed up captures.
Show child attributes
Show child attributes