1
Create an API key
Create an account at platform.valyu.ai and copy a key from your dashboard. Store it in your server’s environment as Keep the key on your server. Do not include it in browser code or commit it to your repository. You get 2,000 free credits a month with a work email, no card required (1,000 with a personal email; add a card after your first month to keep them coming). See pricing for plans and rates.
VALYU_API_KEY.2
Install an SDK
3
Search the web
Save the Python example as
search.py and run python3 search.py. For TypeScript, add the example to your server application. You can run cURL directly in your terminal.4
Inspect the response
A successful response includes a
results array. Inspect the returned titles, URLs and content before passing them to your model or application. The result set changes as available information changes; requesting five results does not guarantee five matches.For the full response contract, open the Search API reference. An empty result set is different from a failed request; handle both in your application.
Search a specialist source
The web is one source among many. Setsearch_type to all to let Valyu pick across the web and specialist sources, or name the source yourself with included_sources. This searches PubMed:
valyu/valyu-sec-filings, valyu/valyu-clinical-trials, valyu/valyu-patents, valyu/valyu-arxiv and more. Presets such as "finance" or "academic" select a group. See data sources for the list, and source filters for every option. Some licensed sources need access first.
If the request fails
Keep the
tx_id from each response for debugging, and see API status for incidents. The API reference lists every error.
Build the next part
Tune retrieval
Control sources, result length and search cost.
Run a research task
Submit a brief and retrieve a cited report.
Extract known URLs
Read selected pages with the Contents API.
Get a quick cited answer
DeepResearch
instant mode answers a focused question in under 30 seconds.