Dedicated ScrapersPerplexity Scraper API
Perplexity logoDedicated Perplexity API

Perplexity Scraper API — Ask Perplexity, Get JSON with Citations

Send a prompt to the real perplexity.ai — not an LLM API — and get the answer back as structured JSON, including every web source it cited and where in the answer that source is used. Anonymous: no Perplexity account, no Perplexity API key.

3Endpoints
10-40sLive answer latency
OffsetsCitations anchored in text
From $3.00Per 1K ask requests

No credit card required · PAYG credits never expire

Ask Perplexity
# Ask the real perplexity.ai and read the sources
import scrapebadger

client = scrapebadger.ScrapeBadger("sb_live_...")

answer = client.perplexity.ask(
    prompt="Best web scraping APIs in 2026?",
    focus="web"
)
200 OK14.6s · 20 credits
{
  "answer": "Several APIs stand out in 2026...",
  "web_search_triggered": true,
  "citation_count": 8,
  "citations": [{
    "url": "https://example.com/scraping-apis",
    "title": "Web Scraping APIs Compared",
    "domain": "example.com",
    "ref_index": 1,
    "start_index": 128, "end_index": 214,
    "matched_text": "APIs that handle anti-bot..."
  }],
  "search_queries": ["best web scraping apis 2026"],
  "related_questions": ["Which API is cheapest?"],
  "source_domains": ["example.com", "..."],
  "focus": "web",
  "latency_ms": 14602
}
API Reference

Perplexity API — 3 Dedicated Endpoints

Structured JSON responses with normalized data models. No HTML parsing. No proxy management. No Perplexity account.

GET/POST
/v1/perplexity/ask
Send a prompt to perplexity.ai and get the answer, citations with text offsets, the full retrieved set, the search queries Perplexity fanned out, and related questions
20 cr / req
GET/POST
/v1/perplexity/brand-visibility
The answer plus AEO/GEO metrics — mentions, first position, share of voice vs. competitors, citation rank, and the excerpt around the first mention
25 cr / req
GET
/v1/perplexity/models
The retrieval modes and models perplexity.ai currently exposes, with titles, descriptions, and account requirements
1 cr / req
Why ScrapeBadger

More Than an Answer String

Most Perplexity scrapers hand back text and, at best, a list of URLs. ScrapeBadger returns the evidence behind the answer.

The real perplexity.ai, not an LLM API

Answers come from the consumer product with live web retrieval, so you see what a real user sees — including the sources Perplexity surfaced. No Perplexity account, no Perplexity API key, no per-token bill.

Citations anchored to the answer text

Every citation carries start_index, end_index, and matched_text — the exact substring of the answer that source supports, resolved from Perplexity’s inline [n] markers. Everyone else hands you a bare URL list.

The full search trail, not just what was cited

search_results returns everything Perplexity retrieved with a cited flag on each entry, next to citations which returns only what the answer actually referenced. You can see what it read and rejected.

The retrieval fan-out, exposed

search_queries returns the actual sub-queries Perplexity issued to its search backend for your prompt. No surveyed competitor — Oxylabs, Bright Data, SerpApi, DataForSEO, or any Apify actor — exposes it.

Brand visibility built in

One call returns mention count, first position, share of voice against named competitors, whether your domain was cited, and its citation rank. AEO/GEO platforms sell this as a $29–499/mo subscription.

Pay per success only

Credits are only deducted for successful responses. Blocked, rate-limited, and upstream errors are never billed. PAYG credits never expire.

Comparison

How It Compares to Other Perplexity Scrapers

Same job, different depth. Prices are per 1,000 requests as published by each vendor.

VendorPrice / 1KCitationsFull search trailBrand analysis
OxylabsCreditsYesNoNo
Bright Data$1.50YesNoNo
SerpApiPlan-basedYesNoNo
DataForSEO LLM Scraper$1.20–4.00YesNoSeparate product
Apify actors$2.00–5.00YesNoNo
ScrapeBadger$3.00Yes + text offsetsYes + fan-out queriesBundled
Why the extra fields matter: Citation offsets let you show a user exactly which sentence a source backs. The full search trail — plus the sub-queries Perplexity issued — shows what it read but chose not to cite. And brand visibility — sold elsewhere as a $29–499/mo AEO/GEO subscription — comes back from the same API on the same credits.
Pricing

Pay Per Request. Credits Never Expire.

You only pay for successful responses — blocked, rate-limited, and upstream errors are always free. PAYG credits never expire; volume subscription tiers reduce per-credit cost further.

Free trial
1,000 credits free
= 50 ask requests
Credits expire
Never
Buy once, use anytime
Failed requests
Always free
Pay for success only
Live cost estimator
Credits per request20
Total credits needed20,000
Loading plans…
Code Example

Simple Integration. Any Language.

Get started in minutes with Node.js, Python, or plain HTTP requests.

The scrapebadger Node.js library wraps the Perplexity API with typed methods. Install with npm install scrapebadger, then start asking Perplexity in a few lines of code.

Node.js — Ask + Brand Visibility
import ScrapeBadger from 'scrapebadger'

const client = new ScrapeBadger({
  apiKey: 'sb_live_...'
})

// Ask the real perplexity.ai (takes 10-40s live)
const res = await client.perplexity.ask({
  prompt: 'Best web scraping APIs in 2026?',
  focus: 'web',
})

console.log(res.answer)
console.log(res.webSearchTriggered, res.citationCount)

// Which sentence does each source back?
for (const c of res.citations) {
  console.log(c.domain, c.startIndex, c.endIndex)
}

// How visible is your brand in that answer?
const vis = await client.perplexity.brandVisibility({
  prompt: 'Best web scraping APIs in 2026?',
  brand: 'ScrapeBadger',
  domain: 'scrapebadger.com',
  competitors: ['Bright Data', 'ScrapingBee'],
})

console.log(vis.mentioned, vis.shareOfVoicePct, vis.citationRank)
FAQ

Frequently Asked Questions

Common questions about scraping Perplexity with the API — Node.js, Python, or REST.

What does the Perplexity Scraper API return?

The /ask endpoint returns the prompt, the answer as plain text and markdown, citations (url, title, snippet, domain, source_type, published_at, plus start_index/end_index/matched_text pointing into the answer), search_results with the full retrieved set and a cited flag on each, source_domains, search_queries (Perplexity’s own retrieval fan-out), related_questions, images, videos, web_search_triggered, truncated, focus, the model slug, backend_uuid, country, answer_length, citation_count, latency_ms, and created_at.

Is this the Perplexity API or the real perplexity.ai?

The real perplexity.ai. Requests go to the consumer product anonymously — no Perplexity account and no Perplexity API key is involved on either side. That is why answers include the full search trail and related questions, which the official Sonar API does not give you.

How long does a request take?

Perplexity retrieves sources and composes the answer live, so /ask and /brand-visibility measure roughly 10-40s end to end. /models returns immediately. Size your client timeouts to at least 60 seconds. If the stream budget expires mid-answer, the response is flagged truncated rather than silently served as complete.

How do I measure my brand in Perplexity answers?

Call /brand-visibility with a prompt, your brand name, and optionally your domain, aliases, and competitors. You get back mentioned, mention_count, first_position, position_score (1.0 = named at the very start), share_of_voice_pct against the competitors you named, cited plus cited_urls and citation_rank for your domain, a per-competitor breakdown, and an excerpt of the answer around the first mention — alongside the answer and its citations.

How do I call the Perplexity Scraper API from Node.js?

Install with `npm install scrapebadger`, initialise the client with your API key, then call client.perplexity.ask({ prompt: "..." }) or client.perplexity.brandVisibility({ prompt: "...", brand: "...", competitors: ["..."] }). Ask accepts an optional country (ISO-3166 alpha-2, default US) and focus (web | scholar | social). Plain HTTP works too — every endpoint accepts GET or POST with the X-API-Key header.

Plans & subscriptions

Bigger volume? Save up to 64%

Per-request credit costs are listed above. For higher monthly volume, subscription tiers reduce the per-credit rate substantially. All Perplexity endpoints — ask, brand visibility, and models — included on every plan.

Get started

Start Scraping Perplexity Today

1,000 free credits. No credit card. Get your API key in under a minute.

PAYG credits never expire · Pay only for successful requests · No Perplexity account needed