> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Crawl4AI API reference

> API reference for the Crawl4AI plugin in Corsair: every `crawl4ai.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Cloud

### answer

`cloud.answer`

Answer a question directly from the web (optionally as JSON matching a schema), with the sources it drew on; experimental

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.answer({ q: 'rust web crawler' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | Yes | The question or a whole prompt (max 4,000 characters). |
| `schema` | `Record<string, any>` | No | A JSON Schema the answer must match. |
| `deep` | `boolean` | No | Read a couple of pages when needed (default true); false = only a readily available answer. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### batch

`cloud.batch`

Run one tool over many inputs: as a job (up to 10,000; follow with cloud.jobs.\*) or streamed in the call (stream true, up to 50, returned as a list)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.batch({
	tool: 'scrape',
	inputs: [{ url: 'https://example.com' }, { url: 'https://example.org' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string` | Yes | The tool id, e.g. scrape. |
| `inputs` | `Record<string, any>[]` | Yes | One input per page; the first one's options apply to all. |
| `stream` | `boolean` | No | Answer in the call, one result per line (up to 50). |
| `idempotency_key` | `string` | No | Send the same key again on a retry to get the first job back, billed once. |

**Output:** `Record<string, any>`

***

### billing.balance

`cloud.billing.balance`

Your account's credit balance and this month's plan allowance

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.billing.balance({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### billing.subscribe

`cloud.billing.subscribe`

Start a monthly plan: returns a Stripe checkout page made for this account (a person pays there)

**Risk:** `destructive`

```ts theme={null}
await corsair.crawl4ai.api.cloud.billing.subscribe({ plan: 'starter' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `plan` | `string` | Yes | The plan id: starter, builder or scale. |

**Output:** `Record<string, any>`

***

### billing.topup

`cloud.billing.topup`

Buy extra credits on a plan, charged to the account's saved card (10 to 1,000 dollars)

**Risk:** `destructive`

```ts theme={null}
await corsair.crawl4ai.api.cloud.billing.topup({ amount: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `amount` | `number` | Yes | Dollars, 10 to 1000. |

**Output:** `Record<string, any>`

***

### billing.topups

`cloud.billing.topups`

Your payments, newest first: top-ups, auto recharges and plan charges, with receipts

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.billing.topups({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Payments a page. |
| `cursor` | `string` | No | next\_cursor from the last page. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `topups` | `object[] \| null` | No | — |
| `next_cursor` | `string \| null \| null` | No | The cursor for the next page; null on the last page. |

> [accordion] topups full type
>
> ```ts theme={null}
> {
>   at?: string | number | null,
>   usd?: number | null,
>   credits?: number | null,
>   kind?: string | number | null,
>   status?: string | number | null,
>   receipt_url?: string | number | null
> }[] | null
> ```

***

### extract

`cloud.extract`

Extract typed records from a page (or your own content) by a plain-English instruction and/or a JSON schema

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.extract({ url: 'https://news.ycombinator.com', instruction: 'the top stories on the front page' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | No | The page to read. |
| `content` | `string` | No | Your own text, Markdown or HTML instead of a URL. |
| `instruction` | `string` | No | What to pull out, in plain English. |
| `schema` | `Record<string, any>` | No | JSON Schema each record must match. |
| `example` | `Record<string, any>` | No | A sample of the shape you want. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### jobs.cancel

`cloud.jobs.cancel`

Stop a job; it ends as paused and keeps what it fetched

**Risk:** `destructive`

```ts theme={null}
await corsair.crawl4ai.api.cloud.jobs.cancel({ job_id: 'j_7f3c2a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | The job id. |

**Output:** `Record<string, any>`

***

### jobs.get

`cloud.jobs.get`

Get a job's state (pending, running, done, paused), counts and cost; free

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.jobs.get({ job_id: 'j_7f3c2a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | The job id. |
| `full` | `1` | No | 1 for per-URL detail. |

**Output:** `Record<string, any>`

***

### jobs.results

`cloud.jobs.results`

Read a job's rows (500 a page, each with seq); page with after = the last seq + 1; free

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.jobs.results({ job_id: 'j_7f3c2a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | The job id. |
| `after` | `number` | No | Rows already read (the last seq + 1). |
| `limit` | `number` | No | Rows a page (1 to 500). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `Record<string, any>[]` | Yes | One entry per NDJSON line, in order. |

***

### jobs.retry

`cloud.jobs.retry`

Run a job's failed pages again (billed like the first run)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.jobs.retry({ job_id: 'j_7f3c2a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | The job id. |

**Output:** `Record<string, any>`

***

### lead

`cloud.lead`

Find people, companies or industries by filters, or enrich a person or company (email, phone)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.lead({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `find` | `string` | No | What to find: people, companies, industries, enrich, email, phone, company. |
| `where` | `Record<string, any>` | No | Filters, e.g. \{ company: \{ industry, country } }. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### monitors.changes

`cloud.monitors.changes`

The feed of new matched changes across your watches

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.monitors.changes({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### monitors.delete

`cloud.monitors.delete`

Stop and delete a page watch

**Risk:** `destructive`

```ts theme={null}
await corsair.crawl4ai.api.cloud.monitors.delete({ id: 'youtube-captions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The watch id. |

**Output:** `Record<string, any>`

***

### monitors.events

`cloud.monitors.events`

List a watch's checks and matched changes

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.monitors.events({ id: 'youtube-captions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The watch id. |

**Output:** `Record<string, any>`

***

### monitors.get

`cloud.monitors.get`

Get one page watch

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.monitors.get({ id: 'youtube-captions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The watch id. |

**Output:** `Record<string, any>`

***

### monitors.list

`cloud.monitors.list`

List your page watches

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.monitors.list({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### monitors.update

`cloud.monitors.update`

Change a page watch (what to watch, how often, who to tell) or pause and resume it

**Risk:** `write`

```ts theme={null}
await corsair.crawl4ai.api.cloud.monitors.update({
	id: 'm_123',
	fields: { every: '1d' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The watch id. |
| `fields` | `Record<string, any>` | No | The fields to change, as cloud.watch takes them, e.g. \{ every, paused, notify }. |

**Output:** `Record<string, any>`

***

### price

`cloud.price`

Read websites' pricing pages: every plan, tier, billing period, add-on, trial and discount, per country, each with the page text it came from

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.price({
	sites: ['example'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sites` | `string[]` | Yes | Domains (hubspot.com) or pricing page URLs; at most 20. |
| `country` | `any` | No | Two-letter country, or a list of up to 5 (sites x countries at most 20). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### priceHistory

`cloud.priceHistory`

Every price read on a site, newest first (one point per change), up to 1,000; 1 credit

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.priceHistory({ domain: 'docs.crawl4ai.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | The site: hubspot.com. |
| `country` | `string` | No | Two-letter country. |

**Output:** `Record<string, any>`

***

### prices

`cloud.prices`

The public price table: credits per tool, the free grants, the plans and their limits

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.prices({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### report

`cloud.report`

Send Crawl4AI's team a report about a failed, slow or wrong call (never include keys or personal data); at most 5 an hour

**Risk:** `write`

```ts theme={null}
await corsair.crawl4ai.api.cloud.report({ category: 'slow', title: 'scrape took 40 s on a blog page' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `agent` | No | agent |
| `category` | `failed \| slow \| wrong \| could-be-better \| ux` | Yes | failed, slow, wrong, could-be-better or ux. |
| `title` | `string` | Yes | One line. |
| `note` | `string` | No | What you tried, what came back, what you expected. |
| `context` | `Record<string, any>` | No | \{ receipt: \<request\_id> } |

**Output:** `Record<string, any>`

***

### scan

`cloud.scan`

List every URL of a site from its sitemaps and home page links (optionally Common Crawl and the Wayback Machine), without crawling

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.scan({ domain: 'docs.crawl4ai.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | The site's host: docs.crawl4ai.com. |
| `extended` | `boolean` | No | Also ask Common Crawl and the Wayback Machine (20 s or more longer). |
| `max_urls` | `number` | No | Most URLs returned (default 5000, max 50000). |
| `include` | `string` | No | Keep only matching URLs: a path prefix (/docs) or a glob (*/blog/*). |
| `include_subdomains` | `boolean` | No | Also list subdomains. |
| `bypass_cache` | `boolean` | No | Scan again even when cached (7 days). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### scrape

`cloud.scrape`

Fetch one page as clean Markdown and/or HTML (cache, then HTTP, then a browser), with optional links, media, metadata and tables

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.scrape({ url: 'https://example.com', format: 'md' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | A public http(s) URL. |
| `format` | `both \| md \| html` | No | both (default), md or html. |
| `proxy` | `standard \| extra` | No | standard (default) or extra: rented residential addresses when ours are refused; a page served that way costs 4x. |
| `country` | `string` | No | Two-letter country to fetch from, e.g. us, gb. |
| `parse` | `any` | No | Also return page structure: true, a list (links, media, metadata, tables) or an object. |
| `engine` | `auto \| browser-light \| browser` | No | auto (default), browser-light or browser. |
| `bypass_cache` | `boolean` | No | Fetch fresh, never from the cache. |
| `timeout` | `number` | No | Answer within this many seconds (5 to 120); set it a little below your client timeout. |
| `fresh` | `boolean` | No | Skip the cache and fetch fresh (the Crawl4AI-Fresh header). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### search

`cloud.search`

Web search: ranked results (title, url, snippet), with rich blocks (follow-ups, entity card, news) or the top pages read in full (deep)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.search({ q: 'rust web crawler' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | Yes | The query (max 512 characters). |
| `rich` | `boolean` | No | Also return follow-up questions, related queries, an entity card, videos and news. |
| `deep` | `boolean` | No | Also read the top 10 result pages into each result's markdown (0.1 credit a page). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### serp

`cloud.serp`

Google's results page as data: organic ranks plus every block (AI overview, people also ask, local pack, ads ...), localised to a country or city; beta

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.serp({ q: 'rust web crawler' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | Yes | The query (max 512 characters). |
| `country` | `string` | No | Two letters, default us. |
| `language` | `string` | No | Google language code, default en. |
| `location` | `string` | No | A city or region: "Austin, TX". |
| `num` | `number` | No | Results asked: a multiple of 10 up to 100 (10 per Google page, 1 credit each). |
| `page` | `number` | No | Page over num (1 to 30). |
| `time` | `hour \| day \| week \| month \| year` | No | Google's time filter. |
| `fresh` | `boolean` | No | Skip the cache. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### site

`cloud.site`

Crawl a site level by level from a start URL into Markdown or HTML, as a job (follow it with cloud.jobs.get and cloud.jobs.results)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.site({
	url: 'https://docs.crawl4ai.com/',
	depth: 2,
	max_pages: 50,
	include: '/core',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | The start page. |
| `depth` | `number` | No | Levels of links below the start page (default 2, max 5). |
| `max_pages` | `number` | No | Most pages fetched (default 100, max 500). |
| `include` | `string` | No | Follow only matching URLs. |
| `exclude` | `string` | No | Never follow matching URLs. |
| `include_subdomains` | `boolean` | No | Also follow subdomains. |
| `content` | `md \| html \| none` | No | md (default), html or none. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### tools.estimate

`cloud.tools.estimate`

Price a run before it runs, with the same inputs; free

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.tools.estimate({ id: 'youtube-captions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The tool id. |
| `input` | `Record<string, any>` | No | The tool's inputs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### tools.get

`cloud.tools.get`

Get one tool's full definition: inputs, output columns, cost, examples and status; free

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.tools.get({ id: 'youtube-captions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The tool id, e.g. scrape, youtube-captions. |

**Output:** `Record<string, any>`

***

### tools.list

`cloud.tools.list`

Find tools in the catalog (11 essentials for any site and site tools for named sites): search with q, or filter by category, source (site), kind, status or essential; free, no credits

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.tools.list({ q: 'amazon reviews' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `q` | `string` | No | Words or a sentence: "video transcript", "amazon reviews". |
| `category` | `string` | No | A category id: video, jobs, shopping, social, people-companies ... |
| `source` | `string` | No | A site id: youtube, amazon, linkedin, google-maps, x ... |
| `kind` | `pages \| search \| people \| sites` | No | pages, search, people or sites. |
| `status` | `verified \| beta \| failing` | No | verified, beta or failing. |
| `essential` | `boolean` | No | Only the 11 essentials. |
| `limit` | `number` | No | Tools a page (default 50, at most 200). |
| `cursor` | `string` | No | next\_cursor from the last page. |

**Output:** `Record<string, any>`

***

### tools.run

`cloud.tools.run`

Run any tool by id with its inputs (site tools such as amazon-reviews, youtube-captions, linkedin-profile; read the inputs with cloud.tools.get first); costs credits

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.tools.run({
	id: 'youtube-captions',
	input: { video: 'aircAruvnKk' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The tool id. |
| `input` | `Record<string, any>` | No | The tool's inputs, as cloud.tools.get lists them. |
| `fresh` | `boolean` | No | Skip the cache and fetch fresh (the Crawl4AI-Fresh header). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### tools.status

`cloud.tools.status`

Get a tool's status from its daily check (verified, beta, failing); free

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.tools.status({ id: 'youtube-captions' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The tool id. |

**Output:** `Record<string, any>`

***

### verify

`cloud.verify`

Check whether an email address can receive mail (no mail is sent), a list of up to 1,000, or a domain's mail setup

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.cloud.verify({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `check` | `email \| list \| domain` | No | email (default), list or domain. |
| `email` | `string` | No | One address (check email). |
| `emails` | `string[]` | No | Up to 1,000 addresses (check list). |
| `domain` | `string` | No | A domain (check domain). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

### watch

`cloud.watch`

Watch a page and get told (email, webhook or the changes feed) when the change you describe happens; each check costs credits

**Risk:** `write`

```ts theme={null}
await corsair.crawl4ai.api.cloud.watch({ url: 'https://example.com/pricing', watch: 'a plan gets more expensive', email: 'ada@example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | The page to watch. |
| `watch` | `string` | No | The change you care about, in plain words. |
| `every` | `string` | No | How often to check (default auto). |
| `email` | `string` | No | Email to tell. |
| `webhook` | `string` | No | URL to POST changes to. |
| `secret` | `string` | No | Signs the webhook. |
| `trigger` | `any` | No | When to tell. |
| `region` | `string` | No | Where to check from. |
| `name` | `string` | No | A name for the watch. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tool` | `string \| number \| null` | No | — |
| `request_id` | `string \| number \| null` | No | — |
| `took_ms` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `rows` | `Record<string, any>[] \| null` | No | The records: search results, extracted items, URLs, prices, site tool rows. |
| `data` | `Record<string, any> \| null` | No | The rest of the answer: scrape markdown, an answer, a job id and poll path, a watch. |

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   credits?: number | null
> } | null
> ```

***

## Server

### artifacts.get

`server.artifacts.get`

Download an artifact a crawl stored (a screenshot, PDF or MHTML), as a file

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.artifacts.get({ artifact_id: 'a_123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `artifact_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### ask

`server.ask`

Search Crawl4AI's own library documentation and code context (for agents writing Crawl4AI code)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.ask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `context_type` | `string` | No | — |
| `query` | `string \| null` | No | search query to filter chunks |
| `score_ratio` | `number` | No | min score as fraction of max\_score |
| `max_results` | `number` | No | absolute cap on returned chunks |

**Output:** `Record<string, any>`

***

### configDump

`server.configDump`

Check a config in its JSON form (\{ type: CrawlerRunConfig or BrowserConfig, params }) and get it back with every default the server fills in

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.configDump({
	type: 'CrawlerRunConfig',
	params: { word_count_threshold: 10 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `CrawlerRunConfig \| BrowserConfig` | Yes | Which config. |
| `params` | `Record<string, any>` | No | The config fields, e.g. \{ word\_count\_threshold: 10 }. |

**Output:** `Record<string, any>`

***

### crawl

`server.crawl`

Crawl one or more URLs and wait for the results: Markdown, HTML, links, media, tables, metadata, extracted content, with browser and crawler configs

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.crawl({
	urls: ['https://example.com'],
	crawler_config: {
		type: 'CrawlerRunConfig',
		params: { cache_mode: 'bypass' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `urls` | `string[]` | Yes | — |
| `browser_config` | `object \| null` | No | — |
| `crawler_config` | `object \| null` | No | — |
| `crawler_configs` | `object[] \| null` | No | List of per-URL CrawlerRunConfig dicts for arun\_many(). When provided, each config can include a 'url\_matcher' pattern to match against specific URLs. Takes precedence over crawler\_config. |
| `hooks` | `object \| null` | No | Optional user-provided hook functions |

> [accordion] browser\_config full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] crawler\_config full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] crawler\_configs full type
>
> ```ts theme={null}
> {
> }[] | null
> ```

> [accordion] hooks full type
>
> ```ts theme={null}
> {
>   hooks?: {
>     action: string,
>     params?: {
>     }
>   }[],
>   timeout?: number,
>   code?: any | null
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `results` | `object[] \| null` | No | — |
| `server_processing_time_s` | `number \| null` | No | — |
| `server_memory_delta_mb` | `number \| null` | No | — |
| `server_peak_memory_mb` | `number \| null` | No | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   url?: string | number | null,
>   success?: boolean | null,
>   status_code?: number | null | null,
>   error_message?: string | number | null | null,
>   html?: string | number | null | null,
>   cleaned_html?: string | number | null | null,
>   fit_html?: string | number | null | null,
>   markdown?: any | null,
>   links?: Record<string, any> | null,
>   media?: Record<string, any> | null,
>   metadata?: Record<string, any> | null | null,
>   tables?: any[] | null,
>   extracted_content?: string | number | null | null,
>   screenshot?: string | number | null | null,
>   pdf?: string | number | null | null,
>   redirected_url?: string | number | null | null,
>   response_headers?: Record<string, any> | null | null,
>   js_execution_result?: Record<string, any> | null | null,
>   session_id?: string | number | null | null
> }[] | null
> ```

***

### crawlJobs.create

`server.crawlJobs.create`

Queue a crawl of one or more URLs with browser and crawler configs; poll server.crawlJobs.get or pass webhook\_config

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.crawlJobs.create({
	urls: ['https://example.com'],
	webhook_config: {
		webhook_url: 'https://example.com/hooks/corsair',
		webhook_headers: { X-Webhook-Secret: 'a-long-random-secret' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `urls` | `string[]` | Yes | — |
| `browser_config` | `object` | No | — |
| `crawler_config` | `object` | No | — |
| `webhook_config` | `object \| null` | No | Configuration for webhook notifications. |

> [accordion] browser\_config full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] crawler\_config full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] webhook\_config full type
>
> ```ts theme={null}
> {
>   webhook_url: string,
>   webhook_data_in_payload?: boolean,
>   webhook_headers?: Record<string, string> | null
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string \| null` | No | — |

***

### crawlJobs.get

`server.crawlJobs.get`

Get the state and, once completed, the results of a crawl job

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.crawlJobs.get({ task_id: 'crawl_a1b2c3d4' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string \| null` | No | — |
| `status` | `string \| number \| null` | No | processing, completed or failed. |
| `created_at` | `string \| number \| null` | No | — |
| `url` | `string \| number \| null` | No | — |
| `result` | `any \| null` | No | The crawl result once completed. |
| `error` | `string \| number \| null \| null` | No | — |

***

### crawlStream

`server.crawlStream`

Crawl URLs and collect each result as the server streams it (NDJSON, returned as a list)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.crawlStream({
	urls: ['https://example.com'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `urls` | `string[]` | Yes | — |
| `browser_config` | `object \| null` | No | — |
| `crawler_config` | `object \| null` | No | — |
| `crawler_configs` | `object[] \| null` | No | List of per-URL CrawlerRunConfig dicts for arun\_many(). When provided, each config can include a 'url\_matcher' pattern to match against specific URLs. Takes precedence over crawler\_config. |
| `hooks` | `object \| null` | No | Optional user-provided hook functions |

> [accordion] browser\_config full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] crawler\_config full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] crawler\_configs full type
>
> ```ts theme={null}
> {
> }[] | null
> ```

> [accordion] hooks full type
>
> ```ts theme={null}
> {
>   hooks?: {
>     action: string,
>     params?: {
>     }
>   }[],
>   timeout?: number,
>   code?: any | null
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `Record<string, any>[]` | Yes | One entry per NDJSON line, in order. |

***

### executeJs

`server.executeJs`

Run JavaScript snippets in a page (they can click, type and submit) and return the crawl result with each snippet's return value

**Risk:** `write`

```ts theme={null}
await corsair.crawl4ai.api.server.executeJs({
	url: 'https://example.com',
	scripts: ['document.title'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | — |
| `scripts` | `string[]` | Yes | List of separated JavaScript snippets to execute |

**Output:** `Record<string, any>`

***

### health

`server.health`

Check the server is up and get its version

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.health({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| number \| null` | No | — |
| `timestamp` | `number \| null` | No | — |
| `version` | `string \| number \| null` | No | — |

***

### hooks

`server.hooks`

List the declarative hook actions the server allows, with their parameters

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.hooks({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### html

`server.html`

Fetch a page as preprocessed HTML (scripts and styles removed), for schema building

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.html({ url: 'https://example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string \| number \| null` | No | — |
| `html` | `string \| number \| null` | No | — |
| `success` | `boolean \| null` | No | — |

***

### llm

`server.llm`

Answer a question about a page with the server's configured LLM

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.llm({ url: 'https://example.com', q: 'rust web crawler' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | The page URL (`https://`...). |
| `q` | `string` | Yes | — |
| `provider` | `string \| null` | No | LLM provider override, e.g. 'openai/gpt-6-luna' |
| `temperature` | `number \| null` | No | LLM temperature override |

**Output:** `Record<string, any>`

***

### llmJobs.create

`server.llmJobs.create`

Queue an LLM extraction of a page: a question or instruction `q` (and optional JSON schema) answered from the page by the server's configured LLM; poll server.llmJobs.get or pass webhook\_config

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.llmJobs.create({ url: 'https://example.com', q: 'rust web crawler' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | — |
| `q` | `string` | Yes | — |
| `schema` | `string \| null` | No | — |
| `cache` | `boolean` | No | — |
| `provider` | `string \| null` | No | — |
| `webhook_config` | `object \| null` | No | Configuration for webhook notifications. |
| `temperature` | `number \| null` | No | — |

> [accordion] webhook\_config full type
>
> ```ts theme={null}
> {
>   webhook_url: string,
>   webhook_data_in_payload?: boolean,
>   webhook_headers?: Record<string, string> | null
> } | null
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string \| null` | No | — |

***

### llmJobs.get

`server.llmJobs.get`

Get the state and, once completed, the result of an LLM extraction job

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.llmJobs.get({ task_id: 'crawl_a1b2c3d4' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string \| null` | No | — |
| `status` | `string \| number \| null` | No | processing, completed or failed. |
| `created_at` | `string \| number \| null` | No | — |
| `url` | `string \| number \| null` | No | — |
| `result` | `any \| null` | No | The extraction once completed. |
| `error` | `string \| number \| null \| null` | No | — |

***

### markdown

`server.markdown`

Fetch a page as Markdown, raw or filtered (fit, bm25 with a query, llm with an instruction)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.markdown({ url: 'https://example.com', f: 'fit' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | Absolute http/https URL to fetch |
| `f` | `raw \| fit \| bm25 \| llm` | No | — |
| `q` | `string \| null` | No | Query string used by BM25/LLM filters |
| `c` | `string \| null` | No | Cache‑bust / revision counter |
| `provider` | `string \| null` | No | LLM provider override (e.g., 'anthropic/claude-3-opus') |
| `temperature` | `number \| null` | No | LLM temperature override (0.0-2.0) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string \| number \| null` | No | — |
| `filter` | `string \| number \| null` | No | — |
| `query` | `string \| number \| null \| null` | No | — |
| `cache` | `string \| number \| null` | No | — |
| `markdown` | `string \| number \| null` | No | — |
| `success` | `boolean \| null` | No | — |

***

### mcpSchema

`server.mcpSchema`

Get the server's MCP tools and resources as JSON

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.mcpSchema({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### metrics

`server.metrics`

Prometheus metrics of the server (returned as text)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.metrics({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `text` | `string` | Yes | The body the server answered with. |

***

### monitor.browsers

`server.monitor.browsers`

List the browsers in the pool (hot, cold, permanent) with their age and use

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.browsers({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### monitor.cleanup

`server.monitor.cleanup`

Close idle browsers and free memory now

**Risk:** `write`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.cleanup({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### monitor.endpointStats

`server.monitor.endpointStats`

Get request counts, latency and errors per endpoint

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.endpointStats({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### monitor.errorLog

`server.monitor.errorLog`

Read the server error log

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.errorLog({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |

**Output:** `Record<string, any>`

***

### monitor.health

`server.monitor.health`

Get the server health: memory, CPU, uptime and the browser pool

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.health({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### monitor.janitorLog

`server.monitor.janitorLog`

Read the browser-pool janitor log

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.janitorLog({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |

**Output:** `Record<string, any>`

***

### monitor.killBrowser

`server.monitor.killBrowser`

Kill one browser of the pool by its signature (crawls running in it fail)

**Risk:** `destructive`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.killBrowser({ sig: 'browser-1a2b' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sig` | `string` | Yes | — |

**Output:** `Record<string, any>`

***

### monitor.requests

`server.monitor.requests`

List recent requests to the server, filtered by status

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.requests({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `limit` | `number` | No | — |

**Output:** `Record<string, any>`

***

### monitor.resetStats

`server.monitor.resetStats`

Reset the server's request statistics (they can't be restored)

**Risk:** `destructive`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.resetStats({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### monitor.restartBrowser

`server.monitor.restartBrowser`

Restart one browser of the pool by its signature

**Risk:** `write`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.restartBrowser({ sig: 'browser-1a2b' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sig` | `string` | Yes | — |

**Output:** `Record<string, any>`

***

### monitor.timeline

`server.monitor.timeline`

Get a metric (memory, requests, browsers) over a time window

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.monitor.timeline({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `metric` | `string` | No | — |
| `window` | `string` | No | — |

**Output:** `Record<string, any>`

***

### pdf

`server.pdf`

Render a page as a PDF (returned as a file)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.pdf({ url: 'https://example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | — |
| `output_path` | `string \| null` | No | REMOVED in 0.9.0 and ignored - no file is written. Results are stored server-side; fetch via GET /artifacts/\{artifact\_id}. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |
| `artifact_id` | `string` | No | The id server.artifacts.get reads this file back with, when the server kept it. |

***

### schema

`server.schema`

Get the default BrowserConfig and CrawlerRunConfig as JSON, to start a config from

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.schema({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### screenshot

`server.screenshot`

Take a full-page screenshot of a page (returned as a PNG file)

**Risk:** `read`

```ts theme={null}
await corsair.crawl4ai.api.server.screenshot({ url: 'https://example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | — |
| `screenshot_wait_for` | `number \| null` | No | — |
| `wait_for_images` | `boolean \| null` | No | — |
| `output_path` | `string \| null` | No | REMOVED in 0.9.0 and ignored - no file is written. Results are stored server-side; fetch via GET /artifacts/\{artifact\_id}. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |
| `artifact_id` | `string` | No | The id server.artifacts.get reads this file back with, when the server kept it. |

***

### token

`server.token`

Get a JWT for an email address (servers with JWT auth on; api\_token is the server secret when one is set)

**Risk:** `write`

```ts theme={null}
await corsair.crawl4ai.api.server.token({ email: 'ada@example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `api_token` | `string \| null` | No | — |

**Output:** `Record<string, any>`

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.