When to Use DeepResearch
Use DeepResearch when you need:- In-depth analysis - Complex research across multiple sources
- Report generation - Markdown or PDF output with citations
- Structured data extraction - Research results in custom JSON formats
- Background processing - Long-running research without blocking your application
Features
Multi-Source Research
Searches web, academic, and proprietary sources in a single task.
Research Modes
Choose fast for instant answers, standard for quick research, or heavy for complex analysis.
Multiple Outputs
Get results as markdown, PDF, or structured JSON.
File Analysis
Attach PDFs, images, and documents for analysis.
URL Extraction
Include specific URLs to analyze as part of research.
Webhooks
Get notified when research completes.
Quick Start
Create a Research Task
Wait for Completion
Task Statuses
When you create a task, it goes through the following statuses:| Status | Description |
|---|---|
queued | Task is waiting to start due to rate limits or capacity |
running | Task is actively researching |
completed | Research finished successfully |
failed | Research failed (check error field) |
cancelled | Task was cancelled by user |
Queued Tasks
Tasks may be queued when:- Your organization has multiple concurrent tasks running
- System capacity is temporarily limited
The
wait method handles queued tasks automatically. It continues polling until the task completes, fails, or is cancelled.Research Modes
| Mode | Use Case | Typical Completion Time |
|---|---|---|
fast | Quick answers, lightweight research, simple lookups | ~5 minutes |
standard | Balanced research, deeper insights without long wait times | ~10-20 minutes |
heavy | In-depth, long-running research tasks, complex analysis | Up to ~90 minutes |
Output Formats
Markdown (Default)
Markdown + PDF
Structured JSON
Get research results in a custom schema using JSON Schema specification:The schema must be a valid JSON Schema. Use
type, properties, required, items, and other standard JSON Schema keywords.Search Configuration
Search parameters control which data sources are queried, what content is included/excluded, and how results are filtered by date or category. These parameters are specified in thesearch object within the request.
Search Type
Controls which backend search systems are queried:"all"(default): Searches both web and proprietary data sources"web": Searches only web sources (general web search, news, articles)"proprietary": Searches only proprietary data sources (academic papers, finance data, patents, etc.)
Included Sources
Restricts search to only the specified source types. When specified, only these sources will be searched. If the AI agent attempts to use other sources, they will be ignored. Available source types:"web": General web search results (news, articles, websites)"academic": Academic papers and research databases (ArXiv, PubMed, BioRxiv/MedRxiv, Clinical trials, FDA drug labels, WHO health data, NIH grants, Wikipedia)"finance": Financial and economic data (Stock/crypto/FX prices, SEC filings, Company financial statements, Economic indicators, Prediction markets)"patent": Patent and intellectual property data (USPTO patent database, Patent abstracts, claims, descriptions)"transportation": Transit and transportation data (UK National Rail schedules, Maritime vessel tracking)"politics": Government and parliamentary data (UK Parliament members, bills, votes)"legal": Case law and legal data (UK court judgments, Legislation text)
Excluded Sources
Excludes specific source types from search results. Uses the same source type values asincluded_sources. Cannot be used simultaneously with included_sources (use one or the other).
Start Date
Format: ISO date format (YYYY-MM-DD)
Filters search results to only include content published or dated on or after this date. Applied to both publication dates and event dates when available. Works across all source types.
End Date
Format: ISO date format (YYYY-MM-DD)
Filters search results to only include content published or dated on or before this date. Applied to both publication dates and event dates when available. Works across all source types.
Category
Filters results by a specific category. The exact categories available depend on the data source. Category values are source-dependent and may not be applicable to all source types.Country Code
Format: ISO 3166-1 alpha-2 code (e.g.,"US", "GB", "DE")
Filters web search results to prioritize content from a specific country or region. This affects web search results by biasing towards content relevant to the specified location.
Country code filtering primarily affects web search results. Academic and proprietary data sources may not support location-based filtering.
Important Notes
Parameter Enforcement
Request-level parameters are enforced and cannot be overridden by the AI agent during research. This ensures consistent search behavior throughout the research process. Tool-level source specifications are ignored if request-level sources are specified.Date Filtering
Dates are applied to both publication dates and event dates when available. ISO format (YYYY-MM-DD) is required. Date filtering works across all source types. If only start_date is provided, results include all content from that date forward. If only end_date is provided, results include all content up to that date. Both dates can be combined for a specific date range.
File Attachments
Analyze documents as part of research:URL Extraction
Include specific URLs to analyze:Task Management
Check Status
Add Follow-up Instructions
While a task is running, you can add instructions to refine or adjust the scope of the research report to guide the research and report generation process.Submit instructions as early as possible during the research phase. Check task status to know when research has completed.
Cancel a Task
Delete a Task
List All Tasks
Webhooks
Webhooks provide real-time notifications when a DeepResearch task completes or fails, eliminating the need for polling.When to Use Webhooks
| Approach | Best For |
|---|---|
| Webhooks | Event-driven workflows |
| Polling | Simple scripts, real-time progress tracking |
Setting Up Webhooks
When you provide awebhook_url, the server generates a cryptographic secret for signature verification:
Webhook URLs must use HTTPS. HTTP URLs are rejected for security.
Webhook Payload
When the task completes or fails, your endpoint receives a POST request with the full task data:Request Headers
Each webhook request includes headers for verification:| Header | Description |
|---|---|
X-Webhook-Signature | HMAC-SHA256 signature in format sha256=<hex_signature> |
X-Webhook-Timestamp | Unix timestamp (milliseconds) when the request was sent |
Content-Type | application/json |
User-Agent | Valyu-DeepResearch/1.0 |
Verifying Webhook Signatures
Always verify the signature to ensure the webhook is authentic:Retry Behavior
The webhook service automatically retries failed deliveries:| Property | Value |
|---|---|
| Maximum retries | 5 attempts |
| Timeout per request | 15 seconds |
| Backoff strategy | Exponential: 1s → 2s → 4s → 8s → 16s |
| 4xx errors | No retry (client error) |
| 5xx errors | Will retry (server error) |
Return a
2xx status code quickly to acknowledge receipt. Process the webhook payload asynchronously to avoid timeouts.Webhook Events
Webhooks are triggered for:| Event | When |
|---|---|
completed | Research finished successfully |
failed | Research encountered an error |
Webhooks are not sent for
cancelled tasks. If you need to track cancellations, use the status endpoint or list endpoint to check task states.Complete Webhook Flow
Progress Callbacks
Track progress in real-time:Response Structure
Completed Task
Error Handling
Best Practices
Polling Strategy
- Fast mode: Poll every 2-5 seconds, timeout after 10 minutes
- Standard mode: Poll every 5-10 seconds, timeout after 30 minutes
- Heavy mode: Poll every 10-30 seconds, timeout after 120 minutes
- Use webhooks for production to avoid polling overhead
Recommended Timeouts
| Mode | Recommended Timeout |
|---|---|
fast | 10 minutes (600 seconds) |
standard | 30 minutes (1800 seconds) |
heavy | 120 minutes (7200 seconds) |
Cost Optimization
- Use
fastmode for quick lookups and simple questions - Use
standardmode for moderate research needs - Filter sources with
searchconfig to focus on relevant content - Set
start_dateandend_dateto limit scope
Research Quality
- Provide clear, specific research queries
- Use
strategyto guide the research approach - Add
contextto file attachments
Limitations
| Limit | Value |
|---|---|
| Maximum files per request | 10 |
| Maximum URLs per request | 10 |
| Maximum MCP servers | 5 |
| Maximum previous reports for context | 3 |
| Recommended file size | < 10MB per file |

