A technical overview of the Perplexity Search API, which returns real-time, snippet-level web results for grounding LLMs and powering agents and RAG pipelines. Contrasts the raw-data Search API with the conversational Sonar API, describes its snippet-first output and freshness model, and notes the open-source search_evals framework for benchmarking search backends. Frames the API as infrastructure for retrieval rather than a finished-answer service.
What it is
The Perplexity Search API exposes the search infrastructure behind Perplexity’s public answer engine as a developer endpoint. It returns raw, ranked web results in real time, intended for grounding LLMs, powering agents, and feeding retrieval-augmented generation (RAG) pipelines. Perplexity describes the underlying index as spanning hundreds of billions of webpages.
The distinction that matters: this API returns source material, not a finished answer. You decide how to use it.
What sets it apart
- Snippet-level results. Instead of full documents, the API returns pre-ranked snippets — cutting much of the chunking and preprocessing a RAG pipeline would otherwise do.
- Freshness. The index is designed to update continuously, which reduces the risk of grounding a model on stale pages.
- Structured parsing. An internal parsing layer cleans unstructured web content into structured results before returning them.
- AI-oriented throughput. The infrastructure is tuned for high-volume, latency-sensitive AI workloads.
Search API vs. Sonar API
Perplexity ships two APIs for two jobs:
- Search API — returns raw, ranked results and snippets. Use it when you need to ground your own model, build a custom agent, or supply a RAG pipeline. It gives you the sources, not the conclusion.
- Sonar API — returns a synthesized, conversational answer, close to the experience on the Perplexity site. Use it when you want a ready-to-display response with no assembly on your side.
Reach for the Search API when you own the reasoning layer; reach for Sonar when you want the answer produced for you.
Benchmarking with search_evals
Perplexity has open-sourced search_evals, an evaluation framework for comparing search backends across single-step queries and multi-step agentic research. It lets you measure retrieval quality against alternatives on your own tasks rather than relying on vendor claims — which is the right way to evaluate any search backend before committing a pipeline to it.
Developer tooling
- Console for API-key management and monitoring.
- Documentation with guides and API references.
- Search SDK for faster prototyping and integration.
Where it fits
For agentic systems, fresh and accurate retrieval is a hard dependency. A snippet-level search API that returns clean, current, raw web data serves as the retrieval layer beneath agents and RAG pipelines — filling the gap left as several general-purpose search APIs have closed or been retired. Evaluate it the same way you would any dependency: benchmark it on your own workload, on the metrics that matter to your product.
- Perplexity Search API
- Sonar API
- Retrieval-Augmented Generation (RAG)
- Agentic AI
- Search Indexing
- Web Snippets


More Guides
Run disciplined SEO A/B tests in seven steps — one metric, two variations, randomized segments, run to significance, track, analyze the winner, and iterate.
Build a topic cluster in seven steps — select and score a pillar, validate it, map subtopics, align to intent, architect internal links, publish, and measure.
Prepare your site for AI search in five steps — content architecture, entity consistency, E-E-A-T, structured data, and machine-readable structure.
Get your content cited by AI in seven steps — answer capsules, link-free extraction, original data, digital PR, community presence, consistent messaging, and tracking.
A seven-step walkthrough for setting up Google Search Console on a new site — property type, DNS verification, sitemap, GA4 link, users, URL checks, and a monitoring routine.