cURL Quickstart for ScreenshotCenter API | ScreenshotCenter
Take your first screenshot with cURL in under 60 seconds. Covers authentication, basic requests, PDF output, error handling, and next steps.
Prerequisites
- A ScreenshotCenter account with an API key (get one free at sign up).
curlinstalled (comes pre-installed on macOS and most Linux distributions; Windows users can use Git Bash or WSL).
Authentication
Every request requires your API key. You can pass it as a header or a query parameter:
# Header (recommended)
-H "X-API-KEY: YOUR_API_KEY"
# Query parameter
?key=YOUR_API_KEY
Store your key in an environment variable for convenience:
export SCREENSHOTCENTER_API_KEY="your-key-here"
Full authentication docs: API authentication guide.
Your first screenshot
curl -X POST https://api.screenshotcenter.com/v1/screenshot \
-H "X-API-KEY: $SCREENSHOTCENTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"format": "png",
"size": "screen"
}'
This returns a JSON response with the screenshot ID and status. If the page is simple, the screenshot may already be finished.
Check status and download
# Check status
curl "https://api.screenshotcenter.com/api/v1/screenshot/info?key=$SCREENSHOTCENTER_API_KEY&id=SCREENSHOT_ID"
# Download the image
curl -o screenshot.png "https://api.screenshotcenter.com/api/v1/screenshot/thumbnail?key=$SCREENSHOTCENTER_API_KEY&id=SCREENSHOT_ID"
Generate a PDF
Switch format to pdf for a full-page PDF document:
curl -X POST https://api.screenshotcenter.com/v1/screenshot \
-H "X-API-KEY: $SCREENSHOTCENTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"format": "pdf",
"size": "page"
}'
Learn more about PDF options in the PDF generation API reference.
Common options
| Parameter | Example | Effect |
|---|---|---|
size | "page" | Full-page capture (scrolls to bottom) |
width | 1920 | Viewport width in pixels |
country | "gb" | Render from a UK browser |
delay | 3000 | Wait 3 seconds before capturing |
hide_popup | true | Remove cookie banners |
wait_for | ".main-content" | Wait for a CSS selector to appear |
Error handling
The API returns standard HTTP status codes:
200— Success. Check thedata.statusfield forfinished,processing, orerror.400— Bad request. Missing or invalid parameters.401— Invalid API key.429— Rate limited. Wait and retry.
Always check the success field in the JSON response:
curl -s -X POST https://api.screenshotcenter.com/v1/screenshot \
-H "X-API-KEY: $SCREENSHOTCENTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "png"}' \
| jq '.success, .data.id, .data.status'
Next steps
- Explore the full API documentation for all parameters and endpoints.
- Try a language-specific SDK: JavaScript, Python, Go, PHP, Java.
- Set up S3 delivery and webhooks for automated workflows.
FAQ
Do I need to install anything besides cURL?
No. cURL and a valid API key are all you need to start taking screenshots.
Can I use cURL in CI/CD pipelines?
Yes. cURL works in any shell environment — GitHub Actions, GitLab CI, Jenkins, and local scripts.
What's the rate limit?
Depends on your plan. Free plans allow 5 concurrent requests. Paid plans scale up. Check your dashboard for current limits.
Copy the example above and explore the full API.