API Reference Perplexed v#0.1.0

Copy Markdown View Source

Modules

A small web search, scrape and research toolkit, in the spirit of Firecrawl or Exa.

One unique search hit an answer considered.

One page an answer was written from. number is its citation number; tier is the scraper that read it and cost what reading it cost.

Perplexed's settings.

One scraped page as Markdown, with how it was obtained.

Chooses which parts of a long page a model gets to read.

The behaviour that turns PDF bytes into Markdown for a scrape.

One-shot web answering, in fixed steps

Scrapes a URL to Markdown by climbing a ladder of Perplexed.Scrapers, cheapest first.

The behaviour of one scrape tier, and the registry of built-in tiers.

Cloudflare Browser Run /markdown quick action as a Perplexed.Scraper: loads the URL in headless Chrome, runs its JavaScript, and returns the rendered page as Markdown.

Plain HTTP as a Perplexed.Scraper, sending browser-like request headers. Free and fast; the first tier of the default ladder.

HTTP through CloakedReq (Rust wreq) as a Perplexed.Scraper: the request carries a real browser's TLS and HTTP/2 fingerprint and headers, which gets past sites that refuse plain clients on that signal alone.

Swappable web search: every provider takes a query and returns normalized Perplexed.Search.Hits, so callers change engines by changing one option. Built-in providers, by name, with list price per successful request (USD) used for per-run cost accounting

Cloudflare Web Search API (through AI Gateway) as a Perplexed.Search provider.

DeepSeek Search API (POST /v1/tools/search) as a Perplexed.Search provider.

Firecrawl v2 search as a Perplexed.Search provider.

One search result, normalized across providers.

One search call: the hits, the provider that answered, and what it cost.

:telemetry events Perplexed emits. Attach handlers to track spend or to be told when a provider needs attention.

Refuses URLs that would point a scrape at a private network.

Judges whether fetched page text is worth handing to a model.