Perplexity Sonar

The Citead team, updated

In short. Perplexity Sonar returns web-grounded answers with source fields, while Perplexity directs new and existing integrations to the Agent API.

Definition: As of 17 October 2026, Perplexity Sonar is Perplexity's legacy application programming interface (API) for answers grounded in web search. Its response format combines answer text with source URLs and search-result metadata.

Key facts

  • Perplexity's Sonar documentation describes an interface compatible with the OpenAI Chat Completions format.
  • The API reference defines citations as source URLs used to generate the response and search_results as results used for context.
  • Perplexity's migration overview states that Sonar Chat Completions support ended on 27 September 2026. Synchronous and streaming requests continue through conversion into Agent API requests, introduced gradually by model.
  • The migration procedure describes Sonar's default inline citations as numbered markers such as [n].

How does a Sonar request work?

Perplexity's Sonar guide describes web-grounded chat completions: a model produces an answer using web search as supporting context. A request supplies a model and a messages array containing the conversation. The returned answer text is accessible at choices[0].message.content.

The following request body matches the Sonar example in the migration overview:

{
  "model": "sonar",
  "messages": [
    {"role": "user", "content": "What are the latest developments in AI agents?"}
  ]
}

The same documentation sends this JSON to https://api.perplexity.ai/v1/sonar with a bearer API key and an application/json content type. It recommends the Agent API for new projects.

What do the citation fields contain?

The Sonar response schema permits null for both citations and search_results. Otherwise, citations contains URL strings and search_results contains result objects.

Each result requires title and url. Other fields include date for publication, last_updated for updates, and snippet for a text extract. The source field distinguishes web from attachment. Both dates can be null.

For a website review, preserving both arrays alongside the answer keeps the source URLs and context excerpts available for inspection.

What changes in the Agent API?

Perplexity's migration overview replaces the Sonar request's messages with input and the response's choices with a typed output array. Answer text appears in a message item; sources appear in a search_results item. Asynchronous Sonar requests are no longer supported, and the documentation directs those integrations to background mode.

The migration procedure explains the replacement citation mapping. With the fast preset, numbered markers are embedded in the answer text. The sources sit in the results array of a search_results output item, and a marker [n] corresponds to a result whose id equals n. A parser therefore needs to read the result IDs when connecting answer statements to URLs.

FAQ

Can I check whether my website appears in a Sonar response?

You can inspect the URLs in citations and search_results, which the API reference exposes separately.

Can I restrict the search to selected domains?

The migration procedure shows Sonar's search_domain_filter at the request's top level. In the Agent API, you place that filter inside the web_search tool's filters object.

Sources

  1. Perplexity, "Sonar API", undated
  2. Perplexity, "Create Chat Completion", undated
  3. Perplexity, "Migrate from Sonar to the Agent API", undated
  4. Perplexity, "How to migrate from Sonar", undated

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark