What is a Webhook?

A webhook is an HTTP endpoint that you provide, and we’ll send a POST request to it once your task is completed — whether it succeeded or failed. This removes the need to constantly poll the API and lets your system react in real-time.

How to Use Webhooks

When creating a task, include a webhook.url field in your request. Example:

{
  "actor": "scraper.shopee",
  "webhook": {
    "url": "https://webhook.site/8fe8b27a-3902-42d9-a44e-b5e74466e475"
  },
  "input": {
    "url": "https://shopee.tw/api/v4/pdp/get_pc?item_id=1413075726&shop_id=19675194"
  }
}
 

Webhook Payloads

Once the task is complete, we’ll POST the result to your webhook URL.

Success Payload

{
  "response": {
    "data": "base64 json string",
    "encoding": "base64"
  },
  "state": "completed",
  "success": true,
  "taskId": "7a0087db-05ae-4caf-887c-67e5efcaf3d1"
}
 

Failure Payload

{
  "state": "completed",
  "status": {
    "code": 4,
    "message": "context deadline exceeded"
  },
  "success": false,
  "taskId": "d5f188a7-9d87-4f7d-8801-5a7c6083b3e6"
}
 

Still Prefer to Poll?

No problem — you can always fetch the result manually:

curl --location --request GET 'https://api.scrapeless.com/api/v1/scraper/result/{taskId}' \
--header 'x-api-token: YOUR_API_KEY' \
--header 'Content-Type: application/json'
 

This works whether or not a webhook was set.

Try It Out

Test your webhook instantly using Webhook.site — a free tool that generates testable URLs and shows you real-time incoming requests.

FAQ

Q: Will you retry the webhook if it fails?

Not currently. Make sure your endpoint is reliable and available.

Q: Are webhook calls synchronous?

Nope — we send them asynchronously, so it won’t block task processing.