Tavily Integration with SmythOS
Need a search engine built for AI? Connect Tavily to SmythOS and empower your agents with a powerful, AI-optimized search API to get clean, relevant, and comprehensive data from the web.
List of Tavily Components
Quickly compare Tavily components by what they do and their key I/O. Click any component name to jump directly to its detailed guide.
Component | Action | What it Does | Inputs | Key Outputs | Use Case |
---|---|---|---|---|---|
Basic General Search | Search | Performs a quick, general topic search optimized for LLMs. | required query optional max_results | Results | Fast answers for general knowledge questions. |
Advanced General Search | Search | Performs a general search with advanced filtering like time range. | required query optional time_range | Results | Researching topics within a specific recent timeframe. |
Basic News Search | Search | Performs a quick search focused specifically on news sources. | required query optional days | Results | Getting the latest headlines on a topic. |
Advanced News Search | Search | Performs a news search with more detailed filtering options. | required query optional days | Results | In-depth media monitoring from specific domains. |
Extract | Scrape | Scrapes and extracts the main content from a list of URLs. | required urls | results | Getting clean article text for summarization. |
Prerequisites
Before you begin, please ensure you have the following:
- An active SmythOS account. (Sign up here).
- A Tavily account.
- Your Tavily API Key.
Getting Started With Tavily
The connection between SmythOS and Tavily is configured using a secure API key.
Step 1: Get Your Tavily API Key
- Log in to your Tavily account.
- Navigate to the API Key section of your dashboard.
- Copy your API key.
Step 2: Store Your API Key in SmythOS Vault
Your API Key is a sensitive credential. Use the SmythOS Vault
to store it securely.
- In your SmythOS dashboard, navigate to the Vault.
- Create a new secret and paste your Tavily API Key as the value. Give it a memorable name, like
tavily_api_key
. - For more details, see the Vault Documentation.
Step 3: Configure a Tavily Component
- In your SmythOS agent graph, drag and drop any Tavily component.
- Click the component to open its Settings panel.
- In the
Tavily API Key
field, select the secret you saved in the Vault (e.g.,tavily_api_key
). - Your connection is now configured for that component.
Which Tavily Component Should I Use?
If you need to… | Target | Use this Component | Why this one? |
---|---|---|---|
Quickly find general information on a topic | A search query | Basic General Search | The fastest and most direct way to get general-purpose search results. |
Find information from the last week only | A search query and a time frame | Advanced General Search | Adds time-based filtering to narrow down results to recent events. |
Get the latest news headlines for a company | A search query focused on news | Basic News Search | Specifically targets news sources for up-to-the-minute reporting. |
Extract the text from a list of articles | An array of URLs | Extract | Moves beyond search to scrape and clean the content from specific pages. |
Component Details
This section provides detailed information for each Tavily component.
Basic General Search
Performs a quick, general-purpose web search optimized for providing context to LLMs.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
query | string | Yes | The search keyword or phrase. |
max_results | string | Optional | The maximum number of search results to return. |
include_domains | array | Optional | A list of domains to prioritize in the search. |
exclude_domains | array | Optional | A list of domains to ignore in the search. |
Outputs
Field | Type | Description |
---|---|---|
Results | array | An array of objects, each containing a search result with its URL, title, and content snippet. |
Response | object | The full, raw JSON response from the Tavily API. |
Headers | object | The HTTP headers from the API response. |
{
"component": "tavily.basicGeneralSearch",
"query": "benefits of using a multi-agent system",
"max_results": "5"
}
Advanced General Search
Performs a general web search with the addition of time-based filtering.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
query | string | Yes | The search keyword or phrase. |
time_range | string | Optional | Time range for results (e.g., d for day, w for week, m for month). Default: m . |
max_results | string | Optional | The maximum number of search results to return. |
Outputs
Field | Type | Description |
---|---|---|
Results | array | An array of time-filtered search result objects. |
Response | object | The full, raw JSON response from the Tavily API. |
Headers | object | The HTTP headers from the API response. |
{
"component": "tavily.advancedGeneralSearch",
"query": "latest advancements in AI agents",
"time_range": "w"
}
News Search Components
Includes Basic News Search and Advanced News Search. These components are specifically tuned to search only news sources.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
query | string | Yes | The news topic or keyword to search for. |
days | string | Optional | Number of days back to search. Default: 3 . |
max_results | string | Optional | Maximum number of news articles to return. |
Outputs
Field | Type | Description |
---|---|---|
Results | array | An array of objects, each representing a news article. |
Response | object | The full, raw JSON response from the Tavily API. |
Headers | object | The HTTP headers from the API response. |
{
"component": "tavily.basicNewsSearch",
"query": "SmythOS",
"days": "7"
}
Extract
Scrapes and extracts the clean, primary content from a given list of URLs.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
urls | array | Yes | An array of URL strings to extract content from. |
Outputs
Field | Type | Description |
---|---|---|
results | array | An array of objects, each containing the extracted content and metadata for a successful URL. |
failed_results | array | An array of URLs that failed to be extracted. |
Response | object | The full, raw JSON response from the Tavily API. |
Headers | object | The HTTP headers from the API response. |
{
"component": "tavily.extract",
"urls": [
"[https://example.com/article-1](https://example.com/article-1)",
"[https://anotherexample.com/blog-post-2](https://anotherexample.com/blog-post-2)"
]
}
Best Practices & Advanced Tips
- Secure Your API Key: Always store your Tavily API key in the SmythOS
Vault
. - Combine Search and Extract: For the most powerful research workflows, chain the components. Use a Search component to discover relevant sources, then pass the output URLs to the Extract component to get the full content for deeper analysis.
- Use Domain Filters: The
include_domains
andexclude_domains
parameters are powerful tools for refining your search. Use them to focus on authoritative sources or to filter out known low-quality sites. - Leverage for RAG: Tavily is purpose-built for Retrieval-Augmented Generation. Use the clean content from its search or extract results as the context (
Retrieval
) for your LLM prompts to get more accurate and factualGenerated
answers.
Troubleshooting Common Issues
-
Error:
401 Unauthorized
- Cause: The API Key is incorrect, missing, or invalid.
- Solution: Verify that the API Key in your SmythOS Vault is correct and matches the one in your Tavily dashboard.
-
Error:
402 Payment Required
- Cause: You have exhausted your API credits for the month.
- Solution: Check your usage and credit balance in your Tavily dashboard.
-
Empty
Results
Array- Cause: The search query genuinely returned no results, or the filters (e.g.,
include_domains
,time_range
) were too restrictive. - Solution: Broaden your query or remove filters to test the connection. Try a very common search term to ensure the component is working correctly.
- Cause: The search query genuinely returned no results, or the filters (e.g.,
-
URL in
failed_results
for Extract Component- Cause: The website may have strong anti-scraping measures that even Tavily could not bypass, or the URL might be invalid or lead to a page with no main content.
- Solution: This is expected for some sites. Build logic in your agent to handle failed extractions gracefully, such as by logging the failed URL or trying an alternative source.
What's Next?
You are now ready to build powerful research and data extraction agents with the SmythOS Tavily Integration!
Consider these ideas:
-
Build an Agent That...
- Acts as a "Daily Briefing" generator. It uses the Advanced News Search to find the top 5 articles about your industry from the last 24 hours, uses Extract to get their content, and then uses an LLM to write a summary of each for a morning email.
- Performs automated competitor analysis. It takes a list of competitor domains, uses Basic General Search with
include_domains
to find recent mentions, and logs the results to a Google Sheet. - Powers a fact-checking chatbot. When a user asks a question, the agent uses Tavily to find several high-quality sources, extracts their content, and uses an LLM to synthesize an answer with citations.
-
Explore Other Integrations:
- Combine Tavily with the OpenRouter or Perplexity AI integrations to create state-of-the-art RAG pipelines.
- Send the results of your Tavily searches directly to a Google Sheet for logging and analysis.
- Use the
Extract
component to get clean article text and then pass it to the PlayHT or Elevenlabs integrations to create an audio version.