CaptureKit

Screenshot API

Browser-like Screenshot API that captures webpages as PNG/JPEG/WebP or PDF for previews, QA, reporting, monitoring, and archiving no headless setup.

Credit cost: 1 credit per request

GET
/v1/capture

Authorization

ApiKeyAuth
x-api-key<token>

Your API key. Include it in the x-api-key header for every request.

In: header

Query Parameters

url*string

The URL of the webpage to capture.

format?string

The output format of the screenshot.

Available formats:

  • webp
  • jpeg
  • jpg
  • png
  • pdf
Default"png"
Value in"jpeg" | "jpg" | "pdf" | "png" | "webp"
device?string

The device type to emulate for the screenshot.

Available devices:

  • iphone_14_pro_max
  • iphone_14_pro
  • iphone_13_pro_max
  • iphone_13_mini
  • iphone_12
  • iphone_x
  • ipad
  • galaxy_s23_ultra
  • galaxy_s23
  • galaxy_s8
  • galaxy_fold4
  • pixel_7_pro
  • pixel_6a
  • pixel_5
  • redmi_note_12_pro
  • redmi_note_11
  • huawei_p60_pro
  • huawei_mate_50_pro
Value in"galaxy_fold4" | "galaxy_s23" | "galaxy_s23_ultra" | "galaxy_s8" | "huawei_mate_50_pro" | "huawei_p60_pro" | "ipad" | "iphone_12" | "iphone_13_mini" | "iphone_13_pro_max" | "iphone_14_pro" | "iphone_14_pro_max" | "iphone_x" | "pixel_5" | "pixel_6a" | "pixel_7_pro" | "redmi_note_11" | "redmi_note_12_pro"
full_page?boolean

Capture the entire page instead of just the visible viewport.

Default"false"
full_page_scroll?boolean

Scroll the page to fully load lazy-loaded elements before capturing a full-page screenshot.

Default"true"
full_page_scroll_duration?number

Time in milliseconds for scrolling before capturing the full page.

Default"400"
viewport_width?number

The width of the browser viewport in pixels.

Default"1280"
viewport_height?number

The height of the browser viewport in pixels.

Default"1024"
scale_factor?number

The scale factor for high-resolution screenshots.

Default"1"
image_quality?string

Generate images with custom quality settings.

Supported formats include:

  • jpeg
  • webp
Default"80"
selector?string

Capture a specific element on the page instead of the full viewport.

cache?boolean

Cache the response.

Default"false"
cache_ttl?number

Cache the response for a custom TTL (in seconds).

Default"2592000"
Range3600 <= value <= 2592000
remove_selectors?string

A comma-separated list of elements to hide before capturing (e.g., ads, popups).

remove_cookie_banners?boolean

Automatically remove cookie banners before capturing.

Default"false"
remove_ads?boolean

Automatically remove ads before capturing.

Default"false"
block_resources?string

Comma-separated list of resource types to block (e.g., “image,stylesheet,font”).

Available resource types:

  • document
  • stylesheet
  • image
  • media
  • font
  • script
  • texttrack
  • xhr
  • fetch
  • eventsource
  • websocket
  • manifest
  • other

Useful for optimizing page loading speed before capturing screenshots.

Value in"document" | "eventsource" | "fetch" | "font" | "image" | "manifest" | "media" | "other" | "script" | "stylesheet" | "texttrack" | "websocket" | "xhr"
block_urls?string

Comma-separated list of URL patterns to block (e.g., “analytics,tracking,advertisement”).

You can specify URLs, domains, or simple patterns like “.example.com/”.

delay?number

Delay in seconds before capturing the screenshot.

Default"0"
Range0 <= value <= 10
wait_until?array<>

Define when to capture.

Available formats:

  • networkidle2
  • load
  • domcontentloaded
  • networkidle0
Value in"domcontentloaded" | "load" | "networkidle0" | "networkidle2"
wait_for_selector?string

Wait for a specific element to appear before taking the screenshot.

proxy?string

Specify a proxy server to route your request through.

Supports HTTP, HTTPS, and SOCKS5 proxies.

Format: http://username:password@proxy.com:PORT.

Useful for bypassing geo-restrictions and rotating IPs.

s3_secret_key?string

AWS S3 secret access key.

s3_access_key_id?string

AWS S3 access key ID.

s3_bucket?string

The S3 bucket name where the screenshot will be uploaded.

s3_object_key?string

The filename for the S3 object (auto-generated if not provided).

s3_region?string

AWS S3 region for storage.

storage_endpoint?string

Leave this field empty for AWS S3. Only specify a value if required. S3-compatible storage services are supported, for example, use https://.r2.cloudflarestorage.com for Cloudflare R2.

s3_url?boolean

Use S3 storage for screenshots. The S3 URL will be returned in the response.

Default"false"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.capturekit.dev/v1/capture?url=string"
Empty
{
  "error": "Bad Request"
}
{
  "error": "Invalid API Key"
}
{
  "error": "Payment required"
}
{
  "error": "Rate limit exceeded for the API key: quota monthly"
}
{
  "error": "Internal Error"
}