Choose the render mode
| render | Result |
|---|---|
| html | Markup after browser loading and any browser instructions. |
| png | A Base64-encoded PNG screenshot. |
Scroll horizontally to read all columns.
cURL request
: "${CRAWLHUB_USERNAME:?Set your API username}"
: "${CRAWLHUB_PASSWORD:?Set your API password}"
curl --request POST "https://api.crawlhub.ai/v1/queries" \
--user "$CRAWLHUB_USERNAME:$CRAWLHUB_PASSWORD" \
--header "Content-Type: application/json" \
--connect-timeout 15 --max-time 180 \
--data '{
"source": "universal",
"url": "https://example.com/",
"render": "html"
}'Allow enough client time
Rendering starts a browser and can take longer than a plain page fetch. Use a 180-second client timeout for Realtime. The service may omit assets that are unnecessary to retrieve the page, so a rendered fetch is not a capture of every resource a normal browsing session would download.
Run actions before collection
Add browser_instructions when data needs a click, input or wait. Instructions run in order and require render to be html or png.
Keep output handling explicit
A screenshot’s content is encoded binary data. Decode it before writing a .png file. Rendered HTML remains a string for your parser. Request several formats with the output type selector.