Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 60 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,74 @@
<a href="https://sonar.perplexity.ai" target="_blank">
# Perplexity Sonar API Cookbook

A comprehensive collection of practical examples, integration guides, and community showcases for building with [Perplexity's Sonar API](https://sonar.perplexity.ai/) - the fastest, most cost-effective AI answer engine with real-time search capabilities.

<a href="https://docs.perplexity.ai/cookbook" target="_blank">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="/static/img/perplexity-sonar.png" style="max-width: 100%; width: 400px; margin-bottom: 20px">
<img src="/static/img/perplexity-sonar.png" alt="Perplexity Sonar" style="max-width: 100%; width: 400px; margin-bottom: 20px">
</picture>
</a>

<h3><a href="https://sonar.perplexity.ai" target="_blank">sonar.perplexity.ai</a></h3>
📖 **[View the full cookbook →](https://docs.perplexity.ai/cookbook)**

## What's Inside

### 🛠️ [Examples](docs/examples/)
Ready-to-run applications demonstrating real-world use cases:

- **[Fact Checker CLI](docs/examples/fact-checker-cli/)** - Verify claims and articles for accuracy
- **[Daily Knowledge Bot](docs/examples/daily-knowledge-bot/)** - Automated daily fact delivery system
- **[Disease Information App](docs/examples/disease-qa/)** - Interactive medical information lookup
- **[Financial News Tracker](docs/examples/financial-news-tracker/)** - Real-time market analysis
- **[Academic Research Finder](docs/examples/research-finder/)** - Literature discovery and summarization
- **[Discord Bot](docs/examples/discord-py-bot/)** - Discord integration example

### 🌟 [Community Showcase](docs/showcase/)
Community-built applications including:
- News and finance apps
- AI-powered search tools
- Browser extensions
- Educational platforms
- And many more innovative projects

### 📚 [Integration Guides](docs/articles/)
In-depth tutorials for advanced implementations:
- Memory management patterns
- OpenAI agents integration
- Multi-modal implementations

## Quick Start

Example code and guides for accomplishing common tasks with the [Perplexity Sonar API](https://sonar.perplexity.ai/), the fastest, most cost-effective AI answer engine with search.
1. **Browse the [documentation](https://docs.perplexity.ai/cookbook)** to find examples that match your needs
2. **Clone this repository** and navigate to any example directory
3. **Follow the setup instructions** in each example's README
4. **Get your API key** from [Perplexity](https://docs.perplexity.ai/guides/getting-started)
5. **Build and customize** for your specific use case

## API Key Setup

For more information, check our [docs](https://docs.perplexity.ai).
All examples require a Perplexity API key:

```bash
export PPLX_API_KEY="your-api-key-here"
```

Get your API key at [docs.perplexity.ai](https://docs.perplexity.ai/guides/getting-started).

## Contributing

We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on how to submit examples and showcase projects.
Have a project built with Sonar API? We'd love to feature it!

- **[Submit an Example Tutorial](CONTRIBUTING.md#for-examples)**
- **[Submit a Showcase Project](CONTRIBUTING.md#for-showcase-projects)**
- **[View Full Contributing Guidelines](CONTRIBUTING.md)**

## Resources

- **[Sonar API Documentation](https://docs.perplexity.ai/home)**
- **[API Playground](https://perplexity.ai/account/api/playground)**
- **[Cookbook Documentation](https://docs.perplexity.ai/cookbook)**

---

### Quick Links
- [Submit an Example Tutorial](CONTRIBUTING.md#for-examples)
- [Submit a Showcase Project](CONTRIBUTING.md#for-showcase-projects)
- [View Contribution Guidelines](CONTRIBUTING.md)
*This repository syncs to [docs.perplexity.ai/cookbook](https://docs.perplexity.ai/cookbook) on every commit.*