Skip to main content
POST
/
capture
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"
    }
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Get your API key at https://snapopa.com/dashboard

Body

application/json
url
string<uri>

URL to capture

Maximum string length: 2048
html
string

HTML content to render. Accepts raw HTML or base64-encoded HTML (auto-detected). Mutually exclusive with url parameter.

Maximum string length: 1048576
async
boolean
default:false

Whether to process the capture asynchronously and return the response immediately. The capture will be processed in the background.

responseType
enum<string>
default:json

Response format (json metadata or direct file)

Available options:
json,
file
format
enum<string>
default:jpeg

Output format for the capture. Supported formats are png, jpeg, webp, pdf.

Available options:
png,
jpeg,
webp,
pdf
responseCache
object

Response cache configuration. Controls whether to check for existing cached results to avoid duplicate API costs.

cdn
object

CDN storage configuration. Controls how captures are stored and accessed via CDN.

viewport
object

Viewport dimensions for the capture

colorScheme
enum<string>
default:light

Browser color scheme preference. Controls prefers-color-scheme media query. Options: light, dark, no-preference.

Available options:
light,
dark,
no-preference
isFullPage
boolean
default:false

Capture full page or just viewport. If true, viewport dimensions are ignored.

quality
integer
default:85

Image quality for JPEG/WebP formats (1-100). Only applies to jpeg, jpg, and webp formats.

Required range: 1 <= x <= 100
timeout
integer
default:30000

Navigation timeout in milliseconds. Minimum is 5000ms (5s), maximum is 120000ms (120s).

Required range: 5000 <= x <= 120000
waitUntil
enum<string>
default:domcontentloaded

Page load state to wait for before capturing. Options: load, domcontentloaded, networkidle, commit.

Available options:
load,
domcontentloaded,
networkidle,
commit
imageLoadTimeout
integer
default:5000

Maximum time in milliseconds to wait for images to finish loading. Returns early if all images load sooner. Minimum is 0ms, maximum is 15000ms (15s), default is 5000ms.

Required range: 0 <= x <= 15000
delay
integer
default:0

Extra wait time in milliseconds before capturing the screenshot, after page has loaded. Useful for pages with animations or delayed content. Minimum is 0ms, maximum is 15000ms (15s), default is 0ms.

Required range: 0 <= x <= 15000
antiBot
boolean
default:false

Enable anti-bot detection bypass. When enabled, uses browser providers with stealth capabilities to avoid bot detection.

region
enum<string>
default:auto

Geographic region for browser rendering. Options: auto, us-east, us-west, eu-west, eu-central, asia-east, asia-southeast. Use for geo-targeted captures or latency optimization.

Available options:
auto,
us-east,
us-west,
eu-west,
eu-central,
asia-east,
asia-southeast
block
object

Resource blocking configuration. Block ads, trackers, media, and hide cookie/popup banners to improve captures.

Response

Capture created successfully

success
enum<boolean>
required
Available options:
true
error
unknown
required
data
object
required