In short. Perplexity's Search API supplies ranked source results, while its Agent API generates answers and can use a web-search tool with source references.
Definition: As of October 2026, Perplexity's Search API returns ranked web results as structured data for an application to process. Its Agent API generates model responses and supports a web-search tool that retrieves sources during answer generation.
Key facts
- Perplexity's Search API quickstart directs developers to Search for raw results and to Agent for a model-generated answer with citations.
- The Agent API quickstart documents the endpoint
POST https://api.perplexity.ai/v1/agentand access to models from multiple providers. - The Agent Web Search guide says the model decides when to call the enabled search tool, based on the prompt and instructions.
What does the Search API return?
The Search quickstart shows requests to https://api.perplexity.ai/search. Its response examples contain a results array with page titles, URLs and snippets, plus publication and update date fields. A snippet is extracted page text. An application can inspect these results or pass them to a separate answer-generation step.
This request follows the quickstart's regional search example:
curl -X POST 'https://api.perplexity.ai/search' \
-H "Authorization: Bearer $PERPLEXITY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"query": "government policies on renewable energy",
"country": "US",
"max_results": 5
}'
PERPLEXITY_API_KEY holds the API key. The country setting supplies a country code for geographic relevance. The max_results parameter accepts 1 to 20 and defaults to 10.
The same documentation describes search_domain_filter for including or excluding domains and search_language_filter for selecting source languages. max_tokens caps extracted webpage content across results, while max_tokens_per_page caps extraction from each page. These settings control the material returned for downstream processing.
How does the Agent API produce an answer?
The Agent quickstart shows requests with a selected model and an input prompt. Its SDK examples use client.responses.create(...) and read generated text through response.output_text, a convenience property that aggregates text from response outputs.
For web-grounded answers, the Web Search guide enables searching through the following request-body fragment:
{
"tools": [
{
"type": "web_search"
}
]
}
The model decides when to invoke that tool. The guide's example adds an instruction to search for current, source-grounded information before answering. Domain and date restrictions belong inside the tool's filters object. Search context budgets use max_tokens and max_tokens_per_page on the tool configuration.
How should a website's presence be checked?
An audit should record which response contains the website's URL. In the Search quickstart, URLs appear in ranked search results. That observation records retrieval through the Search API.
For Agent, the Web Search guide documents a search_results output item that can precede the final assistant message. Each result has an id used for citation references and a url identifying the source page. An audit can inspect the generated answer alongside that source mapping.
The guide says inline markers depend on the prompt and recommends explicitly requesting bracketed markers, with one source per bracket. It identifies result id and url fields as the authoritative citation mapping. Recording both the answer and its source results preserves the evidence needed to distinguish retrieval from an answer's source reference.
Related terms
- How do I send multiple queries to Perplexity's Search API?
- How do I request extracted page content from Perplexity search?
- How do Perplexity Agent API source identifiers map to cited URLs?
FAQ
Which API should I use for a list of source pages?
Perplexity's Search quickstart directs you to Search when you need raw results for your own processing. Its examples expose page URLs and titles through search.results.
How do I read the Agent's generated text?
The Agent quickstart documents response.output_text in both the Python and TypeScript SDKs. It aggregates the text content from response outputs.
How do I request inline source references?
The Web Search guide recommends asking explicitly for bracketed citation markers. You can map their numbers to the id and url fields in search_results.
Sources
- Perplexity, "Perplexity Search API", undated
- Perplexity, "Agent API", undated
- Perplexity, "Web Search", undated
Check how a page reads to answer engines. Open the GEO score analyzer