> ## Documentation Index > Fetch the complete documentation index at: https://docs.perplexity.ai/llms.txt > Use this file to discover all available pages before exploring further. # null export const PerplexityLogo = () => { return
Perplexity API Platform Perplexity API Platform
; }; export const SonarLogo = () => { return ; }; export const QuickstartBanner = () =>
Quickstart Guide Getting started is simple and fast—make your first API call within minutes.
Get Started Get Your API Key
; export const UseCaseTabs = () => { const [selected, setSelected] = useState(0); const useCases = [{ label: 'Find Results', codeExamples: [{ language: 'bash', code: `curl https://api.perplexity.ai/search \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ -d '{ "query": [ "What is Comet Browser?", "Perplexity AI", "Perplexity Changelog" ] }' | jq` }, { language: 'python', code: `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}")` }, { language: 'typescript', code: `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}\`); });` }] }, { label: 'Agentic Responses', codeExamples: [{ language: 'bash', code: `curl https://api.perplexity.ai/v1/responses \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ -d '{ "preset": "pro-search", "input": "What are the major AI developments and announcements from today across the tech industry?" }' | jq` }, { language: 'python', code: `from perplexity import Perplexity client = Perplexity() response = client.responses.create( preset="pro-search", input="What are the major AI developments and announcements from today across the tech industry?" ) print(response.output_text)` }, { language: 'javascript', code: `import Perplexity from '@perplexity-ai/perplexity_ai'; const client = new Perplexity(); const response = await client.responses.create({ preset: 'pro-search', input: 'What are the major AI developments and announcements from today across the tech industry?' }); console.log(response.output_text);` }] }, { label: 'Filter your sources', codeExamples: [{ language: 'bash', code: `curl https://api.perplexity.ai/chat/completions \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ -d '{ "model": "sonar", "messages": [ { "role": "user", "content": "What are the most promising machine learning breakthroughs in computer vision and multimodal AI from recent arXiv publications?" } ], "web_search_options": { "search_domain_filter": ["arxiv.org"], "search_recency_filter": "month" } }' | jq` }, { language: 'python', code: `from perplexity import Perplexity client = Perplexity() completion = client.chat.completions.create( messages=[ { "role": "user", "content": "What are the most promising machine learning breakthroughs in computer vision and multimodal AI from recent arXiv publications?" } ], model="sonar", web_search_options={ "search_domain_filter": ["arxiv.org"], "search_recency_filter": "month" } ) print(completion.choices[0].message.content)` }, { language: 'javascript', code: `import Perplexity from '@perplexity-ai/perplexity_ai'; const client = new Perplexity(); const completion = await client.chat.completions.create({ messages: [ { role: 'user', content: 'What are the most promising machine learning breakthroughs in computer vision and multimodal AI from recent arXiv publications?' } ], model: 'sonar', web_search_options: { search_domain_filter: ['arxiv.org'], search_recency_filter: 'month' } }); console.log(completion.choices[0].message.content);` }] }, { label: 'Structure Results', codeExamples: [{ language: 'bash', code: `curl https://api.perplexity.ai/v1/responses \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ -d '{ "preset": "pro-search", "input": "Find the top 3 trending AI startups with recent funding. Include company name, funding amount, and focus area.", "response_format": { "type": "json_schema", "json_schema": { "schema": { "type": "object", "properties": { "startups": { "type": "array", "items": { "type": "object", "properties": { "company_name": {"type": "string"}, "funding_amount": {"type": "string"}, "focus_area": {"type": "string"} }, "required": ["company_name", "funding_amount", "focus_area"] } } }, "required": ["startups"] } } } }' | jq` }, { language: 'python', code: `from perplexity import Perplexity client = Perplexity() response = client.responses.create( preset="pro-search", input="Find the top 3 trending AI startups with recent funding. Include company name, funding amount, and focus area.", response_format={ "type": "json_schema", "json_schema": { "schema": { "type": "object", "properties": { "startups": { "type": "array", "items": { "type": "object", "properties": { "company_name": {"type": "string"}, "funding_amount": {"type": "string"}, "focus_area": {"type": "string"} }, "required": ["company_name", "funding_amount", "focus_area"] } } }, "required": ["startups"] } } } ) for item in response.output: if hasattr(item, 'content'): print(item.content[0].text) break` }, { language: 'javascript', code: `import Perplexity from '@perplexity-ai/perplexity_ai'; const client = new Perplexity(); const response = await client.responses.create({ preset: 'pro-search', input: 'Find the top 3 trending AI startups with recent funding. Include company name, funding amount, and focus area.', response_format: { type: 'json_schema', json_schema: { schema: { type: 'object', properties: { startups: { type: 'array', items: { type: 'object', properties: { company_name: { type: 'string' }, funding_amount: { type: 'string' }, focus_area: { type: 'string' } }, required: ['company_name', 'funding_amount', 'focus_area'] } } }, required: ['startups'] } } } }); console.log(response.output_text);` }] }]; const selectedUseCase = useCases[selected]; return
              {selectedUseCase.codeExamples[1].code}
            
              {selectedUseCase.codeExamples[2].code}
            
              {selectedUseCase.codeExamples[0].code}
            
{} Get Started
; };
Power your products with unparalleled real-time, web-wide research and Q\&A capabilities.

Available APIs

Search API

Search

Get ranked web search results with advanced filtering and real-time data.

Agent API

Agent API

Access third-party models with web search tools and presets.