Skip to main content
Best for: building Valyu into your product / agents. Add real-time search to a Claude app via Valyu’s Anthropic provider.
The AnthropicProvider exposes Valyu search as a tool to Claude, so your agents can pull real-time information from academic papers, news, financial data, and authoritative sources.

Paste into your AI assistant to wire Valyu search into an Anthropic Claude app.

Open in Cursor

Installation

Install the Valyu and Anthropic packages:
Set your API keys as environment variables:

Free Credits

Get your API key with $10 free credits ($20 with a work email) from the Valyu Platform.

Basic Usage

The Anthropic provider handles the integration:

How it works

The AnthropicProvider handles tool registration, execution, and conversation flow for you - no manual function definitions or tool-calling logic. Claude decides when to search; the provider runs the call and feeds results back into the conversation.
Claude chooses these per query based on context:
  • max_num_results - 1-20 for standard keys, up to 100 with a special API key
  • included_sources / excluded_sources - target or exclude datasets
  • category - guide search to a topic
  • start_date / end_date - time-bounded searches
  • relevance_threshold - filter by relevance (0-1)
Steer behaviour with a system prompt. Tell Claude to cite sources and to use natural-language queries, not search operators. See the Prompting Guide.

Additional Resources

Anthropic API Docs

Official Anthropic Claude documentation

Valyu API Reference

Complete Valyu API documentation

Python SDK

Full Python SDK documentation

Get API Key

Sign up for $10 free credits ($20 with a work email)