Capture any webpage as an image with a single HTTP request.
Every request requires an API key. You can pass it as a header or query parameter:
X-API-Key: px_your_api_key_here
GET /api/capture?url=https://example.com&api_key=px_your_api_key_here
Takes a screenshot of the specified URL and returns the image binary directly in the response body.
| Parameter | Type | Default | Description |
|---|---|---|---|
url required |
string | — | The full URL to capture. Must start with http:// or https://. |
width optional |
integer | 1280 | Viewport width in pixels. Max depends on plan. |
height optional |
integer | 720 | Viewport height in pixels. Max depends on plan. |
format optional |
string | png | Output format: png, jpeg, webp, or pdf. Available formats depend on plan. |
quality optional |
integer | 80 | Image quality (1-100). Only applies to JPEG and WebP. |
full_page Pro+ |
boolean | false | Capture the full scrollable page instead of just the viewport. |
delay Pro+ |
integer | 0 | Wait time in milliseconds (max 10000) after page load before capturing. Useful for JS-heavy pages. |
On success, returns the raw image/PDF bytes with appropriate headers:
| Header | Description |
|---|---|
Content-Type | image/png, image/jpeg, image/webp, or application/pdf |
X-Screenshot-Id | Unique ID for this screenshot (for support reference) |
X-Duration-Ms | Time taken to capture the screenshot |
X-RateLimit-Remaining | Remaining requests in the current minute window |
X-Monthly-Used | Screenshots used this billing month |
X-Monthly-Limit | Total screenshots allowed this month |
curl -H "X-API-Key: px_your_key" \ "https://pxshot.dev/api/capture?url=https://example.com&width=1280&format=png" \ --output screenshot.png
const response = await fetch(
'https://pxshot.dev/api/capture?url=https://example.com&format=png',
{ headers: { 'X-API-Key': 'px_your_key' } }
);
const blob = await response.blob();
// Use blob, save to file, etc.
import requests
resp = requests.get(
'https://pxshot.dev/api/capture',
params={'url': 'https://example.com', 'format': 'png'},
headers={'X-API-Key': 'px_your_key'}
)
with open('screenshot.png', 'wb') as f:
f.write(resp.content)
curl -H "X-API-Key: px_your_key" \ "https://pxshot.dev/api/capture?url=https://example.com&format=pdf&full_page=true" \ --output page.pdf
Errors return JSON with an error field:
{ "error": "Missing required parameter: url" }
| Status | Error | Description |
|---|---|---|
| 400 | Missing required parameter: url | No URL was provided. |
| 400 | Invalid URL | URL must start with http:// or https://. |
| 400 | Format not available on your plan | Your plan doesn't support this format. |
| 400 | Full-page capture requires Pro or higher | Upgrade to use full_page=true. |
| 400 | Custom delay requires Pro or higher | Upgrade to use the delay parameter. |
| 400 | Viewport exceeds plan limits | Width/height exceeds your plan's max. |
| 401 | API key required | No API key was provided. |
| 401 | Invalid API key | The key doesn't match any active key. |
| 403 | Origin not allowed | Request origin is not in the key's allowed origins. |
| 429 | Rate limit exceeded | Too many requests per minute. |
| 429 | Monthly screenshot limit reached | Upgrade your plan for more screenshots. |
| 500 | Screenshot failed | Internal error during capture. Try again. |
| Plan | Per Minute | Monthly |
|---|---|---|
| Free | 5 requests | 50 screenshots |
| Pro | 30 requests | 2,000 screenshots |
| Business | 100 requests | 10,000 screenshots |
| Feature | Free | Pro ($19/mo) | Business ($49/mo) |
|---|---|---|---|
| Monthly screenshots | 50 | 2,000 | 10,000 |
| Formats | PNG | PNG, JPEG, WebP | PNG, JPEG, WebP |
| PDF export | — | ✓ | ✓ |
| API keys | 1 | 3 | 10 |
| Max viewport | 1280×720 | 1920×1080 | 3840×2160 |
| Full-page capture | — | ✓ | ✓ |
| Custom delay | — | ✓ | ✓ |
| Rate limit | 5/min | 30/min | 100/min |