Tavily
Agentic web search, content extraction, crawling, and site mapping.
The tavily connector holds the API key and talks to Tavily, a search API built for LLMs: it returns ranked results with content already cleaned and chunked, so a flow can hand them straight to a model. Pair tavily-search with ai-agent to search the live web and then reason over what came back.
tavily connector
It is a service connector and provides no source. The blocks that bind to it are tavily-search, tavily-extract, tavily-crawl and tavily-map.
Settings
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey | string | Yes | none | Authenticates with the Tavily API; source it from ${TAVILY_API_KEY}. Never logged. |
timeout | duration | No | 30s | Bounds each Tavily API call. Raise it for tavily-crawl and tavily-map. |
An apiBaseURL setting also overrides the API base (default https://api.tavily.com), mainly for tests; it is not exposed in the editor.
samples/web-research uses every block on this page.
env:
- name: TAVILY_API_KEY
required: true
connectors:
- name: search
type: tavily
settings:
apiKey: ${TAVILY_API_KEY}tavily-crawl and tavily-map run server-side for up to 150s, five times the connector's default timeout. A flow that uses either must raise it (timeout: 180s), or the client gives up before Tavily answers.
Error handling
Tavily signals errors with an HTTP status ≥ 400 carrying {detail: {error}}. Every block has a failOnError setting (default true): when true a Tavily error fails the flow, when false the message passes through unchanged.
Where the result goes
Every block follows the same convention as pinecone: the response becomes the body. Set resultVar to keep the incoming body and store the response in a variable instead.
tavily-search block
Tavily Search searches the live web and returns the ranked results, optionally with a synthesized answer.
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
connector | string | Yes | none | Name of the tavily connector to use. |
query | expression | Yes | none | CEL expression for the search query. |
searchDepth | enum | No | Tavily's basic | basic, advanced, fast, or ultra-fast. Trades latency for relevance; advanced costs two credits, the rest cost one. |
topic | enum | No | general | general (the web) or news. |
maxResults | int | No | 5 | Number of results to return (0–20). |
chunksPerSource | int | No | Tavily's default | Maximum content chunks taken from each source (1–3). |
includeAnswer | enum | No | none (omitted) | none, basic, or advanced. Asks Tavily to synthesize an answer from the results. |
includeRawContent | enum | No | none (omitted) | none, markdown, or text. Includes each result's full cleaned page content. |
includeDomains | expression | No | none | CEL expression for a list of domains to restrict the search to. |
excludeDomains | expression | No | none | CEL expression for a list of domains to exclude. |
country | string | No | none | Country to boost results from, as Tavily's lowercase English name (united states, uruguay), not an ISO code. general topic only. |
language | string | No | none | Language to boost results in, as an ISO 639-1 code (en, fr, zh-cn). |
resultVar | string | No | none | Store the response here and leave the body; when empty, the response becomes the body. |
failOnError | bool | No | true | Turn a Tavily API error into a flow error. |
- type: tavily-search
name: research
settings:
connector: search
query: body.question
searchDepth: advanced
topic: general
maxResults: 8
includeAnswer: advanced
excludeDomains: '["pinterest.com"]'
resultVar: hitscountry and language do not use the same convention: country takes Tavily's own lowercase country names from a fixed list, while language takes an ISO 639-1 code. Both are passed through verbatim, so an unsupported value is rejected by Tavily rather than by the block.
An enum left unset is omitted from the request, so Tavily's own default applies. none on includeAnswer and includeRawContent means the same thing.
The response carries query, results (each with title, url, content, score, and raw_content when requested), answer when includeAnswer was set, plus response_time and usage.
A domain-list setting takes a CEL expression, so it can be a literal list, or come from the message:
includeDomains: body.allowedSitesBoth accept a bare string as a one-element list, matching Tavily's own tolerance.
tavily-extract block
Tavily Extract pulls clean, LLM-ready content out of URLs you already have, which is how a flow follows a link it was handed.
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
connector | string | Yes | none | Name of the tavily connector to use. |
urls | expression | Yes | none | CEL expression for the URLs to extract: a single URL, or a list of them. |
query | expression | No | none | CEL expression for the intent used to rerank the extracted chunks. |
extractDepth | enum | No | Tavily's basic | basic or advanced. advanced costs more and retrieves more. |
format | enum | No | Tavily's markdown | markdown or text. |
chunksPerSource | int | No | Tavily's default | Maximum content chunks taken from each source (1–5). |
includeImages | bool | No | false | Include the image URLs found on each page. |
failOnPartial | bool | No | false | Fail the flow when Tavily could not extract every URL it was given. Subordinate to failOnError (see below). |
resultVar | string | No | none | Store the response here and leave the body. |
failOnError | bool | No | true | Turn a Tavily API error into a flow error. |
The response carries results (each with url, raw_content, and images/favicon when requested) and failed_results, the URLs that could not be processed.
Tavily reports per-URL failures inside a 200: some URLs land in results, the rest in failed_results. By default the block passes the whole response through and your flow decides. Set failOnPartial: true when working from fewer pages than you asked for is wrong, since a partial extraction otherwise reads exactly like a complete one.
failOnPartial is subordinate to failOnError: with failOnError: false the message passes through regardless.
- type: tavily-extract
name: read-sources
settings:
connector: search
urls: body.results.map(r, r.url)
format: markdown
failOnPartial: truetavily-crawl block
Tavily Crawl walks a site from a root URL and returns each page's extracted content, optionally steered by a natural-language instruction.
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
connector | string | Yes | none | Name of the tavily connector to use. |
url | expression | Yes | none | CEL expression for the root URL to crawl from. |
instructions | expression | No | none | CEL expression for a natural-language instruction steering the crawler. |
maxDepth | int | No | Tavily's 1 | How far from the root URL to explore (1–5). |
maxBreadth | int | No | Tavily's 20 | Links to follow per page level (1–500). |
limit | int | No | Tavily's 50 | Total links processed before stopping. |
selectPaths | expression | No | none | CEL expression for a list of regexes selecting URL paths to visit. |
excludePaths | expression | No | none | CEL expression for a list of regexes excluding URL paths. |
selectDomains | expression | No | none | CEL expression for a list of regexes selecting domains to visit. |
excludeDomains | expression | No | none | CEL expression for a list of regexes excluding domains. |
allowExternal | bool | No | true | Follow links that leave the root domain. |
extractDepth | enum | No | Tavily's basic | basic or advanced. |
format | enum | No | Tavily's markdown | markdown or text. |
resultVar | string | No | none | Store the response here and leave the body. |
failOnError | bool | No | true | Turn a Tavily API error into a flow error. |
The response carries base_url and results, each with url and raw_content.
- type: tavily-crawl
name: crawl-docs
settings:
connector: search
url: '"https://docs.example.com"'
instructions: '"collect every page describing the API"'
maxDepth: 3
limit: 200
allowExternal: falsetavily-map block
Tavily Map discovers a site's link graph from a root URL and returns the URLs found, without extracting any content. It is crawl's cheap sibling: use it to decide what is worth crawling or extracting.
It takes the same traversal settings as tavily-crawl (url, instructions, maxDepth, maxBreadth, limit, selectPaths, excludePaths, selectDomains, excludeDomains, allowExternal) plus resultVar and failOnError. It has no extractDepth or format, because it extracts nothing.
The response carries base_url and results, a flat list of discovered URLs.
- type: tavily-map
name: survey
settings:
connector: search
url: body.site
maxDepth: 2
resultVar: siteUrls