Reference · Tools

Claude Search Results

Inject search result context into Claude conversations for grounded answers.

Action AI v1

Claude Search Results answers a question using documents you supply, injecting each search result into the Anthropic Messages API as a document content block with its title, URL and snippet. That grounds the answer in your sources rather than the model's training data. Use it as the final step of a retrieval pipeline — search a knowledge base or the web upstream, then have Claude write the answer from what came back.

Node type
Action
Parameters
7
Outputs
Output, Error
Credentials
Anthropic

Claude Search Results

Inject search result context into Claude conversations for grounded answers.

Overview

Claude Search Results sends a user query along with search result documents to Anthropic’s Claude Messages API (POST /v1/messages). Search results are injected as document content blocks so Claude can ground its answers in the provided sources. Each search result becomes a document block with title, URL context, and snippet text. The response text and source count are returned in configurable output fields. Supports model selection, system prompt, temperature, and max tokens configuration.

Category: AI
Tool Name: claude_search_results
Version: 1

Appearance: Icon: anthropic | Color: #d4a574

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Anthropic credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
ModeloptionsNoClaude SonnetThe Claude model to use for generating grounded answers. Always uses the latest version (auto-updated).
Options: Claude Opus (most capable — complex synthesis and multi-source reasoning), Claude Sonnet (balanced — strong quality at lower cost and latency), Claude Haiku (fastest — simple lookups and high-volume queries). Each option tracks the current release of its tier, so the underlying model ID updates without any change to your node.
System PromptstringNoOptional system prompt to guide how Claude uses the search results. Leave empty for default behavior. Supports expressions.
User MessagestringYesThe user query or question to answer using the search results. Falls back to item.json.query or item.json.question if empty. Supports expressions like {{ $json.query }}.
Search ResultsstringYesArray of search results to inject as context. Each result should have title, url, and snippet fields. Accepts JSON string or expression resolving to array. Falls back to item.json.searchResults or item.json.results.
OptionscollectionNo{}Advanced generation and output settings.
— Max TokensnumberNo4096Maximum number of tokens to generate in the response.
— TemperaturenumberNo1Sampling temperature (0-1). Lower values produce more focused, deterministic answers.
— Response Field NamestringNoresponseThe output field name where the Claude response text will be stored.
Include InputbooleanNofalseWhether to include the original input item fields in the output alongside the response.
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

One API call per input item, and one output item per input item. The grounded answer lands on the field named by Response Field Name (response by default). Binary data on the input item is forwarded unchanged, and with Include Input on the original item fields are merged in alongside the result.

{
  "response": "The answer, grounded in the supplied sources",
  "sourcesUsed": 4,
  "model": "claude-...",
  "usage": { "input_tokens": 2140, "output_tokens": 318 },
  "stopReason": "end_turn"
}
  • sourcesUsed is the number of search results that were parsed out of Search Results and sent to the model as document blocks — check it when an answer looks ungrounded, because a malformed array yields 0.
  • model is the model that actually answered, as reported by Anthropic.
  • usage is the token accounting Anthropic returned for the call.
  • stopReason says why generation stopped — for example end_turn (finished naturally) or max_tokens (hit the Max Tokens cap).

Reference the result downstream by expression, e.g. {{ $json.response }}.

Usage Examples

  • Answer a question using web search results as context
  • Synthesize information from multiple search snippets into a summary
  • Generate a grounded response with citations from search results
  • Use RAG-style retrieval results to answer user queries via Claude
  • Combine search API output with Claude for fact-based answers

Example Configuration

Minimal — a question plus one inline result:

{
  "type": "claude_search_results",
  "parameters": {
    "userMessage": "What is retrieval-augmented generation?",
    "searchResults": "[{\"title\":\"RAG Overview\",\"url\":\"https://example.com/rag\",\"snippet\":\"Retrieval-Augmented Generation combines a retrieval system with a generative model to produce grounded answers.\"}]"
  }
}

A retrieval pipeline, taking both the query and the results from upstream items:

{
  "type": "claude_search_results",
  "parameters": {
    "userMessage": "{{ $json.userQuery }}",
    "searchResults": "{{ $json.results }}",
    "includeInput": true,
    "options": {
      "responseFieldName": "groundedResponse"
    }
  }
}

Strict source-only answering, to keep the model from filling gaps from memory:

{
  "type": "claude_search_results",
  "parameters": {
    "systemPrompt": "Answer using ONLY the provided search results. If the answer cannot be found in the results, respond with exactly: 'INSUFFICIENT_CONTEXT'.",
    "userMessage": "{{ $json.question }}",
    "searchResults": "{{ $json.searchResults }}",
    "options": {
      "maxTokens": 1024,
      "temperature": 0,
      "responseFieldName": "verifiedAnswer"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Claude Search Results sends a user query with retrieved search documents to the Anthropic Messages API, injecting each result as a document block containing title, URL, and snippet text. Use it when Claude must answer questions grounded in current or domain-specific sources rather than relying solely on training data. The tool outputs a configurable response text field with the grounded answer and a source count field indicating how many documents were referenced.

Frequently asked questions

How is this different from just prompting Claude with the text?

Each search result is sent as a structured document block carrying its title and URL, not pasted into the prompt. Claude treats them as sources to ground on, and the node returns a source count alongside the answer so you can see how many documents were referenced.

What does the node output?

The response text and the number of sources referenced, both written to output fields you can name. Failures route to the Error output rather than stopping the workflow when error handling is set to continue using the error output.

Which credential does it need?

An Anthropic credential. The node calls the Messages API directly, so the key must have access to whichever Claude model you select in the node.

Can I control the model and how it answers?

Yes — model, system prompt, temperature and max tokens are all configurable on the node, so you can pin a cheaper model for high-volume grounding and a stronger one for final answers.

Build with the Claude Search Results node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Anthropic credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.