This query returns a conversational, web-grounded answer from Perplexity, along with the web sources it cited, for the question you provide.
Developer info
API endpoint slug
perplexity.ask_perplexity
Runtime method
performQuery("perplexity.ask_perplexity"}
Query fields
Question Text input > Long text
Label
Question
Helper text
What you want to ask Perplexity. Perplexity answers in plain language and searches the web in real time to ground its answer.
Slug
question
Required
true
Can have default value
true
Model Dropdown list
Label
Model
Helper text
Which Perplexity model answers your question. Sonar is fast and economical; Sonar Pro gives more thorough, higher-quality answers; Sonar Reasoning Pro adds step-by-step reasoning.
Slug
model
Required
true
Can have default value
true
System prompt Text input
Label
System prompt
Helper text
Optional instructions that shape how Perplexity answers — tone, format, or persona (e.g. "Answer in one short paragraph"). Leave blank for a default helpful-assistant answer.
Slug
system_prompt
Required
false
Can have default value
true
Search recency Dropdown list
Label
Search recency
Helper text
Optionally restrict the web search behind the answer to recent results. Leave blank to search across all time.
Slug
search_recency
Required
false
Can have default value
true
Max tokens Text input > Other
Label
Max tokens
Helper text
Optionally cap the length of the answer, measured in tokens. Leave blank to let Perplexity choose.
Slug
max_tokens
Required
false
Can have default value
true
Ingredients
Answer
The conversational, web-grounded answer Perplexity generated for your question.
Slug
answer
Filter
Perplexity.askPerplexity.Answer
Type
String
Example
The James Webb Space Telescope launched on December 25, 2021.
Sources
A newline-separated list of the web source URLs Perplexity cited for the answer.