Perplexity citations API

Perplexity Scraper API: Perplexity Answers and Citations as JSON

Searlo's Perplexity scraper API asks perplexity.ai your prompt as a logged-out visitor and returns the answer, its numbered citations, the cited domains and the thread link as JSON, for 2 credits per answer. It captures the consumer answer people see, which is a different product from Perplexity's own Sonar developer API.

GET/api/v1/search/web?q=postgres+connection+pooling&num=3
200 OK0.17s1 credit85,000 results
{  "searchTime": 0.17,  "totalResults": 85000,  "page": 1,  "organic": [    {      "position": 1,      "title": "31.10. Connection Pools and Data Sources",      "link": "www.postgresql.org/docs/…",      "domain": "postgresql.org",      "snippet": "For an environment without an application se…"    },    { "position": 2, "domain": "medium.com", … },    { "position": 3, "domain": "stackoverflow.blog", … }  ],  "credits": 1}

How do I get Perplexity's answers and citations through an API?

For the answer perplexity.ai shows people, send the prompt to GET /search/ai/perplexity: Searlo asks perplexity.ai as a logged-out visitor and returns the answer, numbered citations and cited domains as JSON for 2 credits, or $0.60 per 1,000 answers at $0.30 per 1,000 credits. To build Perplexity's models into your own product instead, Perplexity sells its Sonar API.

They are separate products. Sonar answers your application from Perplexity's API models; this endpoint records what perplexity.ai itself told a visitor, which is the answer AI visibility work measures.

Endpoint
GET https://api.searlo.tech/api/v1/search/ai/perplexity?q=…&gl=us&hl=en
Price
2 credits per answer: $0.60 per 1,000 at $0.30 per 1,000 credits, $0.40 on the Enterprise pack— our pricing
Returned
answer, answerMarkdown with [n] citation markers, citations, sources, related questions, model, threadUrl
Latency and caching
Typically 10-30 s live; the same request within 1 hour is served from cache unless cache=false
Perplexity Sonar API, for comparison
Sonar: $5, $8 or $12 per 1,000 requests by search context size, plus $1 per 1M input and $1 per 1M output tokens— docs.perplexity.ai
Citation overlap with Google
28.6% of URLs Perplexity cited ranked in Google's top 10 for the same query, against 12% on average for ChatGPT, Gemini and Copilot (15,000 queries, August 2025)— Ahrefs

Third-party figures on this page last verified against the sources linked above. Prices change; if you find one of these stale, tell us and we will correct it.

What the Perplexity scraper API returns

Perplexity writes its answers around numbered sources, and people use it for the research questions (which product, which provider, which tool) where a brand wants to be named. For AI visibility, the useful facts are which pages those numbers point to and whether your brand appears in the text.

GET /search/ai/perplexity scrapes Perplexity for you: it asks perplexity.ai as a logged-out visitor and returns the answer as plain text; the same answer as markdown with its [1], [2] markers in place; each citation with its index, URL, title and domain; sources, the unique cited domains for share of voice; related, the follow-up questions Perplexity suggests; model, the model label Perplexity reports; and threadUrl, the answer's thread on perplexity.ai.

Citation indexes start at 1 and match the markers in answerMarkdown, so you can see which sentence each source supports, not only that it was cited. Perplexity also lines up with Google more than the other engines do: in Ahrefs' study of 15,000 queries (August 2025, checked 2026-09-29), 28.6% of the URLs Perplexity cited ranked in Google's top 10 for the same query, against an average of 12% for ChatGPT, Gemini and Copilot.

Searlo is independent and is not affiliated with, endorsed by or sponsored by Perplexity. Perplexity is a trademark of its owner.

This API or Perplexity's Sonar API?

Both return an answer with citations, but they answer different questions. Sonar figures are from Perplexity's pricing documentation (docs.perplexity.ai/docs/getting-started/pricing), checked 2026-09-29.

Capability comparison between Searlo and Perplexity Sonar API
CapabilitySearloPerplexity Sonar API
What you getThe answer perplexity.ai shows a logged-out visitor, as JSONAn answer a Sonar model generates for your application
What it tells youWhat Perplexity says to people who askWhat a Sonar model says to your code
Price2 credits per answer: $0.60 per 1,000 at $0.30 per 1,000 creditsSonar: $5, $8 or $12 per 1,000 requests (low, medium or high search context) plus $1 per 1M input and output tokens. Sonar Pro: $6 to $14 per 1,000 requests plus $3 per 1M input and $15 per 1M output tokens
Built forAEO and GEO tracking, brand monitoring, citation researchPutting Perplexity-powered answers inside your own product
Relationship to PerplexityIndependent, not affiliatedPerplexity's own developer product
Perplexity Sonar API figures last verified against their published pricing. Prices change; if one is stale, tell us.

Ask Perplexity in one request

Pass the prompt as q, with gl and hl for country and language. A live answer typically takes 10 to 30 seconds, so give your HTTP client a generous timeout.

curl "https://api.searlo.tech/api/v1/search/ai/perplexity?q=how+much+does+a+heat+pump+cost+to+install&gl=us&hl=en" \
  -H "x-api-key: YOUR_API_KEY"

# A fresh, independent sample (billed like any live call): add cache=false
curl "https://api.searlo.tech/api/v1/search/ai/perplexity?q=how+much+does+a+heat+pump+cost+to+install&gl=us&hl=en&cache=false" \
  -H "x-api-key: YOUR_API_KEY"
import requests

resp = requests.get(
    "https://api.searlo.tech/api/v1/search/ai/perplexity",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"q": "how much does a heat pump cost to install", "gl": "us", "hl": "en"},
    timeout=180,  # a live answer typically takes 10-30 seconds
)
resp.raise_for_status()
data = resp.json()

print(data["answerMarkdown"][:300])  # keeps the [1] [2] markers
by_index = {c["index"]: c for c in data["citations"]}
print("[1] ->", by_index.get(1, {}).get("url"))
print("cited domains:", data["sources"])
print("thread:", data["threadUrl"], "| follow-ups:", data["related"])
const params = new URLSearchParams({
  q: "how much does a heat pump cost to install",
  gl: "us",
  hl: "en",
});

const resp = await fetch(
  `https://api.searlo.tech/api/v1/search/ai/perplexity?${params}`,
  {
    headers: { "x-api-key": "YOUR_API_KEY" },
    signal: AbortSignal.timeout(180_000), // live answers typically take 10-30 s
  },
);
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();

for (const c of data.citations) console.log(`[${c.index}]`, c.domain, c.url);
console.log("thread:", data.threadUrl, "| follow-ups:", data.related);

Example response (illustrative)

Real keys, illustrative values, shortened. answerMarkdown keeps Perplexity's [n] markers, answer is the same text without them, and each citation's index matches its marker.

{
  "success": true,
  "searchParameters": {
    "q": "how much does a heat pump cost to install",
    "type": "ai",
    "engine": "perplexity",
    "mode": "concise",
    "gl": "us",
    "hl": "en"
  },
  "answer": "Installed cost depends mainly on the type of heat pump, the size of the home and whether new ductwork is needed. Ductless mini-splits are usually priced per indoor unit, while ducted systems are quoted as a whole-house job…",
  "answerMarkdown": "Installed cost depends mainly on the type of heat pump, the size of the home and whether new ductwork is needed [1][2]. Ductless mini-splits are usually priced per indoor unit, while ducted systems are quoted as a whole-house job [3]…",
  "citations": [
    { "index": 1, "url": "https://www.energysage.com/…", "title": "How much does a heat pump cost?", "domain": "energysage.com" },
    { "index": 2, "url": "https://www.energy.gov/…", "title": "Heat Pump Systems", "domain": "energy.gov" },
    { "index": 3, "url": "https://www.reddit.com/r/heatpumps/…", "title": "Quotes for a ducted system?", "domain": "reddit.com" }
  ],
  "sources": ["energysage.com", "energy.gov", "reddit.com"],
  "related": [
    "Are heat pumps worth it in cold climates?",
    "What rebates are available for heat pumps?"
  ],
  "model": "turbo",
  "threadUrl": "https://www.perplexity.ai/search/how-much-does-a-heat-pump-cost-1a2b3c",
  "complete": true,
  "fetchedAt": "2026-09-29T07:58:21.940Z",
  "source": "searlo.tech(perplexity)",
  "cached": false
}

Response fields

Keys in a successful GET /search/ai/perplexity response
KeyTypeWhat it holds
answerstringThe answer as plain text, citation markers removed
answerMarkdownstringThe same answer as markdown, with [1], [2] markers where Perplexity placed them
citationsarrayEach source as { index, url, title, domain }; index matches the markers
sourcesarrayThe unique cited domains, www. removed: the list to count for share of voice
relatedarrayThe follow-up questions Perplexity suggests
modelstringThe model label Perplexity reports for the answer
threadUrlstring or nullThe answer's thread on perplexity.ai, when one is created
completebooleanfalse if the capture ended before the answer finished; incomplete answers are never cached
cachedbooleantrue when the answer came from the 1-hour cache
searchParameters, fetchedAt, sourceobject, string, stringYour request echoed back, when the answer was captured, and the engine tag

Request parameters

Query parameters for GET /search/ai/perplexity; send your key in the x-api-key header
ParameterRequiredDefaultWhat it does
qYesnoneThe prompt, up to 500 characters
glNousCountry to ask from; the request goes out through an exit in that country when one is available
hlNoenLanguage to ask in
cacheNotruefalse forces a fresh run, billed like any live call; otherwise the same request within 1 hour gets the stored answer

Why a Perplexity answer costs 2 credits

A Google web search on Searlo is 1 credit and a Perplexity answer is 2. The extra credit pays for how the answer is made: live, on perplexity.ai, in Perplexity's own consumer interface, read off the page once Perplexity has finished writing. That is the point, because it is the answer Perplexity's users get.

Each engine is priced on its own, because each costs a different amount to run live. Perplexity is the least expensive of the four Searlo covers: Gemini is 4 credits, and ChatGPT and Copilot are 8.

Credits are charged per successful call, live or cached. Refused or failed calls (HTTP 429 or 503, success: false) are refunded automatically. Packs are one-time purchases with no subscription; new users' credits are valid for 90 days.

What Perplexity answers cost on each pack

2 credits per answer. Pack price ÷ credits × 2, rounded to the cent
PackPricePerplexity answersPer 1,000 answers
Micro$3.992,500$1.60
Starter$9.9910,000$1.00
Builder$29.9937,500$0.80
Scale$74.99125,000$0.60
Pro$199.99450,000$0.44
Enterprise$7992,000,000$0.40

Latency, caching and non-determinism

Perplexity's answers are non-deterministic: run the same prompt twice and the wording, the sources and their order can change. A source at [1] in one run can sit at [4] in the next, or drop out. Sample each prompt several times and report rates and average positions, not a single answer.

  • A live answer typically takes 10 to 30 seconds, sometimes longer. Run tracking jobs in the background; the samples allow 180 seconds.
  • The same request (prompt, gl and hl) within 1 hour returns the stored answer with cached: true. Pass cache=false for every sample you want independent.
  • Send repeat samples one after another. Identical requests in flight at the same moment can be merged into one run: both are billed and both get the same answer.
  • complete is false when the capture stopped before the answer finished. Treat those answers as partial; they are never cached.
  • At capacity the API returns 429 with a Retry-After header. Wait that long and retry; the refused call costs nothing.
  • Country targeting is best-effort: the request goes out through an exit in the gl country when one is available.

Compare Perplexity with the other engines

Pair it with Google data

What teams track in Perplexity

  • Share of voice in Perplexity's citations for your category prompts
  • Which sentence of an answer cites you, using the [n] markers
  • Which publishers and review sites Perplexity cites in your market
  • Expanding a prompt set with the follow-up questions Perplexity suggests
  • Client reporting for AEO and GEO agencies, per prompt and per week

FAQ

Perplexity scraper API: FAQ

Is this the Perplexity API?

No. Perplexity's own developer API is Sonar, which answers your application from Perplexity's API models. Searlo is independent and not affiliated with Perplexity; this endpoint captures the answer the consumer perplexity.ai page gives a logged-out visitor.

How much does the Perplexity scraper API cost?

2 credits per answer: $0.60 per 1,000 answers at $0.30 per 1,000 credits (the Scale pack), $0.40 on the Enterprise pack and $1.60 on the smallest. The 3,000 free credits cover 1,500 answers, and packs are one-time purchases with no subscription.

Should I use Sonar or this endpoint?

Use Sonar to put Perplexity-powered answers inside your own product. Use this endpoint to measure what perplexity.ai tells people, for brand tracking, share of voice or citation research. They are separate products, and nothing guarantees they give the same answer to the same question.

Are Perplexity's citations returned in order?

Yes. citations carries each source with a 1-based index that matches the [n] markers in answerMarkdown, plus its URL, title and domain. answer is the same text with the markers removed, and sources lists the unique cited domains.

What is threadUrl?

The link to the answer's thread on perplexity.ai, when Perplexity creates one. Store it with the answer as a pointer to the original.

Why does the same prompt give different sources?

Each uncached call puts the question to perplexity.ai again, and the answer is non-deterministic, so the sources and their order vary between runs. Sample each prompt several times with cache=false and report how often, and how high, a domain is cited.

What rate limits apply?

Perplexity calls share your account's search rate limit, the same on every plan: 300 req/s, 10,000/min and 900,000/day. The tighter limit in practice is Perplexity capacity. When it is full the API returns 429 with a Retry-After header, and the refused call is not charged.

Start tracking Perplexity answers

3,000 free credits and no card: enough for 1,500 Perplexity answers.