Skip to main content
Use Crawl4AI through Corsair: one client, typed API calls, and incoming webhooks. One key, two ways to run Crawl4AI:
  • Crawl4AI Cloud (cloud.*, https://api.crawl4ai.com): the key is a Cloud API key (sk_live_..., crawl4ai.com → Get a free API key; 1,000 free credits a month). Runs cost credits (scrape 0.1 to a few, serp 1 a Google page, price 5 a site); cloud.tools.estimate prices a run first. Finding and reading tools is free. Every run answers { tool, request_id, took_ms, usage: { credits }, rows?, data? }.
  • Self-hosted server (server.*): run docker run -p 11235:11235 --shm-size=1g -e CRAWL4AI_API_TOKEN=<token> unclecode/crawl4ai and connect with that token as the key and the server’s address as server_url (https, or http on localhost). Without a token the server only listens on its own loopback. An account with a server_url holds the server’s token, which never goes to the Cloud: use a second account for cloud.*.
  • Site tools. cloud.tools.list (search with q, or source for one site) finds tested tools for 47 sites (Amazon, LinkedIn, YouTube, Google Maps, Zillow …); cloud.tools.get shows a tool’s inputs and columns; cloud.tools.run runs it.
  • Jobs. cloud.site, cloud.batch and job-type site tools return data.job_id; follow it with cloud.jobs.get and read rows with cloud.jobs.results (500 a page, after = the last seq + 1). On the server, server.crawlJobs.create and server.llmJobs.create queue work read back with .get, or call a webhook_config.webhook_url.
  • Files. server.screenshot and server.pdf return the PNG or PDF as a file; server.crawlStream and cloud.jobs.results return their NDJSON lines as { items }.
  • Risk. Runs are metered reads (read). cloud.watch and cloud.monitors.update are write (each check costs credits), deleting a watch and cancelling a job are destructive, as are cloud.billing.topup (charges the saved card) and cloud.billing.subscribe. server.executeJs is write (scripts can click and submit), killing a pool browser and resetting stats are destructive.
  • Webhooks. The server doesn’t sign job webhooks. Create jobs with webhook_config.webhook_headers: { "X-Webhook-Secret": "<secret>" } and give the plugin the same secret as webhookSecret; deliveries without it are refused.
What you get:
  • 66 typed API operations
  • 1 incoming webhook event types

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

Scrape a page as Markdown
Watch a pricing page
See the full list on the API page.

Webhooks

This plugin registers 1 webhook event type. Configure the provider to POST to your Corsair HTTP handler, then use webhookHooks on the plugin factory. See Webhooks for every event path and payload shape, and Webhooks concept for routing.

What’s next

API reference

Every crawl4ai.api.* operation with input and output types.

Webhooks

Event paths, payloads, and webhookHooks examples.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.