Perplexity API
Perplexity's answer with its citations, related queries, the searches it ran, and any videos, images, places, hotels or shopping cards it showed.
Coming soon. The endpoint and fields below are the documented contract; requests are not accepted yet.
Price
4 credits per async request, 6 synchronous.
Endpoint
POST /v1/monitor/perplexity
Request
curl -X POST "https://api.answerline.dev/v1/monitor/perplexity" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"Which project management tools do agencies use?","country":"GB"}' Request options
| Field | Type | Description |
|---|---|---|
prompt * | string | The prompt to send to Perplexity |
country * | string | Country/region code for localized response |
include | object | Optional flags for including additional response formats |
include.html | boolean | Include a URL to the full HTML of the response |
include.markdown | boolean | Include markdown-formatted response in the result |
include.rawResponse | boolean | Include raw streaming response events |
state | string | State code for sub-country geo-targeting (e.g., "CA"). Only valid with country "US". |
What you get back
Field in result | Type | Description |
|---|---|---|
text | string | Perplexity's response text |
markdown | string | Perplexity's response formatted in Markdown (included when include.markdown is true) |
sources | object[] | Array of sources referenced in the response |
citationPills | object[] | Inline citation pills extracted from the Perplexity answer. Each entry is one (pill, source) pair: when a pill cites N sources (Perplexity's `[1][2][3]` bracketed groups), the array contains N entries sharing the same `citationPillId` but carrying per-source `label`, `url`, and `domain`. Group by `citationPillId` to recover the pill-level structure. Omitted from `result` when the answer carries no pills. |
related_queries | string[] | Suggested follow-up search queries |
search_model_queries | string[] | Internal search queries used to generate response |
videos | object[] | Video content found in response |
images | object[] | Image content found in response |
places | object[] | General places and locations |
hotels | object[] | Hotel listings (when travel intent detected) |
shopping_cards | object[] | Shopping product cards with detailed product information (when shopping intent detected) |