Web Search Component
Use the Web Search component to perform a targeted web search and get back a structured list of results. This component is the simplest way for your agent to find information on the internet, with advanced options to filter by time, exclude domains, and even generate an AI-powered summary of the findings.
Why this matters
What You’ll Configure
- Configure Search Settings
- Provide a Search Query
- Handle the Results
- Best Practices
- Troubleshooting Tips
- What to Try Next
Step 1: Configure Search Settings
Fine-tune the search parameters to get the most relevant results for your task.
Setting | Description |
---|---|
Sources Limit | The maximum number of search results to return. Default is 5 . |
Search Topic | Choose the category for the search. general provides broad web results, while news focuses on recent articles from news outlets. Default is general . |
Include Questions and Answers | Enable to receive an AI-generated answer to your query based on the content of the top search results. |
Include Image Results | Enable to include a list of query-related images in the response. |
Time Range | Filter results to a specific time range from the current date. Options are day , week , month , or year . |
Include Raw Content | Enable to include the cleaned HTML content of each search result page in the output. This is useful if you want to analyze the page content without a separate scrape. |
Exclude Domains | Provide a comma-separated list of domains to exclude from the search results (e.g., wikipedia.org,pinterest.com ). |
Step 2: Provide a Search Query
The component requires a single input to know what to search for.
Input | Description |
---|---|
SearchQuery | The default input field that holds the text query you want to search for. |
Step 3: Handle the Results
The component provides several outputs to easily access the different parts of the search results.
Output | Description |
---|---|
Output | Contains the entire set of results as a single JSON object, including search results, images, and the AI-generated answer if those options are enabled. |
Results | A convenient output containing just the array of search results (links, titles, snippets). |
Images | If Include Image Results is enabled, this output will contain the list of related images. |
Answer | If Include Questions and Answers is enabled, this output will contain the AI-generated answer string. |
Convenient Outputs
Best Practices
- Use for Initial Research:
Web Search
is excellent for the first step of a research task. Use it to find relevant URLs, then pass those URLs to the Web Scrape Component for deep content extraction. - Enable AI Answers for Quick Summaries: The
Include Questions and Answers
option is a very efficient way to get a direct answer to a query without needing a separate LLM call. - Filter for Relevance: Use
Time Range
andExclude Domains
to narrow your search and improve the quality of your results. For example, when researching a recent event, set the time range today
orweek
. - Handle No Results: Your workflow should be able to handle cases where a search returns no results. Check if the
Results
output is empty and branch your logic accordingly.
Troubleshooting Tips
If your search isn't working as expected...
What to Try Next
- Take the
Results
array and pass it to a ForEach Loop. Inside the loop, use the Web Scrape Component on each URL to extract its full content. - Use the
Answer
output and feed it directly into an API Output Component to create an agent that can answer questions with sourced information. - Use the search results to feed a RAG pipeline. Scrape the content of the top results and use RAG Remember to add the new information to your agent's knowledge base.