Get AI answer
get_query_runRead ONE run in full: the complete answer text, every brand mention, every citation and every web search the AI ran.
get_sample_runs returns a list with a truncated excerpt per item;
call this with a run_id from that list when you need the whole
answer for a single run. answer_text is the assistant's prose,
extracted from the stored response — plain markdown as the model
wrote it, never the provider's JSON envelope. An empty string means
the run stored no readable answer.
web_search_queries lists the searches the AI ran before answering,
in the order it ran them, as plain strings — the terms a brand has to
rank for to be found for this prompt. Repeats are kept. Read it with
web_search_query_count: an empty list with count 0 means the AI
answered without searching; both null means the searches are not
recorded (Perplexity never exposes them; runs parsed before we started
recording have none).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"run_id": "<run_id>"
},
"name": "get_query_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | Opaque token from ``get_sample_runs``. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||