Perplexity API
Web search
The Perplexity API platform offers a Search API that returns ranked web results as JSON, with title, URL, date and extracted page text, and no generated answer. The same key and host also serve an Agent API that searches, reasons and uses tools to return a cited answer, along with Embeddings and other endpoints. Developers use the Python or TypeScript SDK, or the REST endpoint, or an MCP server with search, ask, research and reason tools. The documentation lists integrations with LangChain, LiteLLM, Mastra, n8n and the Vercel AI SDK.
The documentation index lists Sonar only in migration guides to the Agent API, so this entry covers the Search API and Agent API. The pricing page lists a per-request price for Search.

Pinout
- MCP server: supported, verified
- HTTP API: supported, verified
- command line: not checked yet
- Python SDK: supported, verified
- TypeScript SDK: supported, verified
- OpenAPI description: not checked yet
| Interface | Status | Source we read | Read on |
|---|---|---|---|
| MCP server | Supported, verified | Perplexity documentation, MCP server | |
| HTTP API | Supported, verified | Search API overview (POST /search) | |
| Command line | Not checked yet | — | — |
| Python SDK | Supported, verified | Search API quickstart (pip install perplexityai) | |
| TypeScript SDK | Supported, verified | Search API quickstart (npm install @perplexity-ai/perplexity_ai) | |
| OpenAPI description | Not checked yet | — | — |
Facts
| APIs on one host | Search API, Agent API, Orchestrator API (private preview), Decisions API, Embeddings API, all on api.perplexity.ai with one API key. Perplexity documentation, home, read . |
|---|---|
| Search endpoint | POST https://api.perplexity.ai/search; 50 query units per second. Search API overview, read . |
| Search pricing | $5.00 per 1,000 successful requests; Fast Search $1.00 per 1,000; only successful POST /search requests are billed. Pricing page, read . |
| Python SDK | pip install perplexityai. Search API quickstart, read . |
| TypeScript SDK | npm install @perplexity-ai/perplexity_ai. Search API quickstart, read . |
| MCP server, remote | claude mcp add --transport http perplexity https://api.perplexity.ai/mcp (OAuth or API key as bearer token). Perplexity documentation, MCP server, read . |
| MCP server, local | claude mcp add perplexity --env 'PERPLEXITY_API_KEY=${PERPLEXITY_API_KEY}' -- npx -y @perplexity-ai/mcp-server. Perplexity documentation, MCP server, read . |
| MCP tools | perplexity_search, perplexity_ask, perplexity_research, perplexity_reason. Perplexity documentation, MCP server, read . |
| Integrations named | LangChain, LiteLLM, Mastra, n8n, Vercel AI SDK, Haystack, Agno, LiveKit Agents, Claude Code, Cursor. Perplexity documentation index (llms.txt), read . |
| Frameworks | LangChain (Perplexity documentation index (llms.txt), read 2026-11-16); LiteLLM (Perplexity documentation index (llms.txt), read 2026-11-16); Mastra (Perplexity documentation index (llms.txt), read 2026-11-16); n8n (Perplexity documentation index (llms.txt), read 2026-11-16); Vercel AI SDK (Perplexity documentation index (llms.txt), read 2026-11-16); Haystack (Perplexity documentation index (llms.txt), read 2026-11-16). |
Strengths
- The Search API does not generate an answer and returns the extracted page text of ranked results.
- Python and TypeScript SDKs are documented, and the MCP server runs locally or as a remote endpoint.
Pricing
As written on Perplexity API's own page on the read date. Prices change: check there before you pay.
Alternatives to Perplexity API
All web search tools for agents
Web search, contents and research API for agents, with hosted MCP.

Web search, fetch and research API with SDKs, CLI and MCP.

Web search, extraction, crawl and research API with a hosted MCP server.

Search, contents and research APIs for agents, with an MCP server.
Last check: . Method: product pages read automatically, page and day written down. Next check due within 90 days. How we check
Is this your tool? Write to hello@agent-tools.directory from an address on its domain to correct a pin or a fact.