Skip to main content
Perplexity

Search documentation

Type to search this documentation.

On this pageOverview

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.

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
Run code and build a PDF in a sandbox Competitor Buzz Tracker Agent API Python
Source candidates for a hiring brief Talent Sourcer Agent API Python
Enrich a customer row with validated professional evidence Enrich Customer Data with Agent API Agent API Python
Pick an open model via an MCP server Model Picker Agent API Python

All examples require a Perplexity API key. Set it as an environment variable:

Bash
export PERPLEXITY_API_KEY="your-api-key-here"
  • Python 3.9+ or Node.js 18+ (depending on the example)
  • Perplexity API Key
  • Internet connection for API calls

Additional requirements vary by example and are listed in each project's documentation.

Found a bug or want to add an example? See our Contributing Guidelines.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu