Make your first call
query (no site:, AND, OR, or quotes - Valyu is semantic, not keyword). Read total_deduction_dollars from the response to track spend.
Search types
Drop Search into your agent
Hand this prompt to your coding agent (Cursor, Claude Code, Copilot) to wire up Search end to end.Integrate Valyu Search into your AI agent, with guidance on when to escalate to DeepResearch and which sources need a plan.
Common parameters
The essentials you’ll reach for most. See the full parameter reference below for everything else.Filtering
Sources
Include, exclude, or soft-rank domains and datasets.
Dates
Filter by publication date.
Collections
Save reusable source bundles.
All parameters
SDK arguments use camelCase in TypeScript (maxNumResults) and snake_case in Python (max_num_results).
Full parameter reference
Full parameter reference
string
required
Natural-language search query. Use semantic phrasing, not operators (no
site:, AND, OR, or quotes).integer
default:"5"
Number of results to return. 1-20 by default; up to 100 with the
increased_max_results permission on your API key.string
default:"all"
all (web + proprietary), web, proprietary, or news.number
default:"0.5"
Minimum relevance score (0-1). Results below the threshold are dropped. Raise it for precision, lower it for recall.
number
default:"1000"
Maximum price per thousand results (CPM) you are willing to pay. Acts as a cost ceiling. Web search is ~$1.50/1k, proprietary ~$0.50/1k.
string[]
default:"[]"
Restrict the search to these sources. Accepts dataset ids (
valyu/valyu-arxiv), domains/URLs (arxiv.org), presets (academic, finance, patent, …), collections (collection:<name>), or the keyword web.string[]
default:"[]"
Exclude these sources. Same formats as
included_sources. If both are set, included_sources wins.object
default:"{}"
Soft-rank sources without hard filtering. Map each source to an integer from
-5 (strong demotion) to +5 (strong boost); 0 is neutral.string | integer
default:"short"
Content returned per result:
short (~25k chars), medium (~50k), large (~100k), max (full content), or an exact integer character count.string
Natural-language category hint to steer ranking (e.g.
"machine learning"). Max 500 characters.string
Free-text instructions that guide how results are selected and ranked. Max 500 characters.
string
Include content published on or after this date. Format
YYYY-MM-DD.string
Include content published on or before this date. Format
YYYY-MM-DD.string
ISO 3166-1 alpha-2 country code to bias results toward a region (e.g.
"GB", "US"). Use ALL for no preference.boolean
default:"true"
true optimises results for LLM consumption (the default for agents); false optimises for human reading.boolean
default:"false"
Lower-latency responses with shorter content. Cannot be combined with
search_type="proprietary".boolean
default:"false"
Return URLs and metadata without extracting full content. Only valid with
search_type="web" or "news".boolean
default:"false"
Allow results to be served from the historical cache where available.
Fast mode (lower latency)
Fast mode (lower latency)
Returns quicker responses with shorter content. Good for general queries. Cannot be combined with
search_type="proprietary".Returning up to 100 results
Returning up to 100 results
The default maximum is 20 results per query. To return up to 100, request the
increased_max_results permission:- Go to API Key Management
- Request the
increased_max_resultspermission - Create a new API key after approval
Python
Error handling
Error handling
Python
Response format
Top-level fields
Top-level fields
Result fields
Result fields
Source types
Source types
Next steps
Prompting guide
Write queries that get better results
Tips & tricks
Optimise performance and control costs
API reference
Complete parameter documentation
Data sources
Every source you can target

