Overview
Perplexity API Platform - build with the Router, Agent, Search, and Embeddings APIs. Real-time, web-wide research and Q&A capabilities for your products.


Power your products with unparalleled real-time, web-wide research and Q&A capabilities.
Quickstart Guide
Getting started is simple and fast—make your first API call within minutes.
Try Our APIs
Section titled “Try Our APIs”from perplexity import Perplexity
client = Perplexity()
search = client.search.create(
query=[
"What is Comet Browser?",
"Perplexity AI",
"Perplexity Changelog"
]
)
for result in search.results:
print(f"{result.title}: {result.url}")import Perplexity from '@perplexity-ai/perplexity_ai';
const client = new Perplexity();
const search = await client.search.create({
query: [
"What is Comet Browser?",
"Perplexity AI",
"Perplexity Changelog"
]
});
search.results.forEach(result => {
console.log(`${result.title}: ${result.url}`);
});curl https://api.perplexity.ai/search \
-H "Authorization: Bearer $PERPLEXITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": [
"What is Comet Browser?",
"Perplexity AI",
"Perplexity Changelog"
]
}' | jqfrom perplexity import Perplexity
client = Perplexity()
response = client.responses.create(
model="openai/gpt-5.5",
input="What are the major AI developments and announcements from today across the tech industry?"
)
print(response.output_text)import Perplexity from '@perplexity-ai/perplexity_ai';
const client = new Perplexity();
const response = await client.responses.create({
model: 'openai/gpt-5.6-terra',
input: 'What are the major AI developments and announcements from today across the tech industry?'
});
console.log(response.output_text);curl https://api.perplexity.ai/v1/agent \
-H "Authorization: Bearer $PERPLEXITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.5",
"input": "What are the major AI developments and announcements from today across the tech industry?"
}' | jqfrom perplexity import Perplexity
client = Perplexity()
response = client.responses.create(
model="openai/gpt-5.5",
input="What are the most promising machine learning breakthroughs in computer vision and multimodal AI from recent arXiv publications?",
tools=[
{
"type": "web_search",
"filters": {
"search_domain_filter": ["arxiv.org"],
"search_recency_filter": "month"
}
}
],
instructions="You have access to a web_search tool. Use it for current information."
)
print(response.output_text)import Perplexity from '@perplexity-ai/perplexity_ai';
const client = new Perplexity();
const response = await client.responses.create({
model: 'openai/gpt-5.6-terra',
input: 'What are the most promising machine learning breakthroughs in computer vision and multimodal AI from recent arXiv publications?',
tools: [
{
type: 'web_search',
filters: {
search_domain_filter: ['arxiv.org'],
search_recency_filter: 'month'
}
}
],
instructions: 'You have access to a web_search tool. Use it for current information.'
});
console.log(response.output_text);curl https://api.perplexity.ai/v1/agent \
-H "Authorization: Bearer $PERPLEXITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.5",
"input": "What are the most promising machine learning breakthroughs in computer vision and multimodal AI from recent arXiv publications?",
"tools": [
{
"type": "web_search",
"filters": {
"search_domain_filter": ["arxiv.org"],
"search_recency_filter": "month"
}
}
],
"instructions": "You have access to a web_search tool. Use it for current information."
}' | jqfrom perplexity import Perplexity
client = Perplexity()
response = client.responses.create(
model="openai/gpt-5.5",
input="What were the largest AI startup funding rounds announced this week?",
tools=[{"type": "web_search"}],
response_format={
"type": "json_schema",
"json_schema": {
"name": "funding_rounds",
"schema": {
"type": "object",
"properties": {
"deals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"company": {"type": "string"},
"amount": {"type": "string"},
"round": {"type": "string"},
"lead_investors": {
"type": "array",
"items": {"type": "string"}
}
},
"required": ["company", "amount", "round", "lead_investors"]
}
}
},
"required": ["deals"]
}
}
}
)
print(response.output_text)import Perplexity from '@perplexity-ai/perplexity_ai';
const client = new Perplexity();
const response = await client.responses.create({
model: 'openai/gpt-5.6-terra',
input: 'What were the largest AI startup funding rounds announced this week?',
tools: [{ type: 'web_search' }],
response_format: {
type: 'json_schema',
json_schema: {
name: 'funding_rounds',
schema: {
type: 'object',
properties: {
deals: {
type: 'array',
items: {
type: 'object',
properties: {
company: { type: 'string' },
amount: { type: 'string' },
round: { type: 'string' },
lead_investors: {
type: 'array',
items: { type: 'string' }
}
},
required: ['company', 'amount', 'round', 'lead_investors']
}
}
},
required: ['deals']
}
}
}
});
console.log(response.output_text);curl https://api.perplexity.ai/v1/agent \
-H "Authorization: Bearer $PERPLEXITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.5",
"input": "What were the largest AI startup funding rounds announced this week?",
"tools": [{"type": "web_search"}],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "funding_rounds",
"schema": {
"type": "object",
"properties": {
"deals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"company": {"type": "string"},
"amount": {"type": "string"},
"round": {"type": "string"},
"lead_investors": {
"type": "array",
"items": {"type": "string"}
}
},
"required": ["company", "amount", "round", "lead_investors"]
}
}
},
"required": ["deals"]
}
}
}
}' | jqAvailable APIs
Section titled “Available APIs”
Router API
Unified access to open-weight models hosted by Perplexity through one OpenAI-compatible endpoint.

Agent API
Get web-grounded answers with built-in citations in one call, or access third-party models from OpenAI, Anthropic, Google, and xAI with web search tools and presets.

Search API
Get raw, ranked web search results with advanced filtering and real-time data.

Embeddings API
Generate high-quality embeddings for semantic search and RAG pipelines.