Developers

Web Scraping API

Reference

Output formats

Request HTML, parsed JSON, Markdown, screenshots or browser network data.

Choose a format

typeEnable in the jobcontent value
rawDefault page contentHTML or other original content string.
parsedparse: true, with a supported parser or parsing_instructionsJSON object.
markdownmarkdown: trueMarkdown text string.
pngrender: pngBase64-encoded PNG.
xhrxhr: true with renderingBrowser request and response entries.

Scroll horizontally to read all columns.

Markdown content

markdown: true makes Markdown the default returned content. Use it for text processing while retaining the source URL and retrieval time.

Markdown request
{
  "source": "universal",
  "url": "https://example.com/",
  "markdown": true
}

Retrieve multiple types

Enable the required types in the submitted job, then pass a comma-separated type query parameter. Match returned entries by type and page rather than array position; their ordering is not fixed.

cURL request
: "${CRAWLHUB_USERNAME:?Set your API username}"
: "${CRAWLHUB_PASSWORD:?Set your API password}"

curl --request POST "https://api.crawlhub.ai/v1/queries?type=raw,markdown" \
  --user "$CRAWLHUB_USERNAME:$CRAWLHUB_PASSWORD" \
  --header "Content-Type: application/json" \
  --connect-timeout 15 --max-time 180 \
  --data '{
  "source": "universal",
  "url": "https://example.com/",
  "markdown": true
}'
Asynchronous result selection
GET /v1/queries/{job_id}/results?type=raw,markdown

Types that were not enabled

Realtime leaves out a requested type that the job did not enable. The Push-Pull results endpoint can include that type with empty content. Enable rendering, parsing or capture before submitting the job.

Fetch and XHR output

Network entries include the resource URL, request method, status, headers, payload and response body when captured. These can contain tokens or personal data. Store only fields your application needs and keep captures private.

Search documentation

Search guides, products and reference pages.