Skip to main content
POST
Monitor Perplexity Responses

Overview

The Perplexity endpoint extracts structured data from Perplexity AI with real-time web sources. Beyond basic text responses, it automatically detects and extracts data objects including shopping products, media content, travel information, and location data based on query intent.
Web search enabledThis endpoint uses Perplexity’s default interface, which always performs web searches for all requests to provide real-time information with source citations.
The endpoint automatically detects different types of queries:

Request parameters

Uses common parameters. Endpoint-specific options:
  • include.rawResponse (boolean): Include raw streaming response events. Defaults to false

Response objects

The response includes the following sections. See each subpage for the full schema and examples.
SectionDescription
SourcesSource citations referenced in the response
Shopping cardsProduct cards with pricing, ratings, and offers
MediaVideos and images relevant to the query
Travel and placesHotels and places when travel intent is detected

Response schema

Includes common response fields plus:

Core response fields

FieldTypeDescription
result.textstringPerplexity’s response text
result.htmlstringResponse formatted in HTML (included when include.html is true)
result.sourcesarrayArray of sources referenced in the response
result.markdownstringResponse formatted in Markdown (included when include.markdown is true)
result.rawResponsearrayArray of Perplexity’s streamed response events (included when include.rawResponse is true)
result.shopping_cardsarrayShopping cards when shopping intent detected
result.videosarrayVideos relevant to the query
result.imagesarrayImages relevant to the query
result.hotelsarrayHotels when travel intent detected
result.placesarrayPlaces when location intent detected

Additional response data

FieldTypeDescription
result.related_queriesarraySuggested follow-up search queries
result.search_model_queriesarrayInternal search queries (fan-outs) used to generate response
Each search model query (fan-out) includes:
FieldTypeDescription
querystringActual search query used
enginestringSearch engine type (“web”, etc.)
limitnumberResult limit (typically 8)

Common questions

I’m getting 500 errors on certain prompts. What’s happening?

Perplexity occasionally classifies certain queries as “personal search” (queries with location context, first-person phrasing, or user-specific intent) and returns a 500 error. Mitigations:
  1. Remove in-prompt location injections — use the country request parameter instead of writing location into the prompt.
  2. Append "This is not a personal search." to affected prompts (reduces but does not eliminate failures; may slightly affect response quality).
  3. Build retry logic: Perplexity already retries internally 5–10 times, so persistent 500s after retries indicate a genuine personal-search classification.

How common are Perplexity shopping cards?

result.shopping_cards appear in fewer than 1 in 1,000 Perplexity responses (approximately 0.1% as of May 2026, compared to ~3.5% for ChatGPT and ~11% for Copilot). Do not build a workflow that depends on Perplexity returning shopping data.

I see [cite ] text in the response. Is that a bug?

No. Approximately 1% of Perplexity responses contain [cite ] placeholder text in result.text and result.markdown. This is an upstream Perplexity behavior — the platform occasionally emits a citation marker that doesn’t resolve to a URL. Strip or ignore [cite ] tokens in your post-processing.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request parameters for monitoring Perplexity responses

prompt
string
required

The prompt to send to Perplexity

Required string length: 1 - 10000
Example:

"What are the best laptops for programming?"

country
string
required

Country/region code for localized response

Example:

"US"

include
object

Optional flags for including additional response formats

state
string

State code for sub-country geo-targeting (e.g., "CA"). Only valid with country "US".

Required string length: 2
Pattern: ^[A-Z]{2}$
Example:

"CA"

Response

successful Perplexity monitoring response

success
boolean
required
Example:

true

result
object
required

Perplexity response data