Manage context size
Control how much data lands in your LLM’s context window withmax_num_results and response_length:
short- ~6k tokens / result (25k chars)medium- ~12k tokens / result (50k chars)large- ~24k tokens / result (100k chars)
Control cost with max_price
max_price sets a CPM (cost per 1,000 results) ceiling. Raise it when you’re not getting enough results from premium sources:
- $20 CPM - basic web + academic content
- $50 CPM - full web + most research databases + financial data
- $100 CPM - premium sources + specialised datasets
Web search and open academic sources (arXiv, PubMed) are available on every plan, including free signup credits. Premium and proprietary sources - SEC filings, patents, drug discovery, genomics, advanced financials - need a subscription, which also lowers your cost per credit.
Target specific datasets
Useincluded_sources to reach datasets other search APIs can’t. Pass a preset (academic, finance, health, …), dataset ids, or a saved collection:
AI vs human searches
Valyu is optimised for AI agents by default (is_tool_call=true). Set it to false for human-facing UIs to get more readable results.
Multi-step research
For complex tasks, break the work into multiple searches: decompose the question, search each part, fill gaps, then synthesise.Build this only when you need fine-grained control. If you just want a synthesised, cited answer, DeepResearch does all of it for you on top of the same engine - often cheaper and better than rolling your own loop.
Example: hand-rolled research loop
Example: hand-rolled research loop
Next steps
Prompting guide
Write queries that get better results
Source filtering
Include, exclude, and soft-rank sources

