Documentation Index
Fetch the complete documentation index at: https://docs.perplexity.ai/llms.txt
Use this file to discover all available pages before exploring further.
Examples Overview
Ready-to-run projects that demonstrate real-world use cases across every Perplexity API. Each example includes complete setup instructions and working code.Choosing the Right Example
| If you want to… | Use this example | API | Language |
|---|---|---|---|
| Conduct deep web research | Agent Research Assistant | Agent API | Python, TypeScript |
| Compare models across providers | Model Comparison | Agent API | Python |
| Monitor news topics in real time | Search News Monitor | Search API | Python, TypeScript |
| Build a document Q&A system | Document Q&A | Embeddings + Agent API | Python |
| Build a TypeScript CLI agent | TypeScript Agent CLI | Agent API | TypeScript |
| Analyze images with web context | Image Analysis | Agent API | Python, TypeScript |
| Ask questions about uploaded files | File Attachment Q&A | Agent API | Python |
| Search SEC filings for financial data | SEC Filing Search | Agent API | Python |
By API
Agent API
Agent Research Assistant
Deep web research using the
deep-research preset with structured report output.Model Comparison
Compare responses from 5 providers side-by-side — quality, latency, and cost.
TypeScript Agent CLI
Interactive TypeScript CLI with streaming, model selection, and web search.
Image Analysis
Vision + web search for context-enriched image analysis.
File Attachment Q&A
Upload documents and ask questions about them with optional web search enrichment.
Search API
Search News Monitor
Multi-topic news monitoring with domain filtering and recency control.
SEC Filing Search
Search SEC.gov and EDGAR for financial filings with structured data extraction.
Embeddings API
Document Q&A
Self-contained RAG system with contextualized embeddings and Agent API answer generation.
API Key Setup
All examples require a Perplexity API key. Set it as an environment variable:Common Requirements
- Python 3.9+ or Node.js 18+ (depending on the example)
- Perplexity API Key
- Internet connection for API calls