Monitor Perplexity answers with an API
Perplexity is the most citation-forward AI engine: every answer is built around numbered sources. That makes it the best early signal for AI-visibility work — and the easiest to validate, because the citations are the product.
The endpoint
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",
"include": { "markdown": true }
}'
The response carries the answer as text and markdown, plus the parts that make Perplexity distinct:
sources[]— every cited page, in display order, with URL, label and descriptioncitationPills[]— the grouped citation chips the UI shows, unpackedrelated_queries[]— the follow-up searches Perplexity suggestssearch_model_queries[]— the searches it actually ranvideos[],images[],places[],hotels[],shopping_cards[]— the rich blocks, when it shows them
Python
from answerline import Client
client = Client(api_key="sk_…")
res = client.monitor.perplexity(
prompt="Which project management tools do agencies use?",
country="GB",
)
for s in res["result"]["sources"]:
print(s["position"], s["url"])
TypeScript
import { Client } from "@answerline/sdk";
const client = new Client({ apiKey: "sk_…" });
const res = await client.monitor.perplexity({
prompt: "Which project management tools do agencies use?",
country: "GB",
});
console.log(res.result.sources.map((s) => s.url));
Running it at volume
Sync calls wait for the full answer. For a prompt set — daily brand checks, a category watchlist — queue them as async tasks with a webhook, and results land as each completes:
[{ "taskType": "PERPLEXITY", "payload": { "prompt": "…", "country": "US" }, "idempotencyKey": "acme-us-2026-09-15", "webhookUrl": "https://you.example/hook" }]
Citation order is the metric to watch: Perplexity’s position is literally what the user sees numbered. Track it per prompt, per market, over time — that’s your Perplexity citation share.
See every field on the Perplexity engine page and in the API reference.