The Perplexity endpoint sends any prompt to Perplexity AI and returns the response as structured JSON — including numbered inline citations, the web sources behind them with full text snippets, and Perplexity’s suggested follow-up questions.Documentation Index
Fetch the complete documentation index at: https://docs.scrapellm.com/llms.txt
Use this file to discover all available pages before exploring further.
Web search on by defaultWeb search is enabled for all requests. Set
web_search=false for a faster answer without live citations.Overview
Perplexity is a research-first AI that cites every claim with a numbered source. Use this endpoint to monitor brand mentions in AI search, track which sources Perplexity trusts for your industry, and extract follow-up questions as content and keyword ideas.Unique features
- Numbered citations: Every source is numbered and mapped to inline
[1][2]references in the response text - Source snippets: Full text excerpts from each cited page — not just the URL
- Related questions: Perplexity’s suggested follow-up questions for further research
Request parameters
The prompt to send to Perplexity. Maximum 4,000 characters.
ISO 3166-1 alpha-2 country code for localised responses.
Enable live web search. Set to
false for a faster response without citations.Skip the response cache and always fetch a fresh result.
Maximum seconds to wait for Perplexity to respond (10–600).
3 credits per request
Example request
Response schema
Includes common response fields plus:| Field | Type | Description |
|---|---|---|
result | string | Plain-text response. Inline citation markers like [1] map to positions in sources[] |
result_markdown | string | Markdown-formatted response |
sources | array | Cited web sources — each has title, url, and snippet |
sources[].title | string | Article title of the cited page |
sources[].url | string | URL of the cited source |
sources[].snippet | string | Text excerpt from the source page |
related_questions | array | Perplexity’s suggested follow-up questions |
credits_used | integer | Credits consumed — always 3 for Perplexity |
elapsed_ms | float | End-to-end request duration in milliseconds |
cached | boolean | true if served from cache |
Common questions
How do inline citation numbers map to sources?
Theresult field contains inline markers like [1][2]. The number is the 1-based position of the source in the sources[] array — [1] refers to sources[0], [2] to sources[1], and so on.
When should I set web_search=false?
When you need a fast, low-latency answer and don’t need cited sources — for example, generating summaries or using Perplexity as a general-purpose language model. Responses without web search are typically 2–4× faster.
How is Perplexity different from ChatGPT for citation monitoring?
Perplexity returns richer source metadata (full text snippets per source) and uses numbered inline citations that map directly to positions in the response text. ChatGPT returnslinks[] which are sources mentioned but not always position-mapped.