How do I send multiple queries to Perplexity's Search API?

The Citead team, updated

In short. Send up to five strings in the query array, process search.results, and budget rate-limit usage for each query in the request.

Definition: As of 17 October 2026, Perplexity's Search API accepts up to five search strings in the query array of one request. It processes each query independently and returns structured web results for application-side handling.

Key facts

  • Perplexity's quickstart counts a successful multi-query request as one billing unit, while each query consumes a rate-limit unit.
  • The Search API reference describes a ranked results array containing page titles, URLs and snippets, with optional publication and update dates.
  • Perplexity's Best Practices recommends related sub-queries for multi-query research and documents separate concurrent requests through its asynchronous client.

How is a multi-query request constructed?

The query field accepts either a single string or an array of strings. Perplexity's quickstart shows the array form in Python, TypeScript and cURL, using the same search endpoint: https://api.perplexity.ai/search.

The Python package is installed and its authentication environment variable is set as follows:

pip install perplexityai
export PERPLEXITY_API_KEY="your_api_key_here"

This adapted version of the documented Python example sends two of the quickstart's search strings in one request and prints the returned page titles and URLs:

from perplexity import Perplexity

client = Perplexity()

search = client.search.create(
    query=[
        "machine learning breakthroughs recent",
        "AI applications in healthcare"
    ],
    max_results=5
)

for result in search.results:
    print(f"{result.title}: {result.url}")

The SDK reads PERPLEXITY_API_KEY automatically. For ordinary web search, the same documentation gives max_results a range of 1 to 20 and a default of 10. The documentation does not specify whether this limit applies per query or across the combined multi-query response.

How are the returned results handled?

The API reference defines the response as an object with required results and id fields. Each page result requires title, url and snippet; date and last_updated can be absent or null. A parser therefore reads the page records from results and handles missing dates explicitly.

The quickstart's multi-query example loops directly over search.results. The reference defines snippet as content extracted from the page, and describes the Search API as returning structured search results. An application can retain those URLs alongside snippets when passing retrieved material to an answer engine.

For larger content payloads, the quickstart provides max_tokens, a total webpage-content budget across results, and max_tokens_per_page, a content limit for each page. These settings control extracted content volume separately from the result-count setting.

When are separate requests useful?

Perplexity's Best Practices shows AsyncPerplexity with asyncio.gather to run individual searches concurrently. Its example iterates over the returned search responses, labels each by query position, and then loops through that response's page results.

That pattern is useful when an application needs a separate result collection for each original query. The application retains the input query beside its corresponding response. For a related topic explored through one multi-query request, the documented pattern instead reads the returned search.results collection directly.

FAQ

Can I send more than five queries at once?

The quickstart sets the multi-query limit at five. For a longer list, you can divide the queries into requests within that limit.

Does a five-query request count as five billed searches?

The same quickstart says a successful request containing five queries counts as one Search API billing unit and five rate-limit units.

Sources

  1. Perplexity, "Perplexity Search API", undated
  2. Perplexity, "Search the Web", undated
  3. Perplexity, "Best Practices", 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