Search the web

Perplexity Search API

Web search API that returns ranked results as JSON with query-relevant page text, without a generated answer.

Addresses

REST API
https://api.perplexity.ai/search2
MCP server
https://api.perplexity.ai/mcp4
OpenAPI spec
https://docs.perplexity.ai/openapi.json13
Docs for agents
https://docs.perplexity.ai/llms.txt1
Status page
https://status.perplexity.com12

Install

WhatCommand
MCP, Claude Code (remote)claude mcp add --transport http perplexity https://api.perplexity.ai/mcp
MCP, Claude Code (local)claude mcp add perplexity --env 'PERPLEXITY_API_KEY=${PERPLEXITY_API_KEY}' -- npx -y @perplexity-ai/mcp-server
Python SDKpip install perplexityai
TypeScript SDKnpm install @perplexity-ai/perplexity_ai
CLIcurl -fsSL https://github.com/perplexityai/perplexity-cli/releases/latest/download/install.sh | sh
Stripe Projects (account, key, credits)stripe projects add perplexity/api

Source3Search API quickstart

Read from Perplexity AI’s own pages on 2026-11-04. Every number links to the page a value came from. For agents, the same facts as markdown: /tools/search-the-web/perplexity.md