Screenshot API
The Screenshot API allows you to capture high-quality images of any webpage with a simple API request. You can customize the screenshot with various parameters like full-page capture, viewport size, and more.
Endpoint
https://api.capturekit.dev/capture
Example Request
GET https://api.capturekit.dev/capture?access_key=<your-access-key>&url=https://tailwindcss.com
Response
Parameters
url
string Required
The URL of the webpage to capture.
access_key
string Required
Your API access key. Can be provided via the access_key
query parameter, x-access-key
header, or request body.
viewport_width
number Optional Defaults to 1280
The width of the browser viewport in pixels.
viewport_height
number Optional Defaults to 1024
The height of the browser viewport in pixels.
format
string Optional Defaults to ‘webp’
The output format of the screenshot (webp
, jpeg
, png
, pdf
).
device
string Optional
The device type to emulate for the screenshot.
Available devices:
iphone_14_pro_max
iphone_14_pro
iphone_13_pro_max
iphone_13_mini
galaxy_s23_ultra
galaxy_s23
galaxy_fold4
pixel_7_pro
pixel_6a
redmi_note_12_pro
redmi_note_11
huawei_p60_pro
huawei_mate_50_pro
iphone_x
iphone_12
pixel_5
galaxy_s8
ipad
cache
boolean Optional Defaults to false
Cache the response.
cache_ttl
number Optional Defaults to 2592000
Cache the response for a custom TTL (in seconds). Maximum 2592000
seconds (1 month), minimum 3600
seconds (1 hour).
full_page
boolean Optional Defaults to false
Capture the entire page instead of just the visible viewport.
full_page_scroll
boolean Optional Defaults to true
Scroll the page to fully load lazy-loaded elements before capturing a full-page screenshot.
full_page_scroll_duration
number Optional Defaults to 400
Time in milliseconds for scrolling before capturing the full page.
scale_factor
number Optional Defaults to 1
The scale factor for high-resolution screenshots.
delay
number Optional Defaults to 0
Delay in seconds before capturing the screenshot (max 10s
).
wait_until
string Optional
Define when to capture (networkidle2
, load
, domcontentloaded
, networkidle0
).
wait_for_selector
string Optional
Wait for a specific element to appear before taking the screenshot.
selector
string Optional
Capture a specific element on the page instead of the full viewport.
remove_selectors
string Optional
A comma-separated list of elements to hide before capturing (e.g., ads, popups).
remove_cookie_banners
boolean Optional Defaults to false
Automatically remove cookie banners before capturing.
remove_ads
boolean Optional Defaults to false
Automatically remove ads before capturing.
s3_access_key_id
string Optional
AWS S3 access key ID.
s3_secret_key
string Optional
AWS S3 secret access key.
s3_bucket
string Optional
The S3 bucket name where the screenshot will be uploaded.
s3_object_key
string Optional
The filename for the S3 object (auto-generated if not provided).
s3_region
string Optional
AWS S3 region for storage.