Set the asynchronous submission URL
Set CRAWLHUB_ASYNC_URL to the asynchronous job URL assigned to your account. It uses the /v1/queries path. Keep this setting separate from your Realtime URL because the two delivery methods have different responses.
: "${CRAWLHUB_ASYNC_URL:?Set your asynchronous job URL}"
curl "$CRAWLHUB_ASYNC_URL" \
--user "$CRAWLHUB_USERNAME:$CRAWLHUB_PASSWORD" \
--header "Content-Type: application/json" \
--data '{"source":"universal","url":"https://example.com/"}'Save the job metadata
The submission response contains an id, a status and _links. Keep the identifier as a string. Follow the rel: self link for metadata and rel: results for content. Use HTTPS and the same API credentials on those requests.
Check status
| Status | Meaning | Next step |
|---|---|---|
| pending | The job is still running. | Wait before polling again. |
| done | Collection finished. | Retrieve results and inspect result status. |
| faulted | Collection could not finish. | Inspect failure details before retrying. |
Scroll horizontally to read all columns.
GET /v1/queries/{job_id}
GET /v1/queries/{job_id}/results
GET /v1/queries/{job_id}/results/1/contentRetrieve content
A results request before completion can return 204 with no body. Download completed results within the retention period of at least 24 hours. The type query parameter selects formats such as raw, parsed, markdown, png or xhr.