<!-- BusyBot node reference — https://busybot.net/tools/perplexity/ -->

> Node: Perplexity (`perplexity`) · Action · v1
> Category: Utility · Credentials: Perplexity API (`perplexityApi`)
> Updated: 2026-08-16

# Perplexity

> AI-powered answer engine with real-time web citations

## Overview

Perplexity is an AI-powered answer engine that generates responses grounded in real-time web search. This tool sends chat completion requests to the Perplexity API and returns AI-generated answers with source citations. It supports multiple models (Sonar, Sonar Pro, Sonar Deep Research, Sonar Reasoning, Sonar Reasoning Pro), configurable parameters like temperature, top_k, top_p, and frequency/presence penalties, and search-specific options like domain filtering and recency filtering. Responses include citations from web sources used to generate the answer.

**Category:** Utility  
**Tool Name:** `perplexity`  
**Version:** 1

**Appearance:** Icon: `lucide-Brain` | Color: `#1FB8CD`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Perplexity API** credentials.
See the [Credentials Guide](https://busybot.net/credentials/perplexity-api/) for setup instructions.

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Message a Model | `complete` | Create one or more completions for a given text |

### Parameters

The node has a single operation, so every parameter below is always visible.

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Model | `options` | Yes | `sonar` | The model which will generate the completion. See https://docs.perplexity.ai/guides/model-cards for details. |
| | | | | Options: `sonar`, `sonar-deep-research`, `sonar-pro`, `sonar-reasoning`, `sonar-reasoning-pro` |
| Messages | `fixedCollection` | Yes | one empty `user` message | Any optional system messages must be sent first, followed by alternating user and assistant messages. Add one entry per turn. |
| — Text | `string` | No | — | The content of the message to be sent. Supports expressions like {{ $json.question }}. |
| — Role | `options` | Yes | `user` | Role in shaping the model's response. It tells the model how it should behave and interact with the user. |
| | | | | Options: `assistant` (adopt a specific tone or personality; must alternate with user messages), `system` (set the model's behavior or context; must come before user and assistant messages), `user` (send a message as a user and get a response) |
| Simplify Output | `boolean` | No | `false` | Whether to return only essential fields (ID, citations, message) instead of the full API response. |
| Options | `collection` | No | `{}` | Additional options for the chat completion request. Add only the ones you need. |
| — Frequency Penalty | `number` | No | `0` | Values greater than 1.0 penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. |
| — Maximum Number of Tokens | `number` | No | `1` | The maximum number of tokens to generate in the completion. The number of tokens requested plus the number of prompt tokens sent in messages must not exceed the context window token limit of the model requested. |
| — Output Randomness (Temperature) | `number` | No | `0.2` | The amount of randomness in the response, valued between 0 inclusive and 2 exclusive. Higher values are more random, and lower values are more deterministic. |
| — Top K | `number` | No | `0` | The number of tokens to keep for highest Top K filtering, specified as an integer between 0 and 2048 inclusive. If set to 0, Top K filtering is disabled. We recommend either altering Top K or Top P, but not both. |
| — Top P | `number` | No | `0.9` | The nucleus sampling threshold, valued between 0 and 1 inclusive. For each subsequent token, the model considers the results of the tokens with Top P probability mass. We recommend either altering Top K or Top P, but not both. |
| — Presence Penalty | `number` | No | `0` | A value between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. |
| — Return Images | `boolean` | No | `false` | Whether or not the request should return images. Requires Perplexity API usage Tier-2. |
| — Return Related Questions | `boolean` | No | `false` | Whether or not the request should return related questions. Requires Perplexity API usage Tier-2. |
| — Search Domain Filter | `string` | No | — | Limit the citations used by the online model to URLs from the specified domains. For blacklisting, add a "-" to the beginning of the domain string. Comma-separated, currently limited to 3 domains. Requires Perplexity API usage Tier-3. |
| — Search Recency Filter | `options` | No | `month` | Returns search results within the specified time interval. |
| | | | | Options: `day`, `hour`, `month`, `week` |
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

An AI-generated answer with citations from the web sources used to produce it. The response is **merged onto the input item JSON** — the incoming fields pass through unchanged, and binary data is forwarded. **One output item per input item**; the node never fans out.

What gets merged depends on **Simplify Output**:

| Simplify Output | Merged onto the item |
|-----------------|----------------------|
| `false` (default) | The full Perplexity chat-completion response, including the `choices` array (the answer is at `choices[0].message.content`) and the `citations` array. |
| `true` | Four fields only — `id`, `created`, `citations` and `message`, where `message` is the answer text lifted out of the first choice and `citations` defaults to an empty array. |

Reference the result downstream by expression — `{{ $json.message }}` with Simplify Output on, or `{{ $json.choices[0].message.content }}` with it off.

## Usage Examples

- Ask Perplexity a question and get an AI-generated answer with sources
- Generate a research summary using Sonar Deep Research model
- Query Perplexity with domain-filtered search for specific websites
- Use Sonar Reasoning for step-by-step analytical answers

## Example Configuration

Ask a question that comes in on the item and get a clean, easy-to-consume answer:

```json
{
  "type": "perplexity",
  "parameters": {
    "operation": "complete",
    "model": "sonar",
    "messages": {
      "message": [
        {
          "role": "user",
          "content": "{{ $json.question }}"
        }
      ]
    },
    "simplify": true
  }
}
```

Steer the answer with a system message and cap the length:

```json
{
  "type": "perplexity",
  "parameters": {
    "operation": "complete",
    "model": "sonar-pro",
    "messages": {
      "message": [
        {
          "role": "system",
          "content": "Answer in three bullet points. Always cite sources."
        },
        {
          "role": "user",
          "content": "Explain the latest developments in quantum computing"
        }
      ]
    },
    "simplify": true,
    "options": {
      "temperature": 0.7,
      "maxTokens": 500,
      "returnRelatedQuestions": true,
      "searchRecency": "week"
    }
  }
}
```

Research query restricted to a few trusted domains and to recent sources:

```json
{
  "type": "perplexity",
  "parameters": {
    "operation": "complete",
    "model": "sonar-deep-research",
    "messages": {
      "message": [
        {
          "role": "user",
          "content": "What are the environmental impacts of electric vehicle adoption in {{ $json.year }}?"
        }
      ]
    },
    "options": {
      "temperature": 0.3,
      "maxTokens": 1000,
      "searchDomainFilter": "edu,gov,org",
      "searchRecency": "month",
      "returnRelatedQuestions": true
    }
  }
}
```

Reasoning model for a comparative analysis, throttled for a batch of items:

```json
{
  "type": "perplexity",
  "parameters": {
    "operation": "complete",
    "model": "sonar-reasoning-pro",
    "messages": {
      "message": [
        {
          "role": "user",
          "content": "Compare the pros and cons of different renewable energy sources for {{ $json.city }}"
        }
      ]
    },
    "options": {
      "temperature": 0.4,
      "maxTokens": 1200
    },
    "maxConcurrency": 3
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Send chat completion requests to the Perplexity AI search engine and receive AI-generated answers with web citations.

### Behavior notes

- **Message order is enforced by the API.** Any system message must come first, followed by strictly alternating user and assistant messages. A malformed sequence comes back as an API error, not a silent correction.
- **Numeric options are only sent when they differ from the default shown in the table.** Re-typing the default value has no effect — most importantly, leaving **Maximum Number of Tokens** at `1` does *not* cap the answer at one token, it simply omits the limit.
- **Some options need a paid usage tier.** Return Images and Return Related Questions require Tier-2; Search Domain Filter requires Tier-3. On a lower tier the request is rejected by the API.
- **Search Domain Filter takes a comma-separated list**, currently limited to 3 domains, and a leading `-` turns an entry into an exclusion.

### Choosing a model

- `sonar` — fast, general-purpose lookups.
- `sonar-pro` — longer, better-sourced answers for professional use.
- `sonar-deep-research` — multi-step research reports; the slowest and most expensive option.
- `sonar-reasoning` / `sonar-reasoning-pro` — step-by-step analytical answers where the chain of reasoning matters.