Overview
This node executes a search query using the Tavily Search API. It allows users to perform customized searches by specifying parameters such as query text, topic category (general or news), search depth, maximum results, time range, and domain filters. It can also include additional data like LLM-generated answers, raw HTML content, images, and image descriptions in the search results. This node is useful for integrating advanced search capabilities into workflows, such as retrieving news articles, general web content, or enriched search results with images and AI-generated summaries.
Use Case Examples
- A marketing team uses this node to gather recent news articles about a competitor by setting the topic to 'news' and filtering results from the past week.
- A researcher performs an advanced search on a specific topic, including raw content and images, to collect comprehensive data for analysis.
- A developer integrates this node to fetch general search results with AI-generated answers to enhance a chatbot's knowledge base.
Properties
| Name | Meaning |
|---|---|
| Query | The search query to execute with Tavily. |
| Topic | The category of the search, either general or news. |
| Search Depth | Depth of the search, affecting credit usage (basic or advanced). |
| Max Results | Maximum number of search results to return, between 0 and 20. |
| Time Range | Time range filter relative to the current date for filtering results. |
| Days (News Only) | Number of days back from the current date to include in news searches. |
| Include Answer | Option to include an LLM-generated answer in the results (none, basic, or advanced). |
| 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 images in the response. |
| Include Image Descriptions | When including images, whether to add descriptive text for each image. |
| Include Domains | List of domains to specifically include in the search results. |
| Exclude Domains | List of domains to specifically exclude from the search results. |
Output
JSON
query- The original search query string.answer- Optional LLM-generated answer included in the response.images- Optional images included in the search results.results- Array of search result items returned by the API.response_time- Time taken by the API to respond to the search request.
Dependencies
- Tavily Search API
- An API key credential for Tavily API
Troubleshooting
- Missing or invalid API key in credentials will cause an error; ensure the Tavily API key is correctly set.
- Empty query parameter will cause an error; always provide a non-empty search query.
- Max Results must be between 0 and 20; values outside this range will cause an error.
- Invalid timeRange values will cause an error; use only allowed values: '', day, week, month, year, d, w, m, y.
- For topic 'news', the 'days' parameter must be zero or positive; negative values will cause an error.
Links
- Tavily Search API Documentation - Official API documentation for the Tavily Search endpoint.