Skip to content

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.
Preview

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

FieldRequiredTypeDescriptionExample
queryTrueSTRINGThe search query text to send to the Tavily engine.What are the latest developments in quantum error correction?
search_depthTrue['basic', 'advanced']Controls how deep the search goes. Basic is faster and cheaper; Advanced performs broader/deeper retrieval.advanced
max_resultsTrueINTMaximum number of results to return. Minimum is 1.5
topicTrue['general', 'news']Select the search category. Use 'news' for time-sensitive results.news
daysTrueINTOnly applies when topic is 'news'. Number of days back from today to include in results.3
include_answerTrueBOOLEANIf true, returns a short synthesized answer to the query along with documents.True
include_raw_contentTrueBOOLEANIf true, includes raw text content from the pages. If false, returns AI-extracted, query-relevant snippets only.False
include_domainsTrueSTRINGList of domains to prioritize/include, separated by line breaks.nature.com arxiv.org aeon.co
exclude_domainsTrueSTRINGList of domains to exclude, separated by line breaks.reddit.com pinterest.com quora.com

Outputs

FieldTypeDescriptionExample
answerSTRINGA 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.
documentsSTRINGA 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

Example
Example