medium preset for comprehensive, multi-step research tasks. Deep research performs extended web research, following chains of sources and synthesizing detailed answers. You will learn how to run deep research queries, process results, handle long-running requests, and run batch research workflows.
The
medium preset on the Agent API performs multi-step web research, following chains of sources and synthesizing comprehensive answers. It automatically selects the best model and configures tools for deep research. For more on presets, see the Agent API Presets docs.Prerequisites
Install the Perplexity SDK:Get your Perplexity API Key
Navigate to the API Keys tab in the API Portal and generate a new key.
Basic Deep Research
Use themedium preset for comprehensive research queries.
Processing Deep Research Results
Extract and format the key parts of a deep research response.Deep Research with Domain Filtering
Combine deep research with domain filters for focused, authoritative research.Batch Research with Concurrency
Run multiple deep research queries concurrently using asyncio and the Perplexity SDK.Tips and Best Practices
-
Use the
mediumpreset for the simplest integration. It automatically selects the best model and configures tools. -
Combine with domain filters when you need authoritative sources. Use
search_domain_filterto restrict to specific domains. -
Use
instructionsto guide the depth and focus of research. Be specific about what aspects to cover. - Limit concurrency. Running too many deep research queries simultaneously may trigger rate limits. Use a semaphore to cap concurrent requests to 3-5.
-
Use the async client for batch workflows.
AsyncPerplexityenables concurrent requests without blocking. -
Set
max_output_tokensfor cost control when you need shorter summaries rather than exhaustive reports.
Next Steps
Agent API Presets
Full reference for available presets including medium.
Agent API Quickstart
Get started with the Agent API for multi-provider access and tools.
Domain Filtering
Control which domains the search includes or excludes.
Rate Limits
Understand rate limits for research and batch workflows.