Endpoint
Request
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | ApiKey ck_... or Bearer <token> |
Content-Type | Yes | application/json |
Body
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | - | The URL to screenshot |
options.width | number | No | 1920 | Viewport width (320-3840) |
options.height | number | No | 1080 | Viewport height (240-2160) |
options.timeout | number | No | 30000 | Page load timeout in ms (max: 60000) |
options.waitForSelector | string | No | null | CSS selector to wait for before capture |
Common Viewport Sizes
| Device | Width | Height |
|---|---|---|
| Desktop HD | 1920 | 1080 |
| Desktop | 1366 | 768 |
| Tablet | 768 | 1024 |
| Mobile | 375 | 667 |
| 4K | 3840 | 2160 |
Response
Success (200)
Response Fields
| Field | Type | Description |
|---|---|---|
url | string | Public URL to the screenshot image |
width | number | Viewport width used |
height | number | Viewport height used |
timing.total | number | Total capture time in milliseconds |
creditsUsed | number | Credits charged (always 1) |
creditsRemaining | number | Your remaining credit balance |
The screenshot URL is publicly accessible and hosted temporarily. Download and store the image if you need it long-term.
Examples
Basic Screenshot
Mobile Viewport
Capture how a site looks on mobile:Wait for Content to Load
Wait for a specific element before capturing:Slow-Loading Page
Increase timeout for pages that load slowly:Download the Screenshot
Error Responses
Invalid URL (400)
Unauthorized (401)
Insufficient Credits (402)
Timeout (408)
Screenshot Failed (502)
Use Cases
Website Monitoring
Track visual changes on websites
Social Media Previews
Generate preview images for links
PDF Generation
Convert web pages to images for reports
Archiving
Save snapshots of web content
Tips
Use waitForSelector for dynamic content
Use waitForSelector for dynamic content
If the page loads content dynamically (like with JavaScript), use
waitForSelector to ensure the content is visible before the screenshot is taken.Choose the right viewport size
Choose the right viewport size
Use desktop size (1920x1080) for full layouts, mobile size (375x667) for responsive testing.
Increase timeout for heavy pages
Increase timeout for heavy pages
Pages with lots of images or JavaScript may need more time. Increase
timeout to 60000ms for these.Download immediately
Download immediately
Screenshot URLs are temporary. Download and store the images if you need them long-term.