Skip to the page

Perplexity Search API compatible

Change the address, keep the code.

SpecStream answers Perplexity's POST /search in Perplexity's own JSON, at $0.005 a search of up to 10 results. Every line below was measured on production on November 10, 2026 with the perplexityai Python SDK 0.46.1.

The switch is one line: base_url="https://api.specstream.ai/perplexity" in place of https://api.perplexity.ai, and a SpecStream key as the Bearer token. Your code reads results[].title, url, snippet and date as before.

SpecStream scores 97.9 F-score on all 1,000 SimpleQA Verified questions and 64.0 item F1 on all 200 WideSearch tasks. A page text budget costs nothing extra, and new accounts get $10 of credit.

New accounts get $10 of credit, no card. It covers 2,000 searches.

Perplexity Search API to SpecStream, parameter by parameter and field by field

SpecStreamPerplexity Search API
AddressPOST https://api.specstream.ai/perplexity/searchPOST https://api.perplexity.ai/search
The keyA SpecStream key as Authorization: BearerA Perplexity key as Authorization: Bearer
`max_results`1 to 20 for web search, 10 when you send none, and up to 50 with search_type people. 21 on a web search gets Perplexity's 4221 to 20, default 10
`query`A string, or a list that holds one query. A list of two or more gets a 422 that asks for one query per callA string or an array of strings
Filterssearch_domain_filter (a - before a domain leaves it out), search_recency_filter, search_after_date_filter and search_before_date_filter as MM/DD/YYYY. Another date form gets a 422The same filters, with dates as MM/DD/YYYY
Page textmax_tokens_per_page and max_tokens fill each snippet with the page's text, cut to the budget, at no extra costmax_tokens and max_tokens_per_page leave the price as it is
The replyid, results[] with title, url, snippet and date when the page has one, and server_time with display_server_time. last_updated is always nullresults[] with title, url, snippet, date and last_updated, plus id and server_time
ErrorsPerplexity's 422 body {"detail": [{"loc", "msg", "type"}]}. An empty balance answers 402. A busy call answers 429 with Retry-After and charges nothingInvalid requests, rate limited requests and upstream failures are not billed. An empty balance can return 402
Price per 1,000 searches$5 for up to 10 results, with page text. 20 results cost $0.011 a call$5.00 per 1,000 successful requests, and Fast Search $1.00 per 1,000. A reply with no results is billed
Calls a minuteUp to 8,800 searches a minute on one account50 query units per second, the same on every usage tier
Free to start$10 of credit, no card, which covers 2,000 searchesPrepaid credits, with auto top-up when the balance runs low

The Perplexity Search API reference, on SpecStream

What else Perplexity Search API users price

How SpecStream scores

The same numbers as the benchmarks page, from the official tasks and scorers.

How to migrate, step by step

1. Create a key under Agents & API in the workspace. A new account gets $10 of credit, no card, which covers 2,000 searches.

2. Set the base address to https://api.specstream.ai/perplexity where your code has https://api.perplexity.ai, and send the SpecStream key as the Bearer token. In Python:

import requests

BASE = "https://api.specstream.ai/perplexity"  # was https://api.perplexity.ai

reply = requests.post(
    f"{BASE}/search",
    headers={"Authorization": f"Bearer {SPECSTREAM_KEY}"},
    json={"query": "Who founded Mistral AI and when?", "max_results": 10, "search_recency_filter": "year"},
    timeout=30,
)
reply.raise_for_status()
for result in reply.json()["results"]:
    print(result["title"], result["url"], result["date"])

3. In JavaScript:

const res = await fetch("https://api.specstream.ai/perplexity/search", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SPECSTREAM_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ query: "Who founded Mistral AI and when?", max_results: 10 }),
});
const data = await res.json();
for (const result of data.results) console.log(result.title, result.url, result.snippet);

4. Read 402 as an empty balance and 429 as a call to send again after Retry-After; neither is charged. Send one query per call.

5. When your product needs every match in place of a results page, write the request in plain words. SpecStream reads it back as the conditions every row must meet and the facts to bring back, quotes the most it can cost, and delivers the rows after you approve.

Frequently asked questions

Something we didn't answer? Talk to a human

Is there a Perplexity Search API compatible API?
Yes. SpecStream answers Perplexity's POST /search at https://api.specstream.ai/perplexity in Perplexity's JSON, checked on production on November 10, 2026, for $0.005 a search of up to 10 results.
How do I migrate from the Perplexity Search API?
Change one line: set base_url to https://api.specstream.ai/perplexity (or PERPLEXITY_BASE_URL) and use a SpecStream key. The request body and the code that reads results[] stay as they are.
How much does the Perplexity Search API cost?
Perplexity charges $5.00 per 1,000 successful requests, and Fast Search $1.00 per 1,000, with a reply that has no results billed. SpecStream charges $5 per 1,000 searches of up to 10 results, page text included.
Which apps and SDKs take the SpecStream address for Perplexity Search API?
Open WebUI: choose the web search engine perplexity_search and set Perplexity Search API URL (PERPLEXITY_SEARCH_API_URL) to the whole address, https://api.specstream.ai/perplexity/search, with your SpecStream key in the engine's key field. LiteLLM 1.108.4: set PERPLEXITY_API_BASE to https://api.specstream.ai/perplexity and put your SpecStream key in PERPLEXITYAI_API_KEY. The call stays litellm.search(search_provider="perplexity"). LangChain, langchain-perplexity 1.4.2: PerplexitySearchRetriever has no address argument, so set PERPLEXITY_BASE_URL to https://api.specstream.ai/perplexity in the environment. Perplexity's MCP server: set PERPLEXITY_BASE_URL to https://api.specstream.ai/perplexity, with your SpecStream key where the Perplexity key went.
Does the perplexityai SDK work with SpecStream?
Yes. The perplexityai Python SDK 0.46.1 ran every check in the pass table with base_url="https://api.specstream.ai/perplexity" and a SpecStream key, and client.search.create reads the reply into its own objects.
Which Perplexity fields does SpecStream not fill?
One: last_updated is always null. Each result has title, url and snippet, date when the page has a date, and the reply has id, plus server_time when you send display_server_time.
Can one call carry several queries?
One query per call. A query list of two or more gets a 422 that says so; send each query as its own call, at $0.005 each.
What happens when search is busy?
The route answers 429 with a Retry-After header and charges nothing. One account can send up to 8,800 searches a minute.

Sources

SpecStream wrote this page. Each Perplexity figure comes from Perplexity's own pages, and each other provider's figure from that company's own page. The route's behavior is taken from its code and from the pass table measured on production on November 10, 2026.

  1. Perplexity Search overviewdocs.perplexity.ai/docs/search/overview.md, read Nov 10, 2026
  2. Perplexity Search quickstartdocs.perplexity.ai/docs/search/quickstart.md, read Nov 10, 2026
  3. Perplexity pricingdocs.perplexity.ai/docs/getting-started/pricing.md, read Nov 10, 2026
  4. Perplexity FAQdocs.perplexity.ai/docs/resources/faq.md, read Nov 10, 2026
  5. Perplexity rate limitsdocs.perplexity.ai/docs/admin/rate-limits-usage-tiers.md, read Nov 10, 2026
  6. SpecStream pass table, Perplexity routespecstream.ai/specstream/dialects/perplexity.md, read Nov 10, 2026
  7. Tavily API creditsdocs.tavily.com/documentation/api-credits.md, read Nov 9, 2026
  8. Exa pricingexa.ai/docs/admin/pricing.md, read Nov 9, 2026
  9. Brave Search APIbrave.com/search/api/, read Nov 9, 2026
  10. SpecStream benchmarksspecstream.ai/benchmarks, read Nov 10, 2026
  11. SpecStream pricingspecstream.ai/pricing, read Nov 10, 2026
  12. SpecStream for agentsspecstream.ai/agents.md, read Nov 10, 2026