Skip to content
ajan.io

Docs menu

On this page

Web Search

Search the internet and retrieve relevant information for fact-checking and research.

Overview

The Web Search node searches the internet and returns relevant results. Perfect for fact-checking, gathering current information, market research, or finding specific data that changes frequently.

Configuration

Query: Define the search query (can include variables)

Mode:

  • Automatic: AI generates optimal search query
  • Manual: You specify exact search terms
  • Prompt: Write instructions for AI to generate query

Number of Results: How many results to return (default: 5)

Example Queries

Manual Query

handlebars
{{trigger.output.company_name}} recent news 2024

Automatic Mode

text
Context: {{trigger.output.customer_message}}
Find: Recent information about the product mentioned

Prompt Mode

text
Generate a search query to find the latest pricing information for {{trigger.output.product_name}} from competitor websites.

Output Structure

The Web Search node returns an array of search results. Each result contains:

FieldTypeDescription
titlestringThe title of the search result
urlstringThe URL of the webpage
textstringA text snippet/preview of the page content
typestringAlways "website-preview"

The full response also includes:

  • input: The search query that was executed
  • error: Error message if the search failed (only present on failure)

Accessing Results

Access individual result fields:

handlebars
{{web_search.output[0].title}}
{{web_search.output[0].url}}
{{web_search.output[0].text}}

Loop through all results in an Agent node prompt:

handlebars
Here are the search results:
{{#each web_search.output}}
- **{{this.title}}**: {{this.text}}
  URL: {{this.url}}
{{/each}}

Example Use Cases

Fact Checking

text
Web Search: {{agent.output.structured.claim}}
→ Agent: Verify claim against search results
→ Condition: Is claim accurate?

Company Research

text
Web Search: "{{trigger.output.company_name}}" latest news
→ Agent: Summarize key findings
→ Action: Update CRM with insights

Competitive Analysis

text
Web Search: {{trigger.output.product}} alternatives pricing
→ Agent: Extract pricing information
→ Code: Compare against our pricing

Next Steps