Best Perplexity scraper APIs: answers and sources as JSON
Perplexity builds every answer around numbered sources, and the number a user sees is the source’s rank, which makes citation position easy to measure. To collect those answers as JSON you can use a vendor API that returns the consumer answer, call Perplexity’s own Sonar API, or build your own collector. Sonar measures something different from what visibility teams need. Scraper APIs differ in what they parse (sources, related queries, the searches Perplexity ran, shopping and local blocks), geo control and billing.
Vendor facts come from the vendors’ own pages, linked and checked on 2026-09-17. Re-check prices before you commit.
Comparison
| Option | Other engines | Sources / citations | Related queries and search fan-out | Shopping, places, media | Geo | Pricing model and entry price (checked 2026-09-17) |
|---|---|---|---|---|---|---|
| Bright Data Perplexity Scraper | ChatGPT, Google AI Mode, Gemini, Copilot | Sources, source HTML | Not listed in the headline fields | “Is shopping data” flag | Available countries | Per record: 5K free records/month, $1.50/1K pay as you go, Scale $499/month with 384,000 records |
Oxylabs perplexity source |
ChatGPT, Gemini, Google AI Mode | Cited sources | Related queries | Shopping results, inline products, images | geo_location |
Subscription: free trial up to 2,000 results; Micro $49/month, up to 98,000 results (pricing) |
| SearchApi Perplexity API | ChatGPT, Gemini, Bing Copilot, Google AI Mode, AI Overview | Reference links with snippets | Related questions | Not listed | Location | Per search: 100 free requests; Developer $40/month for 10,000 (pricing) |
| Apify Perplexity Search Scraper | Separate actors for ChatGPT, Gemini, AI Mode | Sources with title, URL, snippet, date | Related questions (optional) | Images (optional) | Recency filter; location not stated | Pay per event: $9.00/1,000 searches; Apify free plan $5/month credit |
| AnswerLine | ChatGPT, Gemini, Copilot, Grok, Google AI Mode, Google Search with AI Overview, Google News | sources[] with position, citationPills[] |
related_queries[], search_model_queries[] |
shopping_cards[], places[], hotels[], videos[], images[] |
country (required), US state |
Credits: 4 per Perplexity task, 6 synchronous; free tier 500 credits/month (pricing) |
| Perplexity Sonar API | Not applicable | citations, search_results |
Not described | Not described | web_search_options.user_location (filters) |
Tokens plus request fee: Sonar $1/1M tokens + $5–$12 per 1K requests |
| Build it yourself | Whatever you build | Whatever you parse | Whatever you parse | Whatever you parse | Your own infrastructure | Engineering time plus infrastructure |
Terms used below:
- Source position: the 1-based order in which Perplexity shows a source, which matches the citation number in the answer text.
- Related queries: the follow-up questions Perplexity suggests under an answer, a first-party list of adjacent prompts to add to a tracking set.
- Search fan-out: the searches the engine ran to build the answer, distinct from the related queries it suggests.
Scraper vs Sonar
Perplexity’s Sonar API lets you pick a model (sonar, sonar-pro, sonar-reasoning-pro, sonar-deep-research) and a search context size, and bills tokens plus a per-request fee. Its search context guide says responses include citations (the URLs that supported the answer) and search results with title, URL, date, snippet and source, delivered in the final chunks when streaming.
Prices checked 2026-09-17:
| Model | Input / output per 1M tokens | Request fee per 1K (low / medium / high context) |
|---|---|---|
| Sonar | $1 / $1 | $5 / $8 / $12 |
| Sonar Pro | $3 / $15 | $6 / $10 / $14 |
| Sonar Reasoning Pro | $2 / $8 | $6 / $10 / $14 |
| Sonar Deep Research | Citation tokens $2/1M, reasoning tokens $3/1M, plus $5 per 1K search queries | No request fee |
Perplexity also lists a Search API at $5 per 1,000 requests, which returns search results without a written answer.
Sonar output differs from the consumer page in three ways:
- You configure the answer. Model, context size and prompt settings are yours, and a consumer user sets none of them, so the output shows how your app would answer.
- The page has more than the answer. The consumer page can show related queries, shopping cards, places, hotels, images and videos; the Sonar pages checked describe none of those.
- Location is a parameter. Sonar’s search filters accept a
user_locationwith country, region, city and coordinates. That localizes retrieval for your call, but the call still has the first two differences.
Use Sonar when you are building a product that needs cited answers, and a scraper when you need to know what Perplexity users see. The provider APIs comparison makes the same distinction for OpenAI and Gemini.
When Sonar is the better tool
- You are shipping a feature. A support bot, research assistant or internal search tool needs cited answers on demand, under your control and terms.
- You need fixed settings for evaluation. When comparing prompt variants or retrieval filters, pinning the model and context size is what you want.
- You need to control retrieval. Sonar’s search filters, including
user_location, shape what is searched.
A team can run both, Sonar inside the product and consumer answers to measure how the brand appears to Perplexity users. Keep the two in separate datasets and never average them into one visibility number.
The options
Bright Data Perplexity Scraper
Bright Data’s Perplexity Scraper page lists output fields including prompt, answer HTML, answer text, answer text markdown, sources, source HTML and an “is shopping data” flag. Its AI scrapers documentation describes Perplexity as returning hyperlinked citations with available countries. Requests run synchronously through /scrape (up to 20 inputs) or asynchronously through /trigger, with delivery to API, webhook or cloud storage.
Pricing (checked 2026-09-17, ChatGPT scraper page and Perplexity page): 5K records a month free, $1.50 per 1K records pay as you go, Scale at $499 a month including 384,000 records, then $1.30 per 1K. Only successfully delivered records are billed.
The unit price is low and bulk jobs deliver to storage. The headline fields do not list related queries or local blocks, so confirm the full schema in its dataset dictionary if you need them, and schemas differ by engine.
Fits data teams running large batch collections into a warehouse.
Oxylabs
The Oxylabs Perplexity target takes source: "perplexity", a prompt, geo_location and parse: true. Per the docs, the parsed response includes the formatted answer, the web sources used, related queries and the UI tabs shown, and product prompts can return shopping results and inline product listings. Jobs use push-pull with an optional callback_url.
Pricing (checked 2026-09-17, pricing): free trial up to 2,000 results; Micro is $49 a month for up to 98,000 results. Per-1K rates vary by target type, and LLM sources are not a separate line on the pricing page, so confirm the rate with Oxylabs.
Related queries and product blocks are parsed, with country routing and one subscription across many scraping targets.
Fits existing Oxylabs customers adding AI engines.
SearchApi
SearchApi’s Perplexity API returns answer markdown with formatted text blocks, reference links with sources and snippets, and related questions, with location-based geo-targeting. New accounts get 100 free requests; Developer is $40 a month for 10,000 searches, down to $1 per 1K at the top tier (pricing).
It is a simple GET API at a flat per-search price, on the same key as its Google engines. The page does not describe shopping, places, hotels or the searches Perplexity ran.
Fits teams already using SearchApi for SERP data that need Perplexity text plus sources.
Apify Perplexity actors
Apify’s own Perplexity Search Scraper returns the answer text, cited sources with titles, URLs, snippets and dates, and optionally related questions and images, with a recency filter (day, week, month, year). It costs $9.00 per 1,000 searches. Community actors exist at other prices, such as Korado Labs’ Perplexity scraper. Apify’s free plan includes $5 of monthly credit.
It starts without code and integrates with Zapier, Make and Sheets. Location control is not stated on the official actor page, and community actors each have their own schema and upkeep.
Fits prototypes and small studies.
AnswerLine
POST /v1/monitor/perplexity takes prompt, country, an optional state for US states, and include flags for markdown, html and rawResponse.
curl -X POST https://api.answerline.dev/v1/monitor/perplexity \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Which accounting software do UK freelancers use?",
"country": "GB",
"include": { "markdown": true }
}'
Under result, per the API reference:
text, andmarkdownwhen requested.sources[]withposition,url,label,description.citationPills[]withcitationPillId,url,domain,position: the inline chips, one entry per pill-and-source pair.related_queries[]: the follow-ups Perplexity suggests.search_model_queries[]: the searches it ran.shopping_cards[](products with price, merchant, offers, rating),places[](name, address, coordinates, rating),hotels[](rating, price level, address),images[]andvideos[], when the page shows them.
A Perplexity task costs 4 credits async and 6 synchronous, with no per-field add-ons. The free tier is 500 credits a month without a card; plan prices are on /pricing. Failed requests are not charged.
Local and travel blocks are parsed alongside sources, which matters for hospitality and local-service brands. The request shape is shared across eight engines, async batches take up to 500 tasks with webhooks and idempotency keys, and US states can be targeted. Pricing is per request in credits, so a very large one-off census costs less on the lowest per-record vendors.
Fits visibility and GEO products that report citation position, local presence or product placement across several assistants.
Building it yourself
Perplexity’s page is dynamic, varies by location and changes layout. A DIY collector needs market-specific collection, a parser for the answer, sources and each rich block, and monitoring for layout changes. The build vs buy post itemizes the work. It makes sense when collection is your core product or you need logged-in states no vendor supports.
Selection criteria
- If the question is “what do users see”, measure the consumer page, not a configured model.
- Require ordered sources. Citation share on Perplexity is positional, and URLs pulled from markdown lose the order.
- Decide whether you need related queries. They expand a prompt set with Perplexity’s own suggestions; see prompt set design.
- Check local and commerce blocks if you work in travel, hospitality, local services or retail, where places, hotels and shopping cards can outweigh the prose.
- Confirm geo control at the granularity you report on.
- Check failure handling and billing: success-only charges, idempotency, webhooks.
- Price your volume, including markets and cadence.
Cost example
150 prompts, two countries, daily for 30 days: 9,000 Perplexity answers a month. List prices checked 2026-09-17, before discounts:
| Option | Billing | Monthly cost for 9,000 answers |
|---|---|---|
| Bright Data, pay as you go | $1.50 per 1K records | $13.50 |
| SearchApi Developer | $40/month for 10,000 searches | $40.00 |
| Oxylabs Micro | $49/month, up to 98,000 results | $49.00 |
| Apify Perplexity Search Scraper | $9.00 per 1K | $81.00 plus any plan fee beyond the $5 free credit |
| Sonar, low context (not the consumer answer) | $5 per 1K requests + $1/1M tokens | $45.00 plus tokens |
| AnswerLine | 4 credits per async task | 36,000 credits; compare with plan allowances on /pricing |
The table omits schema mapping per vendor, a second vendor for engines the first lacks, and analyses you cannot run when a field is missing. AI monitoring cost planning covers budgeting across engines.
A daily Perplexity citation job on AnswerLine
import os, datetime, requests
API = "https://api.answerline.dev"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
today = datetime.date.today().isoformat()
prompts = ["best accounting software for freelancers", "Xero vs QuickBooks for sole traders"]
tasks = [
{
"taskType": "PERPLEXITY",
"payload": {"prompt": p, "country": c},
"idempotencyKey": f"acct-{i}-{c}-{today}",
"webhook": {"url": "https://example.com/hooks/perplexity"},
}
for i, p in enumerate(prompts)
for c in ("GB", "IE")
]
r = requests.post(f"{API}/v1/async/task/batch", json=tasks, headers=HEADERS, timeout=30)
r.raise_for_status()
print(r.json()["summary"])
In the webhook handler, read response.result.sources for a COMPLETED task and record your domain’s position:
from urllib.parse import urlparse
def my_position(result, domain="example.com"):
for s in result.get("sources", []):
host = urlparse(s["url"]).hostname or ""
if host == domain or host.endswith("." + domain):
return s["position"]
return None
Store None as “not cited” instead of dropping the row, so citation rate has a denominator. Verify webhook signatures before processing.
Perplexity metrics
Define metrics before the first run so the stored data can answer them. The field each uses on AnswerLine:
| Metric | Definition | Field |
|---|---|---|
| Citation rate | Share of runs where your domain appears among the sources | sources[].url |
| Average citation position | Mean position of your domain across runs where it is cited |
sources[].position |
| Top-3 citation rate | Share of runs where your domain is source 1, 2 or 3 | sources[].position |
| Mention rate | Share of runs where the answer text names your brand | text |
| Local presence | Share of runs where your business appears in the places or hotels block | places[].name, hotels[].name |
| Product presence | Share of runs where a shopping card lists your product or merchant | shopping_cards[].products[] |
| Competitor citation share | Your citations divided by all citations to a defined competitor set | sources[].url |
To keep them comparable over time:
- Fix the denominator. A failed run is not a run where you were absent. Count completed runs only and log failures separately.
- Normalize domains once. Decide whether
blog.example.comcounts asexample.com, write it down, and apply it to every engine. - Report rates over windows. A seven-day rolling rate smooths run-to-run variation without hiding shifts. The share of voice framework walks through the arithmetic.
Growing the prompt set from related queries
Related queries show which questions sit next to the ones you track:
- Run your seed prompts for a week.
- Collect every
related_queries[]entry and count how often each appears across runs. - Drop queries outside your category and near-duplicates of existing prompts.
- Add the most frequent survivors as new prompts, tagged “suggested” so you can report them separately from the seed set.
- Repeat monthly, retiring prompts that never cite anyone in your competitor set.
This keeps the tracking set close to how people move through the topic on Perplexity rather than how a keyword tool phrases it. The prompt set design post covers sizing and balance.
Pitfalls specific to Perplexity data
- Counting domains without position. Source 1 and source 9 are different outcomes.
- Ignoring the pills. Several sources can sit behind one inline chip;
citationPills[]records the grouping bycitationPillId. - Single snapshots. Sources change between runs, so trend rates over repeated runs. See AI answer volatility.
- Mixing Sonar and scraped data in one metric. They answer different questions; keep them in separate series.
Perplexity’s fields are listed on the Perplexity engine page, and the Perplexity monitoring tutorial walks through a first integration.
Questions
Is Perplexity's Sonar API the same as scraping perplexity.ai?
No. Sonar is a developer API where you choose the model and search context size and pay per token plus a request fee. It returns citations and search results for your call, but its documentation does not describe the consumer page's related queries, shopping cards, places or hotels, and your settings shape the answer.
What does Sonar cost?
Per Perplexity's pricing page checked on 2026-09-17, Sonar costs $1 per million input and output tokens plus a request fee of $5, $8 or $12 per 1,000 requests at low, medium or high search context. Sonar Pro is $3 input and $15 output per million tokens with $6 to $14 per 1,000 requests.
Which Perplexity fields should a scraper return?
At minimum the answer text, the sources in display order, and the related queries. For commerce and local categories you also want shopping cards, places and hotels, and for retrieval analysis the searches Perplexity ran.
How many credits does a Perplexity request use on AnswerLine?
An async Perplexity task costs 4 credits and a synchronous call costs 6. There are no per-field add-ons for Perplexity; markdown, html and rawResponse do not change the price.
Can I target a country or US state for Perplexity answers?
Bright Data, Oxylabs and SearchApi document country or location targeting for their Perplexity scrapers. On AnswerLine, country is required and state accepts a two-letter US state code when country is US.