Crawlfox API

Authentication

Every request is authenticated with your secret API key, sent as a Bearer token in the Authorization header. Create and reveal your key from the dashboard.

Authorization: Bearer $CRAWLFOX_API_KEY

Keep it secret

Treat the key like a password — never ship it in client-side code. If it leaks, rotate it from the API Keys page; the old secret is invalidated immediately.

Crawlfox API

Rate Limits

Each key has a requests-per-minute burst limit and a monthly credit allowance. Requests over the burst limit get HTTP 429; slow down and retry with backoff.

Credits

Successful requests consume credits: 1 credit per page scraped (requesting multiple formats for one page is still 1 credit), 1 credit per 10 requested search results (based on num), and 1 credit per crawled page. Failed calls are free; cache hits are billed at a reduced 0.1 credit.

Crawlfox API

Status Codes & Errors

Errors return a JSON envelope with a stable machine code, an HTTP status, whether the request is safe to retry, and a human remediation hint.

{
  "code": "UPSTREAM_TIMEOUT",
  "status": 504,
  "retryable": true,
  "title": "Request timed out",
  "message": "The target site did not respond in time.",
  "remediation": "Retry. If a URL consistently times out, try a more specific path."
}

Error codes

Switch on the stable `code` — statuses and messages may change, codes won't. Retryable errors are safe to retry with backoff.

CodeRetryableWhen
MISSING_URLNoThe request body has no url.
INVALID_URLNoThe URL isn't fully-qualified (https://…) or is malformed.
UPSTREAM_UNREACHABLEYesThe target site couldn't be reached.
UPSTREAM_NOT_FOUNDNoThe target site returned 404 for the URL.
UPSTREAM_TIMEOUTYesThe target site didn't respond in time.
UPSTREAM_RATE_LIMITEDYesThe target site is rate-limiting requests.
UPSTREAM_SERVER_ERRORYesThe target site returned a server error.
UPSTREAM_GEO_BLOCKEDNoThe target site refused the request on regional or legal grounds.
BOT_WALLNoThe page could not be retrieved.
NO_PUBLIC_CONTENTNoThe page loaded but had no readable content.
INTERNAL_ERRORYesAn unexpected error on our side — retry, then contact support with the request ID.
Scrape

Scrape a URL

POSThttps://api.crawlfox.io/v1/scrape
Consumes credits. 1 credit per page scraped — any number of formats for one page is still 1 credit. Cache hits are billed at 0.1 credit; failed calls are free.

Fetch a single URL and return clean, structured data. Crawlfox handles proxy rotation, bot-defense clearing, and a headless-browser fallback, so you get a result instead of a block. Choose one or more output formats.

Body params

urlstringrequired
The URL to scrape. Must include the scheme (https://).
formatsstring[]
Any of markdown, html, rawHtml, text, json, links, images, emails. Defaults to markdown.
extractMainContentboolean
Strip nav/header/footer/sidebar and return just the article body.
skipCacheboolean
Force a fresh fetch instead of serving a cached result.
Language
Credentials
Bearer$CRAWLFOX_API_KEY
request.sh
curl --request POST \
  --url https://api.crawlfox.io/v1/scrape \
  --header "Authorization: Bearer $CRAWLFOX_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"url":"https://example.com/","formats":["markdown","html","links"]}'
200 OKresponse.json
{
  "success": true,
  "data": {
    "markdown": "# Example Domain\n...",
    "html": "<html>...</html>",
    "links": ["https://www.iana.org/domains/example"],
    "metadata": {
      "title": "Example Domain",
      "description": "Example Domain for use in documents.",
      "language": "en",
      "sourceURL": "https://example.com/",
      "statusCode": 200
    }
  }
}
Batch

Batch scrape

POSThttps://api.crawlfox.io/v1/batch
Consumes credits. 1 credit per page scraped, billed per URL. Cache hits are 0.1 credit; failed URLs are free.

Scrape many URLs in one call. Each URL is processed independently with the same formats, and results come back in the same order as the input array.

Body params

urlsstring[]required
The list of URLs to scrape — up to 100 per request.
formatsstring[]
Output formats applied to every URL. Defaults to markdown.
extractMainContentboolean
Strip nav/header/footer/sidebar from every page and return just the article body.
skipCacheboolean
Force a fresh fetch for every URL instead of serving cached results.
Language
Credentials
Bearer$CRAWLFOX_API_KEY
request.sh
curl --request POST \
  --url https://api.crawlfox.io/v1/batch \
  --header "Authorization: Bearer $CRAWLFOX_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"urls":["https://example.com/","https://example.org/"],"formats":["markdown"]}'
200 OKresponse.json
{
  "success": true,
  "data": [
    { "markdown": "# Example Domain\n...", "metadata": { "sourceURL": "https://example.com/", "statusCode": 200 } },
    { "markdown": "# Example Domain\n...", "metadata": { "sourceURL": "https://example.org/", "statusCode": 200 } }
  ]
}