Examples Overview
Welcome to the Perplexity Sonar API Examples collection! These are production-ready applications that demonstrate real-world use cases of the Sonar API.π Quick Start
Navigate to any example directory and follow the instructions in the README.md file.π Available Examples
π Fact Checker CLI
Purpose: Verify claims and articles for factual accuracyType: Command-line tool
Use Cases: Journalism, research, content verification Key Features:
- Structured claim analysis with ratings
- Source citation and evidence tracking
- JSON output for automation
- Professional fact-checking workflow
π€ Daily Knowledge Bot
Purpose: Automated daily fact delivery systemType: Scheduled Python application
Use Cases: Education, newsletters, personal learning Key Features:
- Topic rotation based on calendar
- Persistent storage of facts
- Configurable scheduling
- Educational content generation
π₯ Disease Information App
Purpose: Interactive medical information lookupType: Web application (HTML/JavaScript)
Use Cases: Health education, medical reference, patient information Key Features:
- Interactive browser interface
- Structured medical knowledge cards
- Citation tracking for medical sources
- Standalone deployment ready
π Financial News Tracker
Purpose: Real-time financial news monitoring and market analysisType: Command-line tool
Use Cases: Investment research, market monitoring, financial journalism Key Features:
- Real-time financial news aggregation
- Market sentiment analysis (Bullish/Bearish/Neutral)
- Impact assessment and sector analysis
- Investment insights and recommendations
π Academic Research Finder
Purpose: Academic literature discovery and summarizationType: Command-line research tool
Use Cases: Academic research, literature reviews, scholarly work Key Features:
- Academic source prioritization
- Paper citation extraction with DOI links
- Research-focused prompting
- Scholarly workflow integration
π API Key Setup
All examples require a Perplexity API key. You can set it up in several ways:Environment Variable (Recommended)
.env File
Create a.env
file in the example directory:
Command Line Argument
π οΈ Common Requirements
All examples require:- Python 3.7+
- Perplexity API Key (Get one here)
- Internet connection for API calls
requirements.txt
file.
π― Choosing the Right Example
If you want to⦠| Use this example |
---|---|
Verify information accuracy | Fact Checker CLI |
Learn something new daily | Daily Knowledge Bot |
Look up medical information | Disease Information App |
Track financial markets | Financial News Tracker |
Research academic topics | Academic Research Finder |
π€ Contributing
Found a bug or want to improve an example? We welcome contributions!- Report Issues: Open an issue describing the problem
- Suggest Features: Propose new functionality or improvements
- Submit Code: Fork, implement, and submit a pull request
π License
All examples are licensed under the MIT License.Ready to explore? Pick an example above and start building with Perplexityβs Sonar API! π