Web Search
Search the web and return top results with titles, URLs, and snippets — essential for giving AI agents real-time access to information beyond their training data.
Use Web Search when you need to:
- Look up current events, documentation, or product information in a workflow
- Give an AI Agent live web access via the Tools handle
- Verify facts or gather context before responding to a user
- Enrich workflow data with external search results
Supports two providers:
- Tavily (recommended) — purpose-built for AI agents with optional advanced search depth
- SerpAPI — Google search results via SerpAPI
| Handle | Type | Description |
|---|---|---|
input | any | Upstream data for {{ input.field }} template references in settings fields. |
| Handle | Type | Description |
|---|---|---|
result | object | Search result envelope |
The result (accessed as {{ web_search.* }}) shape:
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the search succeeded |
results | array | Search results, each with title, url, and snippet |
query | string | The query that was searched |
error | string | Error message if success is false |
{
"success": true,
"query": "Tensorify workflow automation",
"results": [
{
"title": "Tensorify — Visual Backend Builder",
"url": "https://tensorify.io",
"snippet": "Build REST APIs and automations visually..."
}
],
"error": null
}
Access results downstream:
{{ web_search.results[0].title }}
{{ web_search.results[0].url }}
{{ web_search.results[0].snippet }}
| Setting | Type | Default | Description |
|---|---|---|---|
provider | enum | tavily | Search provider: tavily (recommended) or serpapi. Excluded from the agent tool schema — configure once on the node. |
| Setting | Type | Default | Description |
|---|---|---|---|
query | string | — | Search query. Supports {{ }} bindings. Required. |
| Setting | Type | Default | Description |
|---|---|---|---|
max_results | number | 5 | Maximum number of results to return. Supports {{ }} bindings. |
search_depth | enum | basic | Tavily search depth: basic (fast) or advanced (more comprehensive). showWhen: provider = tavily. Ignored for SerpAPI. |
Sign up for a search provider and add your API key on the Env Vars page:
| Variable | Description |
|---|---|
SEARCH_API_KEY | Tavily API key (tvly-...) or SerpAPI key. Set Provider on the node to match your key. |
Agent workflow with live web access:
- Add a Web Search node.
- Set Provider to
tavily. - Set Query to
{{ input.question }}. - Set Max Results to
5. - Set Search Depth to
advanced. - Connect the node to an AI Agent Tools handle.
The agent supplies query and optionally max_results as tool arguments. The provider is configured on the node and is not exposed to the agent.
Standalone search in a workflow:
Manual Trigger → Web Search → Transform
- Provider:
tavily - Query:
latest Tensorify release notes - Max Results:
3
Access the top result:
{{ web_search.results[0].url }}
import manual from @tensorify/manual-trigger:1.0.0
import search from @tensorify/web-search:1.0.0
node trigger @tensorify/manual-trigger:1.0.0 {}
node lookup @tensorify/web-search:1.0.0 {
provider = "tavily"
query = "Tensorify workflow automation"
max_results = 5
search_depth = "basic"
}
trigger.payload -> lookup.input
Web Search has an On Error control output branch. Enable it via the "Error output handle" toggle at the bottom of the settings panel.
The error branch fires when:
SEARCH_API_KEYis missing or invalid- The search provider returns an API error (rate limit, invalid query, etc.)
- A network error occurs during the search request
Connect the error branch to a fallback response or logging action. You can also check {{ web_search.success }} and {{ web_search.error }} on the main output path.
- Provider must match your API key: A Tavily key will not work with SerpAPI and vice versa. Set Provider to match the key you configured.
- Provider is node-level, not agent-level: When connected to an AI Agent, the agent cannot change the provider — configure it on the node before connecting.
- Search depth is Tavily-only:
search_depthis ignored when Provider is set toserpapi. - Missing
SEARCH_API_KEY: The node fails at runtime if the env var is not set. - Rate limits: Both Tavily and SerpAPI enforce API rate limits. Handle errors gracefully in production workflows.
- AI Agent — connect Web Search as a live information tool
- HTTP Request — call search APIs directly with custom logic
- Transform — shape search results for downstream nodes
- Environment Variables — store your
SEARCH_API_KEY
