Screenshot API Webhook
Have GetScreenshot POST the capture result to your own endpoint as soon as it completes. Useful for pipelines where a different service stores or processes the result.
How Webhooks Work
Add a webhook URL to your request and GetScreenshot will POST the result to that endpoint when the capture completes. The API call itself still waits for the capture and returns the same JSON, plus a webhookPostStatus field that tells you whether the POST succeeded.
Use it when the service that requests a capture is different from the one that stores or processes it. Your endpoint gets the result directly, without the caller having to forward it.
API Parameter
webhook=https://your-server.com/webhook
Provide any URL that can receive POST requests. The result is sent as JSON in the request body when the capture completes, and the same fields are repeated as query string parameters. Reply with a 2xx status.
Process Flow
-
1
You make an API request with the webhook parameter
The request stays open while the page is captured
-
2
GetScreenshot captures the webpage
Typical captures take 8–15 seconds
-
3
The result is POSTed to your webhook URL
JSON payload with the screenshot URL and capture details. The API call then returns the same data.
Example Request
https://api.rasterwise.com/v1/get-screenshot
?apikey=YOUR_API_KEY
&url=https://example.com
&webhook=https://your-app.com/webhook
Webhook Payload (POST)
// POST to your webhook URL
{
"status": "success",
"originUrl": "https://example.com",
"captureDate": "2026/11/18",
"captureHour": "14:03:22",
"screenshotImage": "https://storage.googleapis.com/getscreenshot-storage/imageAbC123xYz9.png"
}
Dates and hours are UTC. The payload can carry extra fields; ignore the ones you do not need. The image at screenshotImage is stored for 30 days.
When to Use Webhooks
Async screenshot delivery for advanced workflows
Batch Processing
Send requests from a pool of workers and let a single endpoint collect every result as captures complete. Stay within your plan's requests-per-second limit.
Background Jobs
Trigger screenshots from background workers and let your job queue handle the webhook responses when they arrive.
Serverless Functions
Let one function request the capture and a second function receive the result, so storage or notification logic lives in its own handler.
Website Monitoring
Schedule periodic screenshots and receive webhooks when captures complete for visual regression testing or uptime monitoring.
Learn moreEvent Pipelines
Integrate screenshots into event-driven architectures. Trigger downstream processes when screenshots are ready.
Capture Log
Point the webhook at a queue or logging endpoint to keep a record of every completed capture, independent of the caller.
Implementation Examples
Receive webhooks in your favorite language
Node.js / Express
// Webhook endpoint to receive screenshots
app.post('/webhook/screenshot', (req, res) => {
const { status, originUrl, screenshotImage, captureDate, captureHour } = req.body;
// Process the screenshot
console.log(`Screenshot ready: ${screenshotImage}`);
// Save to database, send notification, etc.
saveScreenshot({ originUrl, screenshotImage, captureDate, captureHour });
res.status(200).send('OK');
});
Python / Flask
# Webhook endpoint to receive screenshots
@app.route('/webhook/screenshot', methods=['POST'])
def handle_screenshot():
data = request.get_json()
screenshot_url = data['screenshotImage']
original_url = data['originUrl']
# Process the screenshot
save_to_storage(screenshot_url)
return 'OK', 200
Related Features
Combine webhooks with other capabilities
Full Page
Add fullpage=true and your endpoint receives the URL of the full-page capture.
PDF Generation
With pdf=true, read the PDF link (pdfFile) from the API response. The webhook payload does not carry it.
Email Delivery
Use the email parameter alongside webhook for dual delivery.
Zapier
For no-code workflows, use Zapier instead of custom webhooks.
Ready to Use Screenshot Webhooks?
Get started with GetScreenshot's affordable plans. Webhook delivery included in all tiers.