<!-- BusyBot node reference — https://busybot.net/tools/claude-search-results/ -->

> Node: Claude Search Results (`claude_search_results`) · Action · v1
> Category: AI · Credentials: Anthropic (`anthropic`)
> Updated: 2026-08-16

# 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

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Anthropic** credentials.
See the [Credentials Guide](https://busybot.net/credentials/anthropic/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Model | `options` | No | `Claude Sonnet` | The 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 Prompt | `string` | No | — | Optional system prompt to guide how Claude uses the search results. Leave empty for default behavior. Supports expressions. |
| User Message | `string` | Yes | — | The 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 Results | `string` | Yes | — | Array 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. |
| Options | `collection` | No | `{}` | Advanced generation and output settings. |
| — Max Tokens | `number` | No | `4096` | Maximum number of tokens to generate in the response. |
| — Temperature | `number` | No | `1` | Sampling temperature (0-1). Lower values produce more focused, deterministic answers. |
| — Response Field Name | `string` | No | `response` | The output field name where the Claude response text will be stored. |
| Include Input | `boolean` | No | `false` | Whether to include the original input item fields in the output alongside the response. |
| Max Concurrency | `number` | No | `10` | Maximum 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.

```json
{
  "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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes 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.