Website Screenshot
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: 2 credits per call
ApiKeyAuthx-api-key<token>Your API key. Include it in the x-api-key header for every request.
url*stringThe URL of the webpage to capture. Examples:
https://www.amazon.com/s?k=pokemonhttps://www.cdiscount.com/sante-mieux-vivre/materiel-medical/soin-domicile/l-1650608.htmlhttps://github.com/seaweedfs/seaweedfsformat?stringThe output format of the screenshot.
Available formats:
webpjpegjpgpngpdf
"png""jpeg""jpg""pdf""png""webp"device?stringThe device type to emulate for the screenshot.
Available devices:
iphone_14_pro_maxiphone_14_proiphone_13_pro_maxiphone_13_miniiphone_12iphone_xipadgalaxy_s23_ultragalaxy_s23galaxy_s8galaxy_fold4pixel_7_propixel_6apixel_5redmi_note_12_proredmi_note_11huawei_p60_prohuawei_mate_50_pro
"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?booleanCapture the entire page instead of just the visible viewport.
falsefull_page_scroll?booleanScroll the page to fully load lazy-loaded elements before capturing a full-page screenshot.
falsefull_page_scroll_duration?numberTime in milliseconds for scrolling before capturing the full page.
"400"viewport_width?numberThe width of the browser viewport in pixels.
"1280"viewport_height?numberThe height of the browser viewport in pixels.
"1024"scale_factor?numberThe scale factor for high-resolution screenshots.
"1"image_quality?stringGenerate images with custom quality settings.
Supported formats include:
jpegwebp"80"selector?stringCapture a specific element on the page instead of the full viewport.
cache?booleanCache the response.
falsecache_ttl?numberCache the response for a custom TTL (in seconds).
3600 <= value <= 2592000"2592000"remove_selectors?stringA comma-separated list of elements to hide before capturing (e.g., ads, popups).
remove_ads?booleanAutomatically remove ads before capturing.
falseblock_resources?stringComma-separated list of resource types to block (e.g., “image,stylesheet,font”).
Available resource types:
documentstylesheetimagemediafontscripttexttrackxhrfetcheventsourcewebsocketmanifestother
Useful for optimizing page loading speed before capturing screenshots.
"document""eventsource""fetch""font""image""manifest""media""other""script""stylesheet""texttrack""websocket""xhr"block_urls?stringComma-separated list of URL patterns to block (e.g., “analytics,tracking,advertisement”).
You can specify URLs, domains, or simple patterns like “.example.com/”.
delay?numberDelay in seconds before capturing the screenshot.
0 <= value <= 10"0"wait_until?array<string>Define when to capture.
Available formats:
networkidle2loaddomcontentloadednetworkidle0
"domcontentloaded""load""networkidle0""networkidle2"wait_for_selector?stringWait for a specific element to appear before taking the screenshot.
proxy?stringSpecify 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?stringAWS S3 secret access key.
s3_access_key_id?stringAWS S3 access key ID.
s3_bucket?stringThe S3 bucket name where the screenshot will be uploaded.
s3_object_key?stringThe filename for the S3 object (auto-generated if not provided).
s3_region?stringAWS S3 region for storage.
storage_endpoint?stringLeave 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?booleanUse S3 storage for screenshots. The S3 URL will be returned in the response.
falsefields?stringComma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).
is_async?booleanRun the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.
falsesoft_fail?booleanReturn HTTP 200 even when the request fails; the error is in the error field of the body.
falseSuccessful response
response?filebinarycurl -X GET 'https://api.piloterr.com/v2/website/screenshot?url=string'"string"