Perplexity Decisions API can search the web before it answers, with mode web_grounding (November 2026)
Set mode to web_grounding on Perplexity's Decisions API and it runs a web search per question, returning the sources it used.
Your keys
0 of 1 ready
Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. What you paste stays in this tab. It is never sent to Wirestack or saved.
- Perplexity API keyPERPLEXITY_API_KEYGet key
Open the API Keys page in the Perplexity API console and generate a key. Add credits in Billing first.
What you get
In November 2026 Perplexity added web grounding to the Decisions API (POST /v1/decisions). Set mode to "web_grounding" and the API runs one Fast Search per question, adds the top results to your state as evidence, then answers. The response gains a search_results list with each result's title, URL, snippet and, where known, dates. Requests without mode work as before.
- Price: $0.001 per search, so at most $0.10 for 100 questions. The evidence is billed as input tokens and counts toward the 256K input limit.
- Limits: up to 100 questions per grounded request (more returns
400). Each search returns up to 5 results and the API keeps up to 10. Searches run up to 10 at a time, 1 second each and 3 seconds in total; a search that times out adds nothing. Images aren't searched. - For many questions Perplexity recommends
pplx-decider-v1.2overpplx-decider-flash-v1.2, which counts the evidence again for every question.
Prerequisites
- A Perplexity API key in
PERPLEXITY_API_KEY - Any HTTP client, or the Python SDK 0.44.0 or later, or the TypeScript SDK 0.39.0 or later
Steps
- Add
"mode": "web_grounding"to a Decisions request:
curl -X POST https://api.perplexity.ai/v1/decisions \
-H "Authorization: Bearer $PERPLEXITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "pplx-decider-latest",
"mode": "web_grounding",
"state": "Claim: The James Webb Space Telescope launched in December 2021.",
"questions": {
"supported": {
"type": "noul",
"instructions": "Is the claim true?"
}
}
}' | jq