Integrations / Perplexity
Perplexity
Web-grounded AI answers and a raw web search API.
3 actions
API key
3 read0 write
Calls api.perplexity.ai
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "perplexity" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
This toolkit uses a single credential and requests no scopes.
Actions
Ask with web searchreadperplexity.askAsk Perplexity's Agent API a question and get a web-grounded answer (Agent API with a preset; replaces Sonar chat completions).
| Input | Type | Description | |
|---|---|---|---|
input | string | Required | The question or prompt |
preset | string | Required | Task intensity |
instructions | string | Optional | Guidance for the model's behaviour |
await setu.execute({
userId: "user_1",
action: "perplexity.ask",
input: {
"input": "<input>",
"preset": "<preset>"
},
});Search the webreadperplexity.searchRun a raw web search and get ranked results with titles, URLs and snippets (no generated answer).
| Input | Type | Description | |
|---|---|---|---|
query | string | Required | The search query |
max_results | integer | Optional | Number of results, 1 to 50 (default 10) |
search_type | string | Optional | Search type |
country | string | Optional | ISO 3166-1 alpha-2 country code |
search_domain_filter | array of string | Optional | Up to 20 domains to restrict to |
search_recency_filter | string | Optional | Only results from this period |
await setu.execute({
userId: "user_1",
action: "perplexity.search",
input: {
"query": "<query>"
},
});Chat with Sonarreadperplexity.sonar_chatLegacy Sonar chat completion with web search. Perplexity says Sonar chat completions ended on 2026-09-27 and are being rerouted to the Agent API; prefer ask.
| Input | Type | Description | |
|---|---|---|---|
model | string | Required | Sonar model, e.g. sonar |
prompt | string | Required | The user message |
await setu.execute({
userId: "user_1",
action: "perplexity.sonar_chat",
input: {
"model": "<model>",
"prompt": "<prompt>"
},
});