Skip to content

Introduction

Python scraper to extract AI responses from Perplexity's web interface.

This library allows you to interact with Perplexity programmatically, start conversations, upload files, and stream responses back, all using the same web interface endpoints used by the browser, but powered by Python and managed cleanly.

Key Features

  • Full support for the latest Perplexity AI models
  • Conversation history tracking
  • File attachments (Documents and Images)
  • Asynchronous streaming capabilities
  • MCP (Model Context Protocol) Server support out-of-the-box
  • OpenAI-compatible REST API server (drop-in replacement for any OpenAI client)

Disclaimer

This is an unofficial library. It uses internal APIs that may change without notice. Use at your own risk.

By using this library, you agree to Perplexity AI's Terms of Service.