Official Perplexity SDKs
We're thrilled to announce the official Perplexity SDKs for Python and Typescript! These SDKs provide convenient, type-safe access to all Perplexity APIs with both synchronous and asynchronous clients.
Installation:
# Python
pip install perplexityai
# Typescript
npm install @perplexity-ai/perplexity_ai
Features:
- Full type definitions for all request parameters and response fields
- Support for Sonar and Search APIs
- Streaming support with async iterators
- Automatic environment variable handling for API keys
Get started with our SDK Quickstart Guide and explore the Sonar API Guide for detailed usage examples.
Fetched June 10, 2026




