Search API vs Agent API





✦ Perplexity API comparison

Perplexity Search API vs Agent API: What’s the Difference?

Compare Perplexity Search API and Agent API by output, workflow, tools, billing and development control—then choose the API that fits your application.

Compare the APIsChoose your API

Quick answer: Use the Search API when your application needs ranked web results as structured JSON and your code will handle what happens next. Use the Agent API when you want a model to generate a response and optionally use configured tools such as web search. Search API returns results, not a synthesized answer. Agent API can produce a grounded answer, but web search is opt-in and must be configured.

These Perplexity APIs solve related but different development problems. This guide explains the Search API vs Agent API distinction, compares their outputs and workflows, and shows when to use either one—or combine them. For setup instructions, see our guides to what the Perplexity API is and how to use Perplexity API.

Perplexity Search API vs Agent API: Quick Comparison

Area Search API Agent API
Main purpose Retrieve ranked web results for your application Generate model responses and run configured tool workflows
Endpoint POST https://api.perplexity.ai/search POST https://api.perplexity.ai/v1/agent
Typical output Structured JSON with result titles, URLs, relevant extracted text and dates Model-generated response and response items, with citations when search is configured
Generated answer No Yes, from the selected model
Web search The API’s core function Opt-in: configure web search with a supported tool or effort setting
Control You decide how to filter, rank, display or pass results onward You configure the model, instructions, tools and reasoning controls
Billing approach Per successful Search API request; no token charge Model-token charges plus applicable tool-call costs
Good fit Custom search, retrieval pipelines, research dashboards AI assistants, research workflows, model-and-tool applications

Pick Search API when…

You need to retrieve and present source material, and want your own application to control processing and user experience.

Pick Agent API when…

You want a model to interpret a request, use configured tools and return a natural-language response.

Consider both when…

Your product needs a dedicated retrieval step plus a separate model workflow or specialized control over each stage.

What Is Perplexity Search API?

The Perplexity Search API retrieves ranked web results and returns them as JSON so your application can work with the data. A result can include a title, URL, relevant extracted page text and date information. The API does not generate a complete AI answer; your code decides how to use the retrieved results.

The documented endpoint is POST https://api.perplexity.ai/search. You can request a number of results and use supported filters such as domain, language and date. Check the live API reference for current fields, limits and response schema.

Typical Search API workflow

1. Send a search query

Your application sends a request to the Search API with the query and any supported options.

2. Receive structured results

The response provides ranked result data for your application to process.

3. Build your own experience

Filter results, show source cards, store metadata, or pass selected material into a model or another part of your pipeline.

Key distinction: Search API returns the search material. It does not automatically write the final summary, recommendation or chat response for your users.

Search API use cases

  • Building a custom search interface that displays ranked web results.
  • Creating retrieval-augmented generation (RAG) pipelines that pass sources to your own model.
  • Running news, topic or website research dashboards.
  • Applying custom rules for filtering, ranking, storage and presentation.
  • Collecting web results for a workflow where your application controls the next step.

What Is Perplexity Agent API?

The Agent API is a unified interface for building model-powered applications. It supports models from multiple providers, tool configuration, reasoning controls and token budgets. Depending on your request, the model can generate a response and use configured tools in the same workflow.

The documented endpoint is POST https://api.perplexity.ai/v1/agent. Perplexity also accepts POST /v1/responses as an OpenAI SDK compatibility alias. Check the official documentation for the current request schema and supported models.

Agent API workflow

1. Provide the task

Send an instruction or question and choose a supported model or preset as appropriate.

2. Configure tools when needed

Set up the tools the workflow should use. Web search is opt-in: a basic model-and-input request does not automatically search the web or return citations.

3. Receive the generated response

The model returns response content and relevant output items. If web search was configured and used, inspect the returned source information and citations.

Agent API capabilities and use cases

The Agent API is suited to applications that need model-generated answers or a model working with configured tools. Available tools and controls depend on current documentation and request settings.

  • AI assistants that respond in natural language.
  • Web-grounded research responses when the web search tool or supported effort setting is enabled.
  • Workflows that select models or configure reasoning effort.
  • Applications that combine model reasoning with supported tools such as URL fetching or code execution, where available.
  • Multi-step tasks where the model should use tool output to formulate its response.

Important: Do not assume that every Agent API request searches the web. Explicitly configure the web search tool or a supported effort setting when you need current web research and source citations.

Can You Use Search API and Agent API Together?

Yes. The APIs can serve separate stages of an application. Search API can retrieve structured results for your code to inspect; Agent API can generate a response using a configured model-and-tool workflow. Whether you need both depends on how much control your application requires.

Illustrative integration pattern. You can also use either API independently.

For example, an app could retrieve web results, apply its own source filters, and pass selected context into a model for a summary. Avoid assuming that every Agent API tool needs a separate Search API call; the Agent API can perform web search when configured, while a standalone Search API call gives your code direct control over the retrieval stage.

How Search API and Agent API Pricing Differ

The billing models differ. Perplexity’s current documentation describes Search API billing per successful request, without token charges. Agent API billing includes model-token usage and applicable tool calls. For Agent API requests using web search, the search tool cost is separate from model-token charges; other tools can have their own fees.

Actual cost depends on request volume, model choice, tokens, enabled tools and current rates. We keep detailed rates in a separate page so this comparison can focus on choosing the right API: see Perplexity Search API pricing.

Budgeting tip: Estimate the whole workflow, not only the API request. Include successful search requests, model input and output tokens, any tool invocations, retries, and your own infrastructure costs. Check the API Console and current official rate card before launch.

Which Perplexity API Should You Choose?

Choose Search API if…

  • You want raw, ranked web results.
  • Your application should own ranking, filtering and display.
  • You already have a model or want to choose one separately.
  • You need a retrieval component for a custom pipeline.

Choose Agent API if…

  • You want an AI-generated answer as the main output.
  • You need a unified interface for supported models and tools.
  • You want to configure model reasoning and tool use.
  • You prefer the model to handle more of the response workflow.

Use both if…

  • You need retrieval controls that Agent API alone does not provide for your workflow.
  • Your app needs custom source selection before generation.
  • You want to compare a retrieval-first pipeline with an agent-led workflow.

There is no universal winner. Choose based on the output your product needs, how much processing control you want, and how you plan to manage costs and source quality.

Security and Implementation Notes

  • Protect API keys: Keep secrets on a trusted server or in a secret manager. Do not expose them in browser-side code, public repositories or client logs.
  • Handle sources carefully: Validate and display source URLs clearly, and build your product so users can inspect relevant references.
  • Plan for failures: Handle invalid requests, rate limits, timeouts and upstream errors. Follow documented retry behavior.
  • Review current schemas: API endpoints, model names, tools and parameters can change. Use the live quickstarts and API reference before shipping.
  • Measure usage: Track request counts, token usage and tool calls so actual billing can be compared with estimates.

Frequently Asked Questions

What is the main difference between Search API and Agent API?

Search API returns ranked web results as structured JSON and does not generate an answer. Agent API uses a model to generate a response and can use configured tools.

Does the Perplexity Search API generate AI answers?

No. It returns ranked result data such as titles, URLs, relevant page text and dates. Your application can process that data or pass it to a model.

Does Agent API automatically search the web?

No. Perplexity documents web search as opt-in. Configure the web search tool or a supported effort setting if you need a web-grounded answer and citations.

Can I use both APIs in one application?

Yes. You can use Search API for direct retrieval and your own code to decide what to send to a model or Agent API. Use both only if the additional control benefits your workflow.

Which API is cheaper?

There is no single answer for every workload. Search API is billed per successful request without token charges; Agent API includes model-token costs and applicable tool calls. Compare your expected volume and configuration using the current rate card.

Which API should I use to build a RAG app?

Search API can provide a retrieval step for a custom RAG pipeline. Agent API may suit an application that needs a model and configured tools to generate a response. The best fit depends on how much retrieval and generation control you need.

These focused guides cover the next steps in the API topic cluster:

PerplexityWeb is an independent educational website and is not affiliated with or endorsed by Perplexity. API capabilities, endpoint behavior, model availability and prices may change. This guide is informational; verify the current documentation before building or budgeting.

Official Perplexity API References

Consult the current developer documentation for endpoint schemas, tool configuration and prices:

Last reviewed: November 24, 2026. Confirm the current docs and API Console before implementation.

Scroll to Top