Skip to main content
Pass webhookUrl when you start a crawl (POST /crawl) or an asynchronous map (POST /map/async). Geekflare then sends an HTTPS POST to that URL when the job changes state. The response that creates the job contains a webhookSecret. It is shown once. Store it: you need it to check that a request really comes from Geekflare.

Requirements for your endpoint

  • The URL must use https and must not contain a username or password.
  • It must point to a public address. Private, loopback and link-local addresses (for example 10.x.x.x, 127.0.0.1, 169.254.169.254) and names that only resolve inside a network (localhost, *.internal, *.local) are rejected when you create the job, and again every time a delivery is attempted, after DNS resolution.
  • Redirects are not followed. Answer on the URL you registered.
  • Answer with a 2xx status within 10 seconds. Anything else counts as a failed attempt. The response body is ignored.

Request

The body is always:

Events

Crawl

Choose events with webhookEvents when you create the crawl. If you leave it out you get the defaults. crawl.started, crawl.on_hold, crawl.resumed, crawl.completed, crawl.failed and crawl.cancelled carry the state of the job:
  • expiresAt is when the pages and the ZIP of the crawl are deleted. It is null until the crawl has finished.
  • crawl.on_hold has holdReason (credits or billing), holdExpiresAt (when the crawl fails if credits have not been added) and reason.
  • During planned maintenance a running crawl can be paused without a webhook: GET /crawl/{id} then shows status: "on_hold" with holdReason: "maintenance" and no holdExpiresAt, and the crawl continues by itself afterwards.
  • crawl.failed after an unresolved hold has reason: "hold_expired".
crawl.page:
contentUrl is a temporary signed link. It works until linkExpiresAt and never later than expiresAt. When it has expired, call GET /crawl/{id}: every response contains fresh links.

Map

Verify the signature

Every request is signed with your webhookSecret. Check the signature before you trust the body. X-Geekflare-Signature looks like t=1767225600,v1=<hex>:
  • t is the Unix time in seconds when the request was signed.
  • v1 is the hexadecimal HMAC-SHA256 of the string "<t>.<raw request body>", using the webhookSecret (the whole value, including the whsec_ prefix) as the key.
Use the raw body, exactly as received, not a re-serialized copy. Compare in constant time and reject requests whose timestamp is more than 5 minutes old. Every retry is signed again with a new timestamp.

Retries

A delivery is retried until your endpoint answers 2xx, up to 5 attempts in total: After the fifth failed attempt the delivery is marked failed and is not sent again. In total that is about 36 minutes. A link inside a payload is always valid for longer than that. Redirects and 3xx answers, timeouts, connection errors and non-2xx statuses all count as failed attempts. A URL that resolves to a non-public address fails immediately and is not retried.

Order and duplicates

  • Deliveries are queued in the order events happen, but retries mean they can arrive out of order. A crawl.page that is being retried can arrive after crawl.completed. Use createdAt in the body to order events and the crawl status from GET /crawl/{id} as the source of truth.
  • A delivery can arrive more than once. Use id (also X-Geekflare-Delivery) to ignore repeats.

See what was delivered

If an event did not reach you, look at what Geekflare tried:
  • GET /crawl/{id} contains webhook.deliveries: the 10 most recent deliveries with status (pending, delivered, failed), attempts, lastHttpStatus, lastError and nextAttemptAt.
  • GET /crawl/{id}/webhooks lists every delivery, with limit and offset.