Perplexity

Use Perplexity to generate chat responses with web citations or search the web with filtering. Pass the returned content and source references to downstream blocks as needed.

Usage Instructions

Integrate Perplexity into the workflow. Can generate completions using Perplexity AI chat models or perform web searches with advanced filtering.

Actions

Perplexity Chat

Generate completions using Perplexity AI chat models

Input

ParameterTypeRequiredDescription
systemPromptstringNoSystem prompt to guide the model behavior
contentstringYesThe user message content to send to the model
modelstringYesModel to use for chat completions (e.g., "sonar", "sonar-pro", "sonar-reasoning")
max_tokensnumberNoMaximum number of tokens to generate (e.g., 1024, 2048, 4096)
temperaturenumberNoSampling temperature between 0 and 1 (e.g., 0.0 for deterministic, 0.7 for creative)
apiKeystringYesPerplexity API key

Output

ParameterTypeDescription
contentstringGenerated text content
modelstringModel used for generation
usageobjectToken usage information
prompt_tokensnumberNumber of tokens in the prompt
completion_tokensnumberNumber of tokens in the completion
total_tokensnumberTotal number of tokens used

Get ranked search results from Perplexity's continuously refreshed index with advanced filtering and customization options

Input

ParameterTypeRequiredDescription
querystringYesA search query or array of queries (max 5 for multi-query search)
max_resultsnumberNoMaximum number of search results to return (1-20, default: 10)
search_domain_filterarrayNoList of domains/URLs to limit search results to (e.g., ["github.com", "stackoverflow.com"], max 20)
max_tokens_per_pagenumberNoMaximum number of tokens retrieved from each webpage (default: 1024)
countrystringNoCountry code to filter search results (e.g., US, GB, DE)
search_recency_filterstringNoFilter results by recency (e.g., "hour", "day", "week", "month", "year")
search_after_datestringNoInclude only content published after this date (format: MM/DD/YYYY)
search_before_datestringNoInclude only content published before this date (format: MM/DD/YYYY)
apiKeystringYesPerplexity API key

Output

ParameterTypeDescription
resultsarrayArray of search results
titlestringTitle of the search result
urlstringURL of the search result
snippetstringBrief excerpt or summary of the content
datestringDate the page was crawled and added to Perplexity's index
last_updatedstringDate the page was last updated in Perplexity's index