Perplexity scraper API
Perplexity's answer with its sources, citations, the places on its map and its pictures.
Price
$1.50 per 1,000 requests at Starter, down to $1.00 at Max, deducted from your prepaid USD balance.
Endpoint
POST /v1/monitor/perplexity
Countries
Any country.
Request
curl -X POST "https://api.answerline.dev/v1/monitor/perplexity" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"Which project management tools do agencies use?","country":"US"}'
import { Client } from "@answerline/sdk";
const client = new Client({ apiKey: process.env.API_KEY! });
const answer = await client.monitor.perplexity({
"prompt": "Which project management tools do agencies use?",
"country": "US"
});
import os
from answerline import Client
with Client(os.environ["API_KEY"]) as client:
answer = client.monitor.perplexity(
prompt="Which project management tools do agencies use?",
country="US",
)
What you get back
Field in result | Type | Description |
|---|---|---|
text | string | Text of Perplexity's answer |
markdown | string | Perplexity's answer rendered as Markdown (present when include.markdown is true) |
links | object[] | The links in the answer's text, in the order a reader meets them: one entry per web (http or https) link the answer shows, images and code aside, with the words it shows (text), where it goes (url), its domain and its 1-based position. Sources cited by pills are in citationPills; links to the same page appear in both when the answer does both. Empty when the text links nowhere. |
sources | object[] | Sources the response cites |
citationPills | object[] | Citation pills that appear inline in the Perplexity answer. Every element pairs one pill with one source: a pill backed by N sources (bracketed groups like Perplexity's [1][2][3]) yields N elements with the same citationPillId, each holding that source's own label, url and domain. Grouping by citationPillId rebuilds the pills. Empty when the answer has no pills. |
related_queries | string[] | Suggested searches to follow up with |
search_model_queries | string[] | Search queries the engine ran internally to build the response |
videos | object[] | Videos that appear in the response |
images | object[] | Image found in the response |
places | object[] | The places Perplexity lists on its map for a local or lodging question (restaurants, shops, hotels), in its order. Absent when it shows no map. |
hotels | object[] | Hotels listed when the query shows travel intent |
shopping_cards | object[] | Product cards for shopping with full product details (present when the query shows shopping intent) |
The perplexity.ai answer versus Perplexity’s developer APIs
This endpoint returns the answer a user reads on perplexity.ai, as structured fields. You do not pick a model or parameters.
Perplexity’s developer platform (checked 2026-09-17, docs.perplexity.ai) lists an Agent API that gives web-grounded answers with built-in citations, a Search API that returns ranked web results, a Router API for hosted open-weight models, and an Embeddings API. With those you choose the model and parameters and get the grounding data the API exposes.
The answers served today return text, markdown, links, sources and citationPills, plus places when Perplexity shows a map (restaurants, shops and hotels, with address, phone, rating and review count) and images when it shows pictures. The contract also defines related_queries, search_model_queries, videos, hotels and shopping_cards; a free perplexity.ai answer shows none of them today.
Perplexity cites with chips next to its sentences. The chips are removed from text and markdown; citationPills keeps which sources sit together behind each chip, which is what a reader sees.
An annotated response
The excerpt follows the result schema for POST /v1/monitor/perplexity. Values are illustrative.
{
"success": true,
"result": {
"text": "Agencies tend to pick tools with client billing, such as ExampleBoard and SampleTask...",
// Cited pages in display order.
"sources": [
{
"position": 1,
"url": "https://www.example-reviews.com/agency-project-management",
"label": "Project management tools for agencies",
"description": "A comparison of tools built for client billing..."
},
{
"position": 2,
"url": "https://community.example.org/t/which-pm-tool",
"label": "Which PM tool does your agency use?",
"description": "Thread with 140 replies..."
}
],
// One entry per (chip, source). citationPillId is 1-based; both entries below
// belong to the same visible chip. position points into result.sources.
// Empty when the answer carries no pills.
"citationPills": [
{ "label": "Project management tools for agencies", "citationPillId": 1, "url": "https://www.example-reviews.com/agency-project-management", "domain": "example-reviews.com", "position": 1 },
{ "label": "Which PM tool does your agency use?", "citationPillId": 1, "url": "https://community.example.org/t/which-pm-tool", "domain": "community.example.org", "position": 2 }
]
}
}
Lists with no entries are absent, not empty. related_queries, search_model_queries, videos, hotels and shopping_cards are not returned today; see Perplexity images for images and Perplexity places for places.
result.provenance reads searchMode forced: every answer searches the web (all fields).
Notes for this engine
Answer length
Every request gets the answer perplexity.ai writes with a Quick Search: one search and a short answer, typically 300 to 700 characters. answerDepth is accepted and ignored, so every value returns the same kind of answer at the same price.
Market
Perplexity answers in any country. It accepts a US state, which implies country US, and answers for the whole US; only ChatGPT and Gemini answer from inside a state (states).
Handling the results
Sources and their order change between runs of the same prompt. Put a sample index in each idempotency key so you can report rates with a sample size; AI answer volatility covers how many samples to take.
citationPills is an empty list when there are none. An empty list is an observation, not an error.
A citationPills[].label can be an empty string. Use domain or url for identity.
A brand named in text and a brand cited in sources are different metrics with different causes; keep them apart. See mentions vs citations.
Answers and their sources change between markets, so run prompts in each market you report on instead of extrapolating from one country.
Related: the best Perplexity scrapers compared, every request field, AI visibility tracking, monitoring Perplexity, competitor analysis, Reddit citations in AI answers, brand protection.
Questions
How much does a Perplexity request cost?
A request costs $0.0015 at the Starter tier ($1.00–$1.50 per 1,000 across tiers). Perplexity has no priced add-ons: include.markdown, include.html, include.screenshot, include.rawResponse and include.rawWire add nothing.
Is this the same as Perplexity's own API?
No. This endpoint returns the answer perplexity.ai shows its users, with its sources and citation pills as fields. Perplexity's developer APIs are separate products you call and configure yourself.
What is the difference between sources and citationPills for Perplexity?
sources lists the pages Perplexity gives for the answer, in its citation order. citationPills has one entry per chip and source pair for the inline citations, grouped by a 1-based citationPillId, with position pointing back into sources.
Can I target a US state with Perplexity?
No. Perplexity accepts a US state but answers for the whole US, the same as without it. See /docs/coverage#states.
Are failed Perplexity requests charged?
No. A failed request is charged nothing and its reservation is released; only completed requests are charged.
From the blog
Best Perplexity scraper APIs for 2027: answers and sources
Track brand mentions in Perplexity answers
Perplexity API vs Google Search data: which one to use
Docs
- Quickstart
- API reference
- Engine features
- Async tasks and batches
- Webhooks
- Coverage
- Pricing and failures
- Rate limits