Skip to content
Fieldwork
Esc
↑↓navigate↵open⌘Jpreview
On this page

Options

The option names every provider shares, the settings every call accepts, and how provider-only options and refused combinations work.

Options are typed per provider, so your editor offers only the options the provider you chose supports. An option means the same thing under the same name everywhere.

Shared names

Option Meaning
limit The most results or pages to return.
includeDomains, excludeDomains Plain domains such as example.com. Options that take regular expressions or paths have their own names, such as Firecrawl’s includePaths.
publishedAfter, publishedBefore Dates as YYYY-MM-DD.
recency "hour", "day", "week", "month" or "year", narrowed to what the provider supports.
maxAge Seconds a cached copy may be old; 0 always fetches the page fresh.
country An ISO 3166-1 code such as "GB".
language An ISO 639-1 code such as "de".
schema, prompt A JSON Schema or a Standard Schema such as Zod for structured output, and extraction instructions in plain words. See Structured output.
query On read: return the passages that answer it as excerpts. On reverseImage: text to refine the search with.
match On reverseImage: "exact" for pages showing the same image, "visual" for similar ones.
content On search: include each result’s page text.
maxTokens, maxTokensPerResult On search: total and per-result token caps for returned passages (Brave with content: true, Perplexity).
maxCharsPerResult On search, read and readMany: per-result character cap for returned excerpts or highlights (Exa, Parallel).
maxCharsTotal On search, read and readMany: total character cap across returned excerpts (Parallel).
maxContentChars On read and readMany: per-page character cap for full page markdown (Exa, Parallel).
continueFrom On answer and research: the continuationId of an earlier result, to ask a follow-up.
maxBytes On download: the largest file accepted, in bytes. Defaults to, and may not exceed, the provider’s ceiling.
resume, interval On jobs: collect an earlier job by its id, and the milliseconds between status checks (unset: 500, doubling to 2000). See Long jobs.
const web = fieldwork({ adapter: firecrawl() });

const { results } = await web.search("repairable laptops", {
  limit: 10,
  includeDomains: ["ifixit.com"],
  recency: "month",
  country: "GB",
});
Settings every call accepts

Every method takes these, whatever the provider:

PropType
signal?AbortSignal

Cancels the call, including any polling for an asynchronous job.

TypeAbortSignal
timeout?number

Milliseconds before the call gives up, across every attempt.

Typenumber
retries?number

How many times to repeat a request that failed in a way that can succeed on repeat: a rate limit, a 5xx, or a failed connection. Waits as long as the provider asks, or backs off exponentially. Overrides the adapter's `retries`; `0` turns retrying off.

Typenumber

Errors and retries explains when a request is repeated.

Options only one provider has

An option only one provider has keeps that provider’s meaning and values, such as Tavily’s topic, Exa’s category, SerpApi’s engine or Firecrawl’s proxy. It appears in the types only for that provider’s adapter.

Refused combinations

A combination a provider would reject or silently ignore throws InvalidRequest before anything is sent. For example, Parallel refuses includeDomains together with excludeDomains, and Firecrawl refuses recency together with publishedAfter or publishedBefore. The message names the options that clashed.

Last updated on

Was this page helpful?