---
title: "Screenshot of a public web page"
method: POST
path: "/screenshot"
tags: ["Images"]
---

# Screenshot of a public web page

`POST /screenshot`

## Request

- Base URL: `https://api.cofferdock.com`
- URL: `https://api.cofferdock.com/screenshot`
- Auth: API key in header `x-api-key`

Loads a public URL in a real browser (JavaScript enabled) and takes a screenshot. Private networks and internal addresses are blocked.

Costs 1 credit per call.

## Request body

- object
  - `url` string, uri, required: Public http(s) URL to capture.
  - `width` integer: Browser window width in pixels (100-3840). Default 1280.
  - `height` integer: Browser window height in pixels (100-2160). Default 800. Ignored if full_page is true.
  - `format` 'png' | 'jpeg': Image format: "png" (default) or "jpeg".
  - `quality` integer: JPEG only.
  - `full_page` boolean: true = capture the whole scrollable page, not just the first screen. Default false.
  - `wait_ms` integer: Extra time to wait after the page loads and before capturing, in milliseconds (0-5000). Use it for pages that render late. Default 0.
  - `output` 'json' | 'binary' | 'url' | 'image': How to return the image: "json" (base64 in the JSON response), "binary" (the image itself, ready for n8n/Make/Zapier) or "url" (a temporary download link, valid 15 minutes). Default: json when the request is JSON, binary when the input was sent raw.

## Response `200`

The resulting image (shape depends on `output`).

- union
  - object
    - `success` boolean
    - `image` string, byte
    - `mime_type` 'image/png' | 'image/jpeg'
    - `meta` object
      - `size_bytes` integer
      - `width` integer
      - `height` integer
      - `used` integer: Credits used this month, after this call.
      - `remaining` integer, nullable: Credits left this month (null = unlimited).
      - `unlimited` boolean
  - object: Returned when output=url: a temporary download link (valid 15 minutes).
    - `success` boolean
    - `url` string, uri: Temporary download link. Expires in 15 minutes.
    - `expires_at` string, date-time
    - `mime_type` string
    - `size_bytes` integer
    - `meta` object
      - `used` integer: Credits used this month, after this call.
      - `remaining` integer, nullable: Credits left this month (null = unlimited).
      - `unlimited` boolean

## Other responses

- `400`: Invalid input (nothing is charged).
- `401`: Missing or invalid API key.
- `403`: Email not verified.
- `429`: Monthly credit limit reached, or too many requests per minute for this key (see Retry-After).
- `502`: The URL could not be loaded (blocked, private or unreachable).
- `503`: Server busy (queue full). Retry after the seconds in the Retry-After header.

---

[API](https://skmtc.dev/cofferdock/apis/cofferdock-api.md) · [All operations](https://skmtc.dev/cofferdock/apis/cofferdock-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cofferdock/apis/cofferdock-api/revisions/b57aa000d33a?raw)
