Response Types
Choose how the result is delivered: raw binary, Base64 string, JSON with a hosted URL, or just the URL as plain text.
The response_type parameter controls the response format:
- binary (default): Raw image bytes. Content-Type matches the format.
- base64: Base64-encoded image string. Useful for embedding in JSON or HTML.
- json: JSON object with a hosted URL, dimensions, file size, and 24-hour expiry.
- url: Just the hosted URL as a plain-text string. Same storage as json.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
response_type | string | optional | binary (default), base64, json, or url. |
Code Examples
# Binary (default)
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com" -o out.png
# Base64
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&response_type=base64"
# JSON with metadata
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&response_type=json"
# URL only (plain text)
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&response_type=url"Response
(Raw PNG bytes, Content-Type: image/png)