App Logo
perplexity.ai

Ask Perplexity

Ask Perplexity a question and get back three things the answer alone cannot tell you apart: the answer itself, the queries Perplexity's own search issued for it, and every page that search returned — not only the ones the answer cited. That split is the point. `sources` is the candidate pool, in the order the thread's Links view lists it, each with its publisher, title and snippet. `citations` is what the answer actually cited inline, each with the real destination URL, the chip as shown (a "+N" groups further sources that are not exposed individually) and whether Perplexity marks the domain as trusted. So `sources` minus `citations` is what Perplexity retrieved and then passed over, while a URL in neither was never retrieved at all — which is what you need to see how a topic, brand or product gets described and who gets credited. Headings, bullet lists and comparison tables come back as readable text, and `threadUrl` links the thread so any answer can be audited afterwards. Treat one run as a single draw rather than a measurement: the same question can search differently, answer differently and cite different pages next time, so ask more than once before concluding anything. Perplexity's own free-tier ask rate limit can gate a request instead of answering it, answering "Sign up and repeat your request." instead. This can happen whether or not the browser is signed in — a live test confirmed the gate firing on a genuinely signed-in free-tier account, so signing in is not a guaranteed fix, only a paid plan is known to avoid it. The script names that state rather than returning an empty answer.

Input

question required

The question to ask, sent as the first message of a new thread.

Output

answer required

The answer as rendered, with its paragraphs, lists and tables flattened to text in reading order. Inline citation chips read as the publisher name Perplexity shows, e.g. 'coursera +2'.

sources required

Every page the search returned, cited or not — the candidate pool, in the order the Links view lists it. `sources` minus `citations` is what Perplexity retrieved and then passed over; a URL in neither was never retrieved. Empty when the answer searched nothing.

question required
citations required

The sources cited inline by the answer, in the order they appear, deduplicated by URL. A subset of `sources` whenever the answer searched.

threadUrl required

URL of the thread the answer was written into, so the run can be audited afterwards.

answerChars required
searchQueries required

The queries Perplexity's own search issued for this answer, read from the thread's search step, in the order shown. Empty when it answered without searching.

Start building not clicking