In short. Preserve the complete assistant content from a Claude search response because the API decrypts encrypted_content to restore search results on later turns.
Definition:
encrypted_contentis an encrypted field in a Claude web search result. Anthropic requires the assistant content blocks from a search response to be sent back unchanged on a later turn, including each result'sencrypted_content, so the API can restore those search results in Claude's context.
Key facts
- Anthropic's Web search tool documentation lists
url,title,page_age, andencrypted_contentin a web search result. - The Server tools guide says that a paused turn can end with a server tool call whose tool has not run yet, so the same tools must be included in the continuation request.
- Anthropic's Tool use with Claude guide says server tools such as
web_searchrun on Anthropic's infrastructure and return results directly to the application.
What is preserved in a search response?
The search result is part of the assistant message content. Anthropic's example includes the result URL, title, encrypted value, and page age in one web_search_result block:
{
"type": "web_search_result",
"url": "https://en.wikipedia.org/wiki/Claude_Shannon",
"title": "Claude Shannon - Wikipedia",
"encrypted_content": "EqgfCioIARgBIiQ3YTAwMjY1Mi1mZjM5LTQ1NGUtODgxNC1kNjNjNTk1ZWI3Y..."
}
The same documentation says to send the assistant's content blocks back exactly as received, including every result's encrypted_content. A client therefore preserves the returned content array as message history instead of reconstructing a shorter result from the visible URL, title, or answer text.
Why does the API validate the value?
Anthropic states that the API decrypts encrypted_content on later turns to restore the search results in Claude's context. The field therefore carries state needed by the continuation request. When the field is missing or modified, the request fails with a 400 validation error.
Web search citations have related continuation state. The documentation says citations are always enabled, and each web_search_result_location contains an encrypted_index that must be passed back for multi-turn conversations. It also documents cited_text as up to 150 characters of cited content.
How should a client continue a search turn?
For a completed search response, the next request keeps the original user message and appends the complete assistant content. The search result blocks remain in their received form. The server-tools guide describes the same pattern for a long-running server-tool turn: when the API returns stop_reason: "pause_turn", the paused assistant message is sent back as-is.
The continuation also keeps the same tools array. Anthropic documents a validation error when a paused response ends with a server tool that has not run and that tool is absent from the next request. A continued turn can pause again, so the client checks stop_reason after each response and continues until a different stop reason appears.
How is this different from a client tool result?
For a server tool called directly, the API executes the tool internally and places its result in the response. The server-tools guide says the result block follows the server_tool_use block in the same assistant turn and is paired by tool_use_id; a client does not send a tool_result for that completed server call.
When Claude calls a server tool and a client tool in the same parallel group, the server call can appear without its result and the response uses stop_reason: "tool_use". The client sends the client tool's tool_result blocks in the next request, while the API runs the deferred server tool. The search result content still remains part of the assistant exchange that is carried forward.
Related terms
- Claude web search
- How can a paused Claude API search turn be continued?
- What happens when Claude exceeds the configured search limit?
- Can a Claude search tool failure arrive in a successful HTTP response?
FAQ
Can you decode encrypted_content before sending it back?
Anthropic's documentation assigns decryption to the API and documents no client-side decoding step. The client preserves the returned value and sends it back in the assistant content blocks.
Can you rebuild the assistant message from the visible answer?
No. Anthropic requires the assistant content blocks to be sent back exactly as received, including each result's encrypted_content. Rebuilding the message can remove the state that the API validates.
What can you do when a search turn returns pause_turn?
Send the paused assistant content back unchanged, keep the same tools, and inspect the next stop_reason. The server-tools guide says a continued turn can pause again.
Sources
- Anthropic, "Web search tool", undated
- Anthropic, "Server tools", undated
- Anthropic, "Tool use with Claude", undated
Check how a page reads to answer engines. Open the GEO score analyzer