---
title: "Track Perplexity answers"
method: POST
path: "/v1/monitor/perplexity"
---

# Track Perplexity answers

`POST /v1/monitor/perplexity`

## Request

- Base URL: `https://api.answerline.dev`
- URL: `https://api.answerline.dev/v1/monitor/perplexity`
- Auth: HTTP bearer

Get structured output from Perplexity AI on your brand, your products or any other topic, in many regions

## Request body

- PerplexityMonitorRequest
  - `prompt` string, required: Prompt submitted to Perplexity
  - `country` string, required: Code of the country or region used to localize the response
  - `include` object: Flags that add extra output formats to the response (optional)
    - `html` boolean: Return a link to the complete HTML of the response
    - `markdown` boolean: Add a markdown version of the response to the result
    - `rawResponse` boolean: Return the answer as normalized stream events. For the engine's answer as received, use `include.rawWire`.
    - `rawWire` boolean: Return the engine's upstream answer as received in result.rawWire: the answer stream, or the provider's answer record, without the provider's billing data and account traces. Free. See https://answerline.dev/docs/output-formats#raw-wire
  - `state` string: State code for targeting below the country level (e.g., "CA"; "DC" included). Allowed only when country is "US". Served for Gemini; on a model that cannot place a state yet, a request that includes it is rejected as a validation error and is not charged.

## Response `200`

Perplexity monitoring result (success)

- PerplexityMonitorResponse
  - `success` boolean, required
  - `result` object, required: Data returned by Perplexity
    - `text` string: Text of Perplexity's answer
    - `html` string, uri: Link to the response's complete HTML.
    - `sources` object[]: Sources the response cites
      - `position` number: Where the source sits in the response, as an index
      - `url` string: Link to the source
      - `label` string: Label shown for this source
      - `description` string: Text describing what the source contains
    - `citationPills` object[]: Citation pills that appear inline in the Perplexity answer. Every element pairs one pill with one source: a pill backed by N sources (bracketed groups like Perplexity's `[1][2][3]`) yields N elements with the same `citationPillId`, each holding that source's own `label`, `url` and `domain`. Grouping by `citationPillId` rebuilds the pills. Not present in `result` if the answer has no pills.
      - `label` string, required: Title of this individual source as shown in the sources rail (for instance `"Best Programming Laptops 2026 — TechCrunch"`). Never missing, but can be an empty string if the rail gives no title for it — in that case identify the source by `domain` / `url`. Entries that share a `citationPillId` each have their own per-source label.
      - `citationPillId` integer, required: One-based number common to every entry that comes from one chip. Grouping on `citationPillId` rebuilds the chip as displayed; each entry's `label` is specific to its source, so it varies inside a chip.
      - `url` string, required: Link straight to the cited source.
      - `domain` string, required: Hostname taken from `url`, useful for grouping and display.
      - `description` string: Source snippet shown in the sources rail, if Perplexity supplies one; otherwise omitted.
      - `position` integer, required: Index of this source within the sibling `result.sources` array, starting at 1.
    - `markdown` string: Perplexity's answer rendered as Markdown (present when include.markdown is true)
    - `related_queries` string[]: Suggested searches to follow up with
    - `videos` MediaItem[]: Videos that appear in the response
      - `title` string: Media title
      - `url` string: Media URL
      - `thumbnail` string: Thumbnail URL
      - `medium` 'video' | 'image' | 'map': Media type
      - `source` string: Source platform
      - `image_width` number: Width of the original image
      - `image_height` number: Height of the original image
      - `thumbnail_width` number: Thumbnail width
      - `thumbnail_height` number: Thumbnail height
    - `images` MediaItem[]: Image found in the response
      - `title` string: Media title
      - `url` string: Media URL
      - `thumbnail` string: Thumbnail URL
      - `medium` 'video' | 'image' | 'map': Media type
      - `source` string: Source platform
      - `image_width` number: Width of the original image
      - `image_height` number: Height of the original image
      - `thumbnail_width` number: Thumbnail width
      - `thumbnail_height` number: Thumbnail height
    - `hotels` HotelItem[]: Hotels listed when the query shows travel intent
      - `name` string: Hotel name
      - `url` string: URL of the hotel's page
      - `rating` number: Rating of the hotel, from 0 to 5
      - `num_reviews` number: Review count
      - `address` string[]: Address lines
      - `phone` string: Phone number
      - `description` string: Hotel description
      - `image_url` string: URL of the hotel's primary image
      - `images` string[]: URLs of further hotel photos
      - `lat` number: Latitude
      - `lng` number: Longitude
      - `price_level` string: Indicator of the price tier
      - `categories` string[]: Hotel categories
    - `places` PlaceItem[]: Places and locations in general
      - `name` string: Place name
      - `url` string: URL of the place's page
      - `rating` number: Rating of the place (0-5)
      - `address` string[]: Address lines
      - `lat` number: Latitude
      - `lng` number: Longitude
      - `categories` string[]: Place categories
      - `map_url` string: Map URL
      - `images` string[]: Image URLs for the place
    - `shopping_cards` object[]: Product cards for shopping with full product details (present when the query shows shopping intent)
      - `tags` string[]: Category tags on the shopping card, if any
      - `products` object[]: List of products
        - `title` string: Product name
        - `id` string: Product identifier
        - `url` string: URL of the product page
        - `price` string: Current price
        - `merchant` string: Merchant name
        - `available` boolean: True if the product is available right now
        - `imageUrls` string[]: URLs of the product images
        - `numReviews` number: Review count (0 if there are none)
        - `offers` object[]: Per-merchant shopping offers
          - `url` string: Offer link including Perplexity referral parameters
          - `price` string: Offer price
          - `merchant_name` string: Merchant name
          - `product_name` string: Product title as given by the merchant
          - `available` boolean: True if this offer currently has stock
          - `price_details` object: Itemized breakdown of the price
            - `display_price` string: Price formatted for display
          - `original_price` string, nullable: Pre-discount price; null if the item isn't on sale
        - `position` integer: Rank starting at 1, counted over every product in every shopping card of the response (one continuous sequence that does not restart for each card)
        - `rating` number: Rating of the product, on a 0-5 scale
        - `original_price` string, nullable: Pre-discount price; null if the item isn't on sale
        - `description` string: Product description
        - `variants` object[]: Variants of the product (e.g. size or color)
    - `search_model_queries` string[]: Search queries the engine ran internally to build the response
    - `rawResponse` unknown[]: Unprocessed stream from the upstream provider, recorded while the request ran. Every item is a single chunk of the engine's raw response. The format varies by engine, is not documented and can change at any time without warning; use it to debug or to read data not yet exposed by the structured fields above.
      - unknown

## Other responses

- `400`: Bad Request - the request failed validation
- `401`: Unauthorized - authentication failed
- `403`: Forbidden - missing permissions or not enough balance
- `404`: Not Found - No such route
- `409`: Conflict - the resource is in a conflicting state
- `429`: Too Many Requests - the request went over a rate limit or concurrency limit, or the service dropped the request because it was overloaded (`SERVICE_OVERLOADED`); that case returns `Retry-After` without any limit headers
- `499`: Client Closed Request - the client cancelled the request
- `500`: Internal Server Error
- `502`: Bad Gateway - an upstream service failed

---

[API](https://skmtc.dev/answerline/apis/answerline-api.md) · [All operations](https://skmtc.dev/answerline/apis/answerline-api/llms.txt) · [OpenAPI document](https://skmtc.dev/answerline/apis/answerline-api/revisions/a9dc35794662?raw)
