Skip to main content
POST
/
v1
/
monitor
/
perplexity
Monitor Perplexity Responses
curl --request POST \
  --url https://api.cloro.dev/v1/monitor/perplexity \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "What are the best laptops for programming?",
  "country": "US",
  "include": {
    "markdown": false
  }
}
'
{
  "success": true,
  "result": {
    "text": "Based on current sources and information, here are the best laptops for programming...",
    "html": "https://storage.cloro.dev/results/c45a5081-808d-4ed3-9c86-e4baf16c8ab8/page-1.html",
    "sources": [
      {
        "position": 1,
        "url": "https://techcrunch.com/laptops",
        "label": "TechCrunch",
        "description": "Latest laptop reviews and recommendations"
      }
    ],
    "markdown": "Based on current sources and information, here are the best laptops for programming...",
    "related_queries": [
      "best neighborhoods to stay in Lisbon",
      "top-rated luxury hotels in Lisbon under €300",
      "highest-rated traditional Portuguese restaurants in Baixa"
    ],
    "videos": [
      {
        "title": "Best hotels in Lisbon, reviewed | The Independent",
        "url": "https://www.independent.co.uk/travel/europe/portugal/lisbon/best-lisbon-portugal-hotels-b1987832.html",
        "thumbnail": "https://d2u1z1lopyfwlx.cloudfront.net/thumbnails/636fbd12-6dee-5f44-a76d-fe7f9cd20e40/75ce41cb-6767-5082-a330-ee97c5866886.jpg",
        "medium": "image",
        "source": "web",
        "image_width": 5600,
        "image_height": 3733,
        "thumbnail_width": 300,
        "thumbnail_height": 200
      }
    ],
    "images": [
      {
        "title": "Best hotels in Lisbon, reviewed | The Independent",
        "url": "https://www.independent.co.uk/travel/europe/portugal/lisbon/best-lisbon-portugal-hotels-b1987832.html",
        "thumbnail": "https://d2u1z1lopyfwlx.cloudfront.net/thumbnails/636fbd12-6dee-5f44-a76d-fe7f9cd20e40/75ce41cb-6767-5082-a330-ee97c5866886.jpg",
        "medium": "image",
        "source": "web",
        "image_width": 5600,
        "image_height": 3733,
        "thumbnail_width": 300,
        "thumbnail_height": 200
      }
    ],
    "hotels": [
      {
        "name": "Corpo Santo Lisbon Historical Hotel",
        "url": "https://www.tripadvisor.com/Hotel_Review-g189158-d12659702-Reviews-Corpo_Santo_Lisbon_Historical_Hotel-Lisbon_District_Central_Portugal.html",
        "rating": 4.9,
        "num_reviews": 4374,
        "address": [
          "Largo do Corpo Santo, 25, Lisbon 1200-129 Portugal"
        ],
        "phone": "+351 21 828 8000",
        "description": "Located next to the riverside area, in one of the prime areas of the Lisbon Center...",
        "image_url": "https://media-cdn.tripadvisor.com/media/photo-o/30/28/6c/86/caption.jpg",
        "images": [
          "<string>"
        ],
        "lat": 38.707397,
        "lng": -9.142318,
        "price_level": "<string>",
        "categories": [
          "Hotel"
        ]
      }
    ],
    "places": [
      {
        "name": "Floresta Das Escadinhas",
        "url": "https://www.tripadvisor.com/Restaurant_Review-g189158-d1520116-Reviews-Floresta_Das_Escadinhas-Lisbon_District_Central_Portugal.html",
        "rating": 4.8,
        "address": [
          "Rua de Santa Justa N°3, Lisbon 1100-483 Portugal"
        ],
        "lat": 38.712717,
        "lng": -9.136362,
        "categories": [
          "Healthy",
          "Grill",
          "Barbecue",
          "Mediterranean",
          "Portuguese",
          "European"
        ],
        "map_url": "https://google.com/maps/?q=find+best+hotels+and+restaurants+in+lisbon&ll=38.720914,-9.147162&z=15",
        "images": [
          "<string>"
        ]
      }
    ],
    "shopping_cards": [
      {
        "products": [
          {
            "title": "adidas Grand Court Lo",
            "url": "https://example.com/product/adidas-grand-court-lo",
            "description": "Classic sneaker with modern comfort features",
            "price": "$79.99",
            "original_price": "$99.99",
            "rating": 4.5,
            "numReviews": 234,
            "imageUrls": [
              "<string>"
            ],
            "merchant": "adidas",
            "id": "prod_12345",
            "variants": [
              {}
            ],
            "offers": [
              {
                "merchant": "Amazon",
                "price": "$79.99",
                "original_price": "$99.99",
                "availability": "In Stock",
                "url": "https://amazon.com/dp/B123456789",
                "shipping_cost": "$5.99",
                "tax": "$6.40",
                "total": "$92.38"
              }
            ]
          }
        ],
        "tags": [
          "electronics",
          "gadgets"
        ]
      }
    ],
    "search_model_queries": [
      {
        "query": "find best hotels and restaurants in lisbon",
        "engine": "web",
        "limit": 8
      }
    ]
  }
}

Overview

The Perplexity endpoint extracts comprehensive structured data from Perplexity AI with real-time web sources. Beyond basic text responses, it automatically detects and extracts rich data objects including shopping products, media content, travel information, and location data based on query intent. The endpoint automatically detects different types of queries:
  • Shopping queries: Product information, pricing, and shopping cards
  • Travel queries: Hotel listings, places, and location data
  • Media queries: Videos and images relevant to the search
  • General queries: Standard web search with sources and citations

Request parameters

Uses common parameters.

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 web sources referenced in the response
result.markdownstringResponse formatted in Markdown (included when include.markdown is true)

Shopping cards (when shopping intent detected)

FieldTypeDescription
result.shopping_cardsarrayShopping product cards with detailed product information
Each shopping card contains:
FieldTypeDescription
productsarrayArray of product objects
tagsarrayOptional category tags
Each product object includes:
FieldTypeDescription
titlestringProduct name
urlstringProduct page URL
descriptionstringProduct description
pricestringCurrent price
original_pricestringOriginal price before discount
ratingnumberProduct rating (0-5)
numReviewsnumberNumber of reviews
imageUrlsarrayProduct image URLs
merchantstringMerchant name
idanyProduct identifier
variantsarrayProduct variants (size, color, etc.)
offersarrayShopping offers with pricing details

Media content (videos and images)

FieldTypeDescription
result.videosarrayVideo content found in response
result.imagesarrayImage content found in response
Each media item includes:
FieldTypeDescription
titlestringMedia title
urlstringMedia URL
thumbnailstringThumbnail URL
mediumstringMedia type (“video”, “image”)
sourcestringSource platform (“youtube”, “stock_photo”, etc.)
image_widthnumberOriginal image width
image_heightnumberOriginal image height
thumbnail_widthnumberThumbnail width
thumbnail_heightnumberThumbnail height

Travel and location data

FieldTypeDescription
result.hotelsarrayHotel listings (when travel intent detected)
result.placesarrayGeneral places and locations
Each hotel item includes:
FieldTypeDescription
namestringHotel name
urlstringHotel page URL
ratingnumberHotel rating (0-5)
num_reviewsnumberNumber of reviews
addressarrayAddress lines
phonestringPhone number
descriptionstringHotel description
image_urlstringMain hotel image URL
imagesarrayAdditional hotel image URLs
latnumberLatitude
lngnumberLongitude
price_levelstringPrice level indicator
categoriesarrayHotel categories
Each place item includes:
FieldTypeDescription
namestringPlace name
urlstringPlace page URL
addressarrayAddress lines
ratingnumberPlace rating (0-5)
latnumberLatitude
lngnumberLongitude
categoriesarrayPlace categories
map_urlstringMap URL
imagesarrayPlace image URLs

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)

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
default:US

Optional country/region code for localized monitoring

Example:

"US"

include
object

Optional flags for including additional response formats

Response

successful Perplexity monitoring response

success
boolean
required
Example:

true

result
object
required

Perplexity response data