Why Use the Answer API
The Answer API provides responses powered by real-time search that enable:- π€ LLM-Native Responses - Get AI-generated answers instead of raw search results
- π Real-Time Knowledge - Access up-to-date information from web and proprietary sources
- π Structured Outputs - Define JSON schemas for consistent, parseable responses
- π― Source Control - Include or exclude specific domains and datasets
Key Answer API Features
AI-Enhanced Search
Intelligent Processing Combine search results with AI reasoning for
comprehensive answers.
Fast Mode
Optimized Speed Reduced latency with Finance + Web sources prioritization
while maintaining AI quality.
Structured Responses
JSON Schema Support Define structured output formats for consistent,
parseable responses.
Source Filtering
Granular Control Include or exclude specific domains, URLs, and datasets
from search.
Date Filtering
Date Filtering Filter search results by date range.
Getting Started
Basic AI-Powered Query
Ask any question and get an intelligent response powered by real-time search:Fast Mode for Faster Responses
Enable fast mode for reduced latency but shorter results. Best for general purpose queries:Search Type Options
Control which data sources to search:Type | Description | Best For |
---|---|---|
all | Search web and proprietary sources (default) | Comprehensive coverage |
web | Web search only | Current events, general topics |
proprietary | Academic, financial, and premium sources only | Research, technical analysis |
Custom AI Instructions
Guide the AI processing with custom system instructions:Advanced Features
Source Filtering
Control exactly which sources to include or exclude:- Domains: Use
"example.com"
to include/exclude entire domains - Specific Paths: Use
"https://example.com/blog"
for specific sections - Datasets: Use dataset names like
"valyu/valyu-arxiv"
for proprietary sources
Structured Output with JSON Schema
Get responses in a consistent, structured format:Date Range Filtering
Focus on specific time periods:Response Format
Unstructured Response (Default)
Structured Response (JSON Schema)
Key Response Fields
Field | Description |
---|---|
contents | AI-generated response (string or structured object) |
data_type | "unstructured" (text) or "structured" (JSON) |
search_results | Simplified search results metadata used by AI |
search_metadata | Cost breakdown and search transaction details |
ai_usage | Token usage information |
cost | Detailed cost breakdown |
Common Use Cases
Research Assistant
Get comprehensive research summaries with citations:Market Analysis
Extract structured financial insights:Technical Documentation Search
Find specific technical information with focused sources:News and Current Events
Get recent updates with time filtering:Best Practices
Optimise Your Queries
- Be Specific: Use detailed queries for better search results
- Set Appropriate Price Limits: Balance cost with data quality needs
- Use Source Filtering: Focus on authoritative sources for your domain
- Custom System Instructions: Guide AI processing for your specific use case
Structured Output Design
- Keep Schemas Simple: Avoid overly complex nested structures
- Use Required Fields: Mark essential fields as required
- Provide Descriptions: Help AI understand expected content
- Limit Array Sizes: Use
maxItems
to control response length
Cost Management
- Monitor Both Costs: Track search data and AI processing costs separately
- Adjust Price Limits: Use
data_max_price
to control search data costs - Optimise Sources: Exclude irrelevant sources to reduce data costs
- Use Date Filters: Limit search scope to recent content when appropriate
Error Handling
Try the Answer API
Explore the complete API reference with interactive examples and detailed
parameter documentation.