Icecrawl API docs

Icecrawl API

Firecrawl v2 compatible, for IR's internal tools and agents. Send a URL, get clean markdown back. Any Firecrawl SDK works: point its base URL here and use your Icecrawl token as its API key.

Base URL
https://icecrawl.altzeros.com
Auth
Bearer token on every route except /health.
Cost
Free unless a page needs Firecrawl Cloud (1 credit) or you call search.

Authentication

Send your token as a bearer token. Ask Joshua for one; each app gets its own so usage can be told apart and a leaked token can be revoked alone.

A missing or wrong token returns 401 UNAUTHORIZED. Never put the token in a URL, a commit or a client-side page.

Header
Authorization: Bearer $ICECRAWL_TOKEN

How tiers work

Only /v2/scrape walks the tiers. It stops at the first answer that is not a block.

Direct freeISP proxy WebshareCloud 1 credit

Moves on when a tier gets HTTP 403, 429 or 503, Firecrawl's blocked flag, a bot-check page served as 200, or a dropped connection. Stops on success or any other error, such as 404, so a dead page never spends a credit.

To keep a request off the paid tier, send x-icecrawl-tiers: direct,proxy.

In every scrape response
"metadata": {
  "tier": "proxy",
  "tiersTried": [
    { "tier": "direct", "outcome": "retry",
      "reason": "blocked 403", "ms": 2500 },
    { "tier": "proxy", "outcome": "ok",
      "reason": "http 200", "ms": 3500 }
  ]
}
POST/v2/scrape

Scrape a page

Fetches one URL and returns its content in the formats you ask for.

directproxycloud

Body

FieldDescription
urlrequiredstringThe page to scrape. Public addresses only.
formatsstring[]markdown (default, main content), html (main content as HTML), rawHtml (full page source), links. Several in one call cost the same as one.
timeoutnumber, msMost time for each tier, in ms. Icecrawl lowers it so the whole scrape ends within 90 seconds.

Not supported

json, summary, screenshot formats and browser actions are skipped with a warning. Extract fields from the markdown yourself.

Request
curl https://icecrawl.altzeros.com/v2/scrape \
  -H "Authorization: Bearer $ICECRAWL_TOKEN" \
  -H "content-type: application/json" \
  -d '{"url":"https://www.xero.com/au/about/",
       "formats":["markdown","links"]}'
Response 200
{
  "success": true,
  "data": {
    "markdown": "# We help small businesses thrive...",
    "links": ["https://www.xero.com/au/pricing-plans/", ...],
    "metadata": {
      "title": "About Xero | Xero AU",
      "language": "en-AU",
      "statusCode": 200,
      "url": "https://www.xero.com/au/about/",
      "creditsUsed": 0,
      "tier": "direct",
      "tiersTried": [ ... ]
    }
  }
}
POST/v2/map

Map a site

Lists a site's URLs from its sitemaps and start page, without fetching their content. Use it to find the careers, team or contact page before scraping.

direct only

Body

FieldDescription
urlrequiredstringSite to map.
searchstringKeep URLs that match, for example careers.
limitnumberMost URLs to return.
Response 200
{
  "success": true,
  "links": [
    { "url": "https://www.xero.com/au/about/careers/" },
    ...
  ]
}
POST/v2/crawl

Crawl a site

Follows links from a start URL and scrapes each page. Returns a job id at once; poll the status route for pages.

direct only

Body

FieldDescription
urlrequiredstringStart URL.
limitnumberMost pages. Default 100.
maxDiscoveryDepthnumberHow many links deep to follow.
includePaths, excludePathsstring[]Path regexes to keep or skip.

Jobs live in memory for one hour and are lost if the service restarts.

Response 200
{
  "success": true,
  "id": "6f1c...e2",
  "url": "https://icecrawl.altzeros.com/v2/crawl/6f1c...e2"
}
GET/v2/crawl/{id}

Crawl status and results

status is scraping, completed, failed or cancelled. Pages arrive in data as they finish. DELETE /v2/crawl/{id} cancels.

Batch jobs use the same shape at /v2/batch/scrape/{id}.

Response 200
{
  "status": "completed",
  "total": 25, "completed": 25,
  "creditsUsed": 0,
  "expiresInSeconds": 3540,
  "data": [ { "markdown": "...", "metadata": {...} } ]
}
POST/v2/batch/scrape

Batch scrape

Scrapes a list of URLs as one job. Faster than a loop of single scrapes for many pages on easy sites.

direct only

Body

FieldDescription
urlsrequiredstring[]At least one.
maxConcurrencynumberPages at a time, 1 to 128. Default 16.
formatsstring[]As for scrape.

Batch pages do not fall back to the proxy or cloud. Retry blocked ones with /v2/scrape.

Request body
{
  "urls": [
    "https://www.xero.com/au/about/",
    "https://www.commbank.com.au/about-us.html"
  ],
  "formats": ["markdown"]
}
GET/health

Health

No token needed. 200 when every tier is up, 503 with the failing tier named otherwise.

Response 200
{
  "status": "ok",
  "engine": "icecrawl",
  "tiers": { "direct": "ok", "proxy": "ok", "cloud": "ok" }
}

Errors

Errors use Firecrawl's shape: {"success": false, "code": "...", "error": "..."}.

HTTPCodeMeaning
400BAD_REQUESTMissing url, bad JSON, or an unknown tier list.
401UNAUTHORIZEDMissing or wrong token.
404NOT_FOUND, JOB_NOT_FOUNDUnknown route, or a crawl job that expired.
413PAYLOAD_TOO_LARGERequest body over 2 MB.
502TIER_UNREACHABLEA backing service is down. Check /health.

A page every tier failed on still returns 200 with metadata.tier: "none", the site's status code and Firecrawl's blocked flag.

Limits

  • A scrape ends within 90 seconds, however many tiers it tries. Set client timeouts to at least 100 seconds.
  • The proxy tier routes the plain fetch only; pages that need JavaScript still render from our server.
  • Known unscrapeable: Glassdoor.
  • Internal use only. Do not expose a token in client-side code.