Get started
Screenshot API quickstart
Make your first ScreenshotEngine API request with cURL. Get an API key, capture a full-page PNG, and save the binary response.
View as Markdown1. Get your API key
Sign in to ScreenshotEngine, open the dashboard, and create an API key. Keep the key on your server in an environment variable. The examples below use a macOS or Linux shell; replace the placeholder with your own key.
export SCREENSHOTENGINE_API_KEY="YOUR_API_KEY"2. Capture your first screenshot
Send a POST request to https://api.screenshotengine.com/v1/screenshot with your key in the Authorization header and the target URL in a JSON body. This request captures the full page as a PNG and saves it as screenshot.png.
curl --fail-with-body --request POST 'https://api.screenshotengine.com/v1/screenshot' \
--header "Authorization: Bearer $SCREENSHOTENGINE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com",
"format": "png",
"height": "full"
}' \
--output screenshot.png3. Open the returned file
A successful request returns HTTP 200 and the file bytes directly. Open screenshot.png from your current directory. There is no job ID, polling step, or download URL to extract from JSON.
Check the HTTP status before using a response as an image. Errors return JSON instead of file bytes. The cURL examples use --fail-with-body (cURL 7.76+) so an HTTP error also produces a nonzero exit status; the output file can still contain the error body.
Use GET for simple requests
GET uses query parameters, including api_key. Use --data-urlencode to preserve URLs containing query strings, spaces, or special characters. Prefer POST in server integrations to keep your API key out of the request URL.
curl --fail-with-body --get 'https://api.screenshotengine.com/v1/screenshot' \
--data-urlencode "api_key=$SCREENSHOTENGINE_API_KEY" \
--data-urlencode 'url=https://example.com' \
--data-urlencode 'format=png' \
--data-urlencode 'height=full' \
--output screenshot.pngWhat happens if I only send a URL?
The default output is a JPEG image at a 1280 × 720 viewport. Full-page capture, cookie banner removal, and dark mode are opt-in. Add height: "full", blockBanners: true, or darkMode: true to a POST body to enable them.