Basic Usage
Parameters
Query (Required)
Parameter | Type | Description |
---|---|---|
query | string | The search query string |
Options (Optional)
Parameter | Type | Description | Default |
---|---|---|---|
searchType | "web" | "proprietary" | "all" | Type of search to perform. "web" for web search, "proprietary" for Valyu datasets, "all" for both | "all" |
maxNumResults | number | Maximum number of results to return (1-20) | 10 |
maxPrice | number | Maximum cost in dollars per thousand retrievals (CPM) | 30.0 |
isToolCall | boolean | Set to true when called by AI agents/tools, false for direct user queries | true |
relevanceThreshold | number | Minimum relevance score for results (0.0-1.0) | 0.5 |
includedSources | string[] | List of specific sources to search within (URLs, domains, or dataset names) | undefined |
excludeSources | string[] | List of sources to exclude from search results | undefined |
category | string | Natural language category to guide search context | undefined |
startDate | string | Start date for time filtering (YYYY-MM-DD format) | undefined |
endDate | string | End date for time filtering (YYYY-MM-DD format) | undefined |
countryCode | string | 2-letter ISO country code to bias search results | undefined |
responseLength | string | number | Content length per result: "short" (25k), "medium" (50k), "large" (100k), "max" (full), or custom character count | "short" |
fastMode | boolean | Enable fast mode for reduced latency but shorter results | false |
Response Format
Parameter Examples
Fast Mode
Enable fast mode for quicker results:Search Type Configuration
Control which data sources to search:Source Filtering
Control which specific sources to include or exclude:Geographic and Date Filtering
Bias results by location and time range:Response Length Control
Customize content length per result:Use Case Examples
Academic Research Assistant
Build a comprehensive research tool that searches across academic databases:Financial Market Intelligence
Create a financial analysis tool that searches market data and news:Real-time News Monitoring
Build a news monitoring system that tracks specific topics across multiple sources:Error Handling
The Search API includes comprehensive error handling and validation:Source Types
Web Sources
- General websites and domains
- News sites and blogs
- Forums and community sites
- Documentation sites
Proprietary Sources
valyu/valyu-arxiv
- Academic papers from arXivvalyu/valyu-pubmed
- Medical and life science literaturevalyu/valyu-stocks-US
- US stock market data- And many more. Check out the Valyu Platform Datasets for more information.