Overview
This node performs a web search query using the Tavily service. It allows users to input a search query and customize various parameters such as topic category, search depth, number of results, time range, and more. The node is useful for retrieving relevant information from the web, including news, finance data, or general content, and can optionally include generated answers, raw HTML content, images, and domain filtering.
Practical examples:
- Searching for recent news articles about a specific event within the last week.
- Retrieving financial reports or market summaries related to a company.
- Getting a quick summarized answer to a question with supporting source snippets.
- Performing an image search related to a topic and including descriptive text.
Properties
| Name | Meaning |
|---|---|
| Query | The search query string to look up (e.g., "who is leo messi?"). |
| Topic | Category of the search: General, News, or Finance. |
| Search Depth | Level of detail in search results: Basic (generic snippets) or Advanced (most relevant sources and detailed content chunks). |
| Chunks Per Source | Number of content chunks (max 3) to retrieve per source when using advanced search depth; each chunk is up to 500 characters. |
| Max Results | Maximum number of search results to return (1 to 20). |
| Time Range | Time window for filtering results relative to current date: Day, Week, Month, or Year. |
| Days | Number of days back to include in results; applicable only if Topic is News (1 to 365). |
| Include Answer | Whether to include a language model-generated answer to the query: Basic (quick answer) or Advanced (detailed answer). |
| Include Raw Content | Whether to include cleaned and parsed HTML content of each search result. |
| Include Images | Whether to perform an image search and include image results. |
| Include Image Descriptions | Whether to add descriptive text for each image when images are included. |
| Include Domains | List of domains to specifically include in search results (multiple values allowed). |
| Exclude Domains | List of domains to exclude from search results (multiple values allowed). |
| Include Favicon | Whether to include the favicon URL for each search result. |
| Auto Parameters | Whether to enable automatic configuration of search parameters based on the query's content and intent. |
| Start Date | Return results published after this date (format YYYY-MM-DD). |
| End Date | Return results published before this date (format YYYY-MM-DD). |
| Country | Boost search results from a specific country (only available if Topic is General). See external docs for full list of country codes. |
Output
The node outputs JSON data containing the search results matching the query and specified options. The structure typically includes:
- A list of search results, each with metadata such as title, URL, snippet, publish date, and optionally:
- Cleaned HTML content if requested.
- Images and their descriptions if image search is enabled.
- Favicons URLs if included.
- An optional generated answer to the query, either basic or detailed depending on settings.
- Additional metadata about the search execution.
If images are included, binary data may be present representing image files or URLs.
Dependencies
- Requires access to the Tavily API service for performing searches.
- Needs an API key or authentication token configured in n8n credentials to authorize requests.
- Network connectivity to the Tavily endpoints.
- Optional environment variables or configurations may be needed to specify API base URLs or timeouts.
Troubleshooting
Common issues:
- Missing or invalid API credentials will cause authentication errors.
- Invalid date formats for start_date or end_date will result in request failures.
- Requesting too many results or chunks beyond allowed limits may cause errors.
- Using incompatible options together (e.g., days parameter when topic is not news) might be ignored or cause warnings.
Error messages:
- Authentication errors: Verify that the API key credential is correctly set up.
- Validation errors: Check that all required fields are filled and dates follow the YYYY-MM-DD format.
- Rate limiting or quota exceeded: Reduce request frequency or check API usage limits.