NEW AI Studio is now available Try it now
Search

Perplexity Scraper

Extract AI-generated answers, cited sources, follow-up suggestions, and knowledge summaries from Perplexity. Powered by spider-browser .

Get Started Documentation
perplexity.ai target
99.5% success rate
~4ms latency
Quick Start

Extract data in minutes

perplexity-scraper.ts
import { SpiderBrowser } from "spider-browser";

const spider = new SpiderBrowser({
  apiKey: process.env.SPIDER_API_KEY!,
  stealth: 2,
});

await spider.connect();
const page = spider.page!;
await page.goto("https://www.perplexity.ai/search/what-is-web-scraping");
await page.content(12000);

const data = await page.evaluate(`(() => {
  const result = {
    answer: document.querySelector("[data-testid='answer-content']")?.textContent?.trim(),
    sources: [],
    followUps: [],
  };
  document.querySelectorAll("[data-testid='source-card']").forEach(el => {
    const title = el.querySelector("[data-testid='source-title']")?.textContent?.trim();
    const url = el.querySelector("a")?.getAttribute("href");
    if (title) result.sources.push({ title, url });
  });
  document.querySelectorAll("[data-testid='related-question']").forEach(el => {
    result.followUps.push(el.textContent?.trim());
  });
  return JSON.stringify(result);
})()`);

console.log(JSON.parse(data));
await spider.close();
✓ ready to run | spider-browser | TypeScript
Fetch API

Structured data endpoint

Extract structured JSON from perplexity.ai with a single POST request. AI-configured selectors, cached for fast repeat calls.

POST /fetch/perplexity.ai/
Answer textSourcesSource URLsFollow-up questionsCitationsRelated topics
curl
curl -X POST https://api.spider.cloud/fetch/perplexity.ai/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"return_format": "json"}'
Python
import requests

resp = requests.post(
    "https://api.spider.cloud/fetch/perplexity.ai/",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={"return_format": "json"},
)
print(resp.json())
Node.js
const resp = await fetch("https://api.spider.cloud/fetch/perplexity.ai/", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ return_format: "json" }),
});
const data = await resp.json();
console.log(data);
Extraction

Data you can extract

Answer textSourcesSource URLsFollow-up questionsCitationsRelated topicsQueryTimestamp
Geo-Proxy

Location targeting

Access region-specific results from 199+ countries via residential proxies.

Stealth

Rate-limit bypass

Distributed requests with fingerprint rotation to avoid IP-based throttling.

Parsing

Structured SERP data

Clean extraction of rankings, snippets, and knowledge panels into JSON.

Related

More Search scrapers

Start scraping perplexity.ai

Get your API key and start extracting data in minutes.