WebSearch
Controlled node
Overview
The WebSearch node performs web searches and returns results from web pages. It allows you to specify search queries and control the number of results and the amount of content returned from each page.
This node is deprecated. For new workflows, use the Search Google node instead, which provides more comprehensive search capabilities including news, images, videos, and other search types.
Search Configuration
The node provides several options to control the search results:
- Max Pages: Limits the number of search results (web pages) to return. Default is 3 pages.
- Max Tokens: Limits the total number of tokens returned across all results. If empty or not set, defaults to 4 billion tokens (effectively unlimited).
- Object Result: Determines the output format. When enabled, returns an array of objects with structured data. When disabled (default), returns a formatted text string.
- Return Options: Select which fields to include in the results (URL, Title, Text content).
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Fires when the node starts running | - |
| Query | Text | The search query string | - |
| Max Tokens | Number | Maximum number of tokens to return across all results. Empty means unlimited (4B max). | 2000 |
| Max Pages | Number | Maximum number of web pages to return | 3 |
| Object Result | Boolean | If true, returns an array of objects. If false, returns formatted text. | false |
| Return Options | MultiSelect | Select which fields to include: Text, URL, Title | URL only |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the node has finished |
| Pages | Data | Contains the search results as either formatted text or an array of objects depending on the Object Result setting |
Runtime Behavior and Defaults
When the Run event is triggered, the node executes a web search using the provided query. The search results are processed according to the configuration:
- If Object Result is
false(default), the node concatenates the selected fields (URL, Title, Text) into a formatted string with double line breaks between entries. - If Object Result is
true, the node returns an array of objects, each containing the selected fields.
The Return Options setting controls which fields appear in the output:
- URL: The web address of the result
- Title: The page title from the search result
- Text: The text content extracted from the page
If you are feeding the output into an AI node, set Max Tokens to ensure the result fits within the AI model's context window. Leave empty only if you need the full content and are handling token limits downstream.
Example Usage
Basic Web Search
- Connect a Start node or event to the Run input
- Set the Query input to your search term (e.g., "latest AI developments")
- The node will return up to 3 pages (default) with URLs included
Structured Data Output
- Set Object Result to
true - Enable Text, URL, and Title in Return Options
- The Pages output will contain an array of objects like:
[
{
"url": "https://example.com",
"title": "Example Page",
"text": "Page content..."
}
]
Limited Token Results
- Set Max Pages to
5to get more results - Set Max Tokens to
1000to limit the total content size - This ensures you get multiple results but stay within token limits for downstream processing