Tavily Web Search¶
Performs a live web search using the Tavily service and returns a concise answer (optional) along with structured search results. Supports general and news topics, configurable search depth, result limits, and domain inclusion/exclusion. Can optionally include raw page content or AI-extracted relevant snippets.

Usage¶
Use this node to research a topic, gather citations, and optionally get a short synthesized answer. Typical workflows include: triggering a search from a user query, feeding the returned documents into downstream summarizers or RAG pipelines, and using the optional answer as a quick response while detailed processing uses the documents list.
Inputs¶
| Field | Required | Type | Description | Example | 
|---|---|---|---|---|
| query | True | STRING | The search query text to send to the Tavily engine. | What are the latest developments in quantum error correction? | 
| search_depth | True | ['basic', 'advanced'] | Controls how deep the search goes. Basic is faster and cheaper; Advanced performs broader/deeper retrieval. | advanced | 
| max_results | True | INT | Maximum number of results to return. Minimum is 1. | 5 | 
| topic | True | ['general', 'news'] | Select the search category. Use 'news' for time-sensitive results. | news | 
| days | True | INT | Only applies when topic is 'news'. Number of days back from today to include in results. | 3 | 
| include_answer | True | BOOLEAN | If true, returns a short synthesized answer to the query along with documents. | True | 
| include_raw_content | True | BOOLEAN | If true, includes raw text content from the pages. If false, returns AI-extracted, query-relevant snippets only. | False | 
| include_domains | True | STRING | List of domains to prioritize/include, separated by line breaks. | nature.com arxiv.org aeon.co | 
| exclude_domains | True | STRING | List of domains to exclude, separated by line breaks. | reddit.com pinterest.com quora.com | 
Outputs¶
| Field | Type | Description | Example | 
|---|---|---|---|
| answer | STRING | A short, synthesized answer to the original query. Present only if include_answer is true. | Quantum error correction is progressing with bosonic codes and LDPC-based surface code variants showing improved thresholds and resource efficiency. | 
| documents | STRING | A JSON-formatted string representing an array of search results with titles, URLs, snippets, and optionally raw content. | [{"title": "Recent Advances in QEC", "url": "https://example.com/qec", "snippet": "...", "content": "..."}] | 
Important Notes¶
- All inputs are required: Provide values for each field, even if left as defaults.
- Query must be non-empty: An empty query will cause the node to fail with a validation error.
- Answer output depends on include_answer: If set to false, the 'answer' output may be empty or omitted by the service; rely on documents for downstream processing.
- Days applies only to news topic: The 'days' parameter is used only when topic is 'news'; it is ignored for 'general'.
- Domain lists are line-separated: Provide one domain per line for include_domains and exclude_domains.
- Raw content can be large: Enabling include_raw_content may significantly increase payload size and processing time.
- Search depth affects cost and coverage: Advanced depth provides broader retrieval but at higher credit usage.
Troubleshooting¶
- Empty query error: Ensure 'query' is a non-blank string; trim whitespace before passing.
- No answer returned: Set include_answer to true; if already true, the service may still omit an answer depending on query and content.
- Cannot parse documents: The documents output is a JSON string; parse it before iterating over results in downstream nodes or scripts.
- Unexpected results for 'general' with 'days': 'days' is ignored unless topic is 'news'; switch topic to 'news' to filter by recency.
- Too few or too many results: Adjust max_results to your desired count; minimum is 1.
- Irrelevant domains appearing: Verify exclude_domains formatting (one domain per line, no protocols). For stricter control, also use include_domains.
- Timeouts or service errors: Retry the operation later and confirm network connectivity; reduce include_raw_content and max_results to decrease response size.
Example Pipelines¶
