Short answer. Perplexity's Search API is a single endpoint (POST https://api.perplexity.ai/search) that returns ranked web results, with title, url, snippet, date and last_updated, and no generated text. It costs 5.00 dollars per thousand successful requests (1.00 with search_type: "fast") and a request with up to five queries is billed as one. It is the right choice when you already have a model and want to control which sources enter the prompt, how you display them and how many you keep. Its main limit: it hands you pages, not verified facts.
Verified on 30 October 2026
Parameters, limits and prices come from the "Search quickstart", "Pricing" and "Rate limits" pages of the documentation. The text of the Search page I could read does not document search_recency_filter or date filters for this endpoint (it documents them for the Agent API web_search tool, article 2): if you need them, check the API reference before relying on them.
The request, parameter by parameter
| Parameter | Type | What it does (documentation) |
|---|---|---|
query | string or array | With an array, up to five related queries, each processed independently |
max_results | integer | 1 to 20, default 10 |
max_tokens | integer | Cap on page content across all results, maximum 1,000,000 |
max_tokens_per_page | integer | Per-page cap |
country | string | ISO 3166-1 alpha-2 code (IT, DE, ...) |
search_domain_filter | array | Up to 20 domains or paths; no prefix is an allowlist, - a denylist; the two modes cannot be combined |
search_language_filter | array | ISO 639-1 codes, up to 20 |
search_type | string | "fast" for lower latency and cost; requires Python SDK 0.43.6+ or TypeScript 0.38.6+ |
The response holds results and id. Each result has title, url, snippet (may be empty), date (YYYY-MM-DD format or null) and last_updated. Two practical consequences: your code must handle an empty snippet and a null date, and the date is not a guarantee of freshness: it is a datum the page or the engine exposes, when it exposes one.
A RAG pipeline with verifiable sources
The pattern is three steps: search, filter, ask your model to answer citing only the identifiers you gave it. The step almost everyone skips is the fourth: checking in code that the citations exist.
import re
from perplexity import Perplexity
client = Perplexity()
def search(question: str, domains: list[str] | None = None):
kwargs = {
"query": [question],
"max_results": 8,
"max_tokens_per_page": 1500,
"country": "US",
"search_language_filter": ["en"],
}
if domains:
kwargs["search_domain_filter"] = domains
res = client.search.create(**kwargs).results
seen, clean = set(), []
for r in res:
if r.url in seen or not (r.snippet or "").strip():
continue
seen.add(r.url)
clean.append(r)
return clean
def context(results):
return "\n\n".join(
f"[{i}] {r.title} ({r.date or 'date n/a'})\n{r.url}\n{r.snippet}"
for i, r in enumerate(results, start=1)
)
def answer(question: str, llm_complete):
results = search(question)
if not results:
return "No usable source found.", []
prompt = (
"Answer only with what is written in the sources. "
"Cite with [n]. If the sources are not enough, say so.\n\n"
f"SOURCES:\n{context(results)}\n\nQUESTION: {question}"
)
text = llm_complete(prompt) # YOUR model
cited = {int(n) for n in re.findall(r"\[(\d+)\]", text)}
if not cited or not cited.issubset(range(1, len(results) + 1)):
return "Answer discarded: citations missing or nonexistent.", results
return text, [results[n - 1] for n in sorted(cited)]
The final check does not prove the source says that, only that it is not made up. For the second half you need a sample read by a person or a second verification pass: neither is free, which is why you should decide in advance where a mistake is costly (contracts, regulations, health) and keep a human reading there.
Five queries in one request: the real arithmetic
An array of queries is convenient because it is billed as one request. But rate limits count every query: per the limits page, POST /search allows 50 units per second with a burst of 50, for all tiers, and a five-query request consumes five units. The economic advantage is there; the one on the limit is not. Under heavy load, 429s arrive sooner than the invoice suggests (article 6).
Real use cases, with the arithmetic done
Hypothetical scenarios: people, hours and volumes are declared assumptions; prices are the documented ones.
Daily life: the thesis and the blog that looks like a source
Who: Sara, preparing her degree thesis and needing to collect sources on a subject. What she did: open dozens of tabs and copy title, date and address into a sheet by hand. What changes: a script with the search() function above, with search_domain_filter on the universities, agencies and journals her supervisor accepts, and CSV output with title, URL, date and snippet. A hundred searches a month cost half a dollar (0.10 in fast mode). What goes wrong: the script finds pages, it does not evaluate them: a well-ranked blog can appear next to a scientific article, and a null or recent date does not say whether the text is original or derived. The CSV is a list of candidates: reading and choosing remains Sara's job, and it is exactly what her supervisor will ask her to have done.
Small business, construction: the six-person firm and tenders
Who: a construction firm with six staff and an owner who also follows tenders (assumption). What it did by hand: scan the local contracting authorities' portals every morning: assume forty minutes a day. What changes: one daily request with five queries (one per category of work the firm does) restricted to the portals' domains, with fast search: 30 requests a month, 0.03 dollars. The output is an email with title, URL and snippet. What goes wrong, and it is costly: a deadline misread in a snippet or a notice that is not indexed loses a bid. So the email is only a bell: the deadline is read on the official document, and the portal stays the source to check anyway at fixed intervals, because the absence of a result does not prove the absence of a tender.
Large enterprise, logistics: sixty corridors to watch
Who: the control room of a logistics operator with sixty corridors (ports, border crossings, routes) to keep an eye on (assumption). What it did by hand: two people for an hour a day searching for strikes, closures, bad weather and customs slowdowns. What changes: a daily job with one request per corridor, each with five queries (strike, closure, weather, delays, customs): 60 requests a day, 1,800 a month, that is 9.00 dollars a month with standard search (1.80 in fast). Rate-limit units are 300 a day: no problem. What goes wrong: false negatives (the news the engine has not indexed yet) and missing dates. A rerouting decision that costs money is not based on a snippet: the system produces a list of flags with links, an operator confirms them on the official source of the port authority or operator, and for each flag acted on you record what was shown and to whom, useful at audit. Official sources with their own feed should still be queried directly: generic search is a complement, not the primary channel.
When the Search API is not the answer
- Internal data. Company documents, tickets, price lists: they are not on the web. Here you need your own index (embeddings plus a vector store).
- Contractual data guarantees. The privacy documentation I read names Zero Data Retention only for the Agent API; it says nothing explicit about the Search API. If you have contractual commitments, ask in writing (article 1).
- A ready answer without building anything. If you have neither a model nor a pipeline, the Agent API goes further with less code, accepting a variable cost.
← Article 2: the Agent API Article 4: from Sonar to the Agent API →
Frequently asked questions
How much does the Perplexity Search API cost?
5.00 dollars per thousand successful requests, 1.00 with search_type fast. A request with up to five queries counts as one billing unit, but each query counts toward the rate limit.
What rate limit does the Search API have?
50 units per second with a burst of 50, the same for all usage tiers. One query is one unit: a five-query request consumes five.
Does the Search API generate an answer?
No. It returns results with title, URL, snippet and dates. Your own model builds the answer; that is why you can control the sources and check in code that citations exist.
Can I restrict the search to certain sites?
Yes, with search_domain_filter: up to 20 domains or paths, as an allowlist or a denylist (dash prefix), but not both in the same request.
Sources and further reading
- Perplexity, Search API quickstart (read on 30 October 2026)
- Perplexity, Pricing (30 October 2026)
- Perplexity, Rate limits & usage tiers (30 October 2026)
- Perplexity, Privacy & Security (30 October 2026)
Commenti
Caricamento commenti...
Sign in to comment