Webhook
Set callbackUrl in the submit request body to receive the result via webhook instead of polling. When parsing completes, the server sends a POST request to that URL with the result payload.
Submit with Callback
curl https://app.scrapering.com/api/parsing/url \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"url": "https://example.com",
"callbackUrl": "https://my-server.com/webhook/parsing"
}'
Webhook Payload
Make sure your webhook endpoint responds with a
2xxstatus code to acknowledge receipt.
Your endpoint will receive a POST request with the following JSON body:
{
"url": "https://example.com",
"content": "<html>...</html>",
"cookies": [],
"success": true,
"screenshot": null
}
screenshot contains a base64-encoded image when takeScreenshot was set to true in the request, otherwise null.
Important! Screenshot is stored for 3 hours after the scrape.
Scraped content is stored for 7 days after the scrape.
Save the results on your side so you don't lose them.
Next steps
- Creating a task — back to the submit endpoint reference
- Receiving result — polling alternative to webhooks