Skip to main content

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.

Deprecated

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

InputTypeDescriptionDefault
RunEventFires when the node starts running-
QueryTextThe search query string-
Max TokensNumberMaximum number of tokens to return across all results. Empty means unlimited (4B max).2000
Max PagesNumberMaximum number of web pages to return3
Object ResultBooleanIf true, returns an array of objects. If false, returns formatted text.false
Return OptionsMultiSelectSelect which fields to include: Text, URL, TitleURL only

Outputs

OutputTypeDescription
DoneEventFires when the node has finished
PagesDataContains 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
Token Management

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

  1. Connect a Start node or event to the Run input
  2. Set the Query input to your search term (e.g., "latest AI developments")
  3. The node will return up to 3 pages (default) with URLs included

Structured Data Output

  1. Set Object Result to true
  2. Enable Text, URL, and Title in Return Options
  3. The Pages output will contain an array of objects like:
    [
    {
    "url": "https://example.com",
    "title": "Example Page",
    "text": "Page content..."
    }
    ]

Limited Token Results

  1. Set Max Pages to 5 to get more results
  2. Set Max Tokens to 1000 to limit the total content size
  3. This ensures you get multiple results but stay within token limits for downstream processing