Skip to main content
Add Search and Contents to your LangChain or LangGraph application. Your agent controls when to retrieve information and how to use the returned content and source URLs. Choose Python or TypeScript below. Two tools:
  • ValyuSearchTool - search, with full parameter control
  • ValyuContentsTool - clean content from specific URLs

Installation

Set your API key in the environment. The agent examples also want an LLM provider key.

Content extraction

Clean, structured content from specific URLs, up to 10 per call.

In an agent

The most useful shape: a LangGraph agent that decides for itself when to search.

Search parameters

The Search tool accepts parameters from the Search API.
Use included_sources or excluded_sources in a request, not both. included_sources takes dataset ids, domains, URL prefixes or presets. ValyuContentsTool takes urls, plus summary, extract_effort and response_length as constructor options.
To steer the agent, bind a system message: use search_type="all" for breadth, "web" for current events only, raise relevance_threshold for precision, cite sources, and use natural-language queries rather than operators. See the Prompting Guide.

Additional resources

LangChain Valyu Tool

Official LangChain integration documentation

API Reference

Complete Valyu API documentation

LangGraph Agents

Build advanced agent workflows

Get API Key

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