Perplexity
connector.perplexity · ai
Web-grounded answers from the Perplexity Agent API and ranked web results from the Search API.
Vendor API documentation: https://docs.perplexity.ai
Authentication
| Method | Credential kind | Auth kind | Fields | Test request |
|---|---|---|---|---|
| API key | perplexity/api_key | bearer | token (secret) | yes |
Actions
Node type connector.perplexity. Choose a resource and an operation; each operation has its own parameters.
Agent response
Research answers that search the web and cite their sources.
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Ask a question | agent.ask | writes | 3 | |
| Get a response | agent.get | reads | 1 | |
| Cancel a background response | agent.cancel | writes | 1 |
Ask a question
Operation agent.ask. Sends a prompt to the Agent API and returns the answer with its sources.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
input | string | yes | Prompt. The question or task for the agent. | ||
effort | options | "fast" | Preset that trades speed for depth of research. One of fast, low, medium, high, xhigh. | ||
model | string | Model override. Run a specific model instead of an effort preset. Leave empty to use the preset. | |||
instructions | string | System guidance applied to the whole response. | |||
search | collection | Web search. | |||
search.domain_filter | string | Domains. Comma-separated domains to search. Prefix a domain with - to exclude it. | |||
search.recency | options | Published within. One of hour, day, week, month, year. | |||
search.after_date | string | Published after (MM/DD/YYYY). | |||
search.before_date | string | Published before (MM/DD/YYYY). | |||
search.max_results | number | 1 to 50. | |||
search.country | string | User country (ISO code). | |||
include_images | boolean | false | Include image results. | ||
options | collection | ||||
options.max_output_tokens | number | ||||
options.temperature | number | 0 to 2. Ignored by some models. | |||
options.top_p | number | Top P. | |||
options.language_preference | string | Response language (ISO 639-1). | |||
options.previous_response_id | string | Continue from response ID. | |||
options.json_schema | json | Structured output schema. JSON Schema the answer must follow. | |||
options.background | boolean | false | Run in background. Return immediately with a queued response; fetch the result later with Get a response. | ||
simplify | boolean | true | Simplify output. Return only the answer text, sources and usage. |
Get a response
Operation agent.get. Fetches a response by ID, for example one started in the background.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
response_id | string | yes | Response ID. | ||
simplify | boolean | true | Simplify output. |
Cancel a background response
Operation agent.cancel.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
response_id | string | yes | Response ID. |
Chat
Message-list chat interface kept for workflows built against the retired Sonar chat completions API.
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Send chat messages | chat.complete | writes | 1 |
Send chat messages
Operation chat.complete. Sends a list of messages and returns the answer. Sonar model names are translated to Agent API effort presets (sonar and sonar-pro to fast, sonar-reasoning-pro to low, sonar-deep-research to high).
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
model | options | "sonar" | One of sonar, sonar-pro, sonar-reasoning, sonar-reasoning-pro, sonar-deep-research. | ||
messages | fixed_collection | yes | |||
messages.role | options | "user" | One of system, user, assistant. | ||
messages.content | string | yes | |||
options | collection | ||||
options.max_tokens | number | ||||
options.temperature | number | ||||
options.top_p | number | Top P. | |||
options.search_domain_filter | string | Domains. Comma-separated domains; prefix with - to exclude. | |||
options.search_recency_filter | options | Published within. One of hour, day, week, month, year. | |||
options.return_images | boolean | false | |||
simplify | boolean | true | Simplify output. Return the answer text and sources only. |
Web search
Ranked web results without an LLM answer.
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Search the web | search.query | reads | 2 |
Search the web
Operation search.query.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
query | string | yes | Up to 5 queries can be sent as a comma-separated list when Multiple queries is on. | ||
multiple_queries | boolean | false | Split the query on commas and run each one. | ||
max_results | number | 10 | 1 to 20 (up to 50 for people search). | ||
search_type | options | "web" | One of web, fast, people. | ||
filters | collection | ||||
filters.country | string | Country (ISO 3166-1 alpha-2). | |||
filters.languages | string | Languages (comma-separated ISO 639-1). | |||
filters.domains | string | Comma-separated; prefix with - to exclude. | |||
filters.recency | options | Published within. One of hour, day, week, month, year. | |||
filters.after_date | string | Published after (MM/DD/YYYY). | |||
filters.before_date | string | Published before (MM/DD/YYYY). | |||
filters.updated_after | string | Updated after (MM/DD/YYYY). | |||
filters.updated_before | string | Updated before (MM/DD/YYYY). | |||
filters.snapshot_as_of | datetime | Snapshot as of (RFC 3339). |
Import
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.
| Source type | Version range | Status | Fixtures |
|---|---|---|---|
n8n-nodes-base.perplexity | >=1 <2 | unverified |
Provenance
Written from the vendor’s documentation:
- https://docs.perplexity.ai/api-reference/agent-post.md
- https://docs.perplexity.ai/docs/agent-api/background-mode.md
- https://docs.perplexity.ai/docs/agent-api/migrate-from-sonar/how-to.md
- https://docs.perplexity.ai/api-reference/chat-completions
- https://docs.perplexity.ai/api-reference/search-post.md
- https://docs.perplexity.ai/guides/search-quickstart