Reference · Tools

Perplexity

AI-powered answer engine that provides accurate, trusted, and real-time answers to any question with web citations

Action Utility v1

The Perplexity node sends a chat completion request to Perplexity's answer engine and returns an answer grounded in live web sources, complete with citations. A typical build is running a research question on a schedule and posting the answer with its sources for a human to verify.

Node type
Action
Parameters
7
Outputs
Output, Error
Credentials
Perplexity API

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

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Perplexity API credentials. See the Credentials Guide for setup instructions.

Operations

OperationValueDescription
Message a ModelcompleteCreate one or more completions for a given text

Parameters

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

ParameterTypeRequiredDefaultDescription
ModeloptionsYessonarThe 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
MessagesfixedCollectionYesone empty user messageAny optional system messages must be sent first, followed by alternating user and assistant messages. Add one entry per turn.
— TextstringNoThe content of the message to be sent. Supports expressions like {{ $json.question }}.
— RoleoptionsYesuserRole 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 OutputbooleanNofalseWhether to return only essential fields (ID, citations, message) instead of the full API response.
OptionscollectionNo{}Additional options for the chat completion request. Add only the ones you need.
— Frequency PenaltynumberNo0Values 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 TokensnumberNo1The 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)numberNo0.2The 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 KnumberNo0The 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 PnumberNo0.9The 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 PenaltynumberNo0A 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 ImagesbooleanNofalseWhether or not the request should return images. Requires Perplexity API usage Tier-2.
— Return Related QuestionsbooleanNofalseWhether or not the request should return related questions. Requires Perplexity API usage Tier-2.
— Search Domain FilterstringNoLimit 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 FilteroptionsNomonthReturns search results within the specified time interval.
Options: day, hour, month, week
Max ConcurrencynumberNo10Maximum 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 OutputMerged 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.
trueFour 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:

{
  "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:

{
  "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:

{
  "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:

{
  "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

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes 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.

Frequently asked questions

Does message order matter?

Yes, and it is enforced by the API. Any system message must come first, followed by strictly alternating user and assistant messages. A malformed sequence returns an API error rather than being silently corrected.

Why do some of my option values seem to have no effect?

Numeric options are only sent when they differ from the default shown in the table. Re-typing the default value has no effect because the node omits it from the request.

What makes this different from a standard chat model?

The answers are grounded in live web sources and come with citations, so it suits questions where currency and verifiability matter more than raw generation quality.

Which credential does it need?

A Perplexity API credential.

Build with the Perplexity node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Perplexity API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.