ChangelogNew

See the searches behind every Perplexity answer

Perplexity
A Perplexity answer on wireless earbuds next to its JSON result with sources

Capture the Perplexity answer to any prompt in your market, with its numbered sources, the searches it ran and the follow-up questions it suggests.

What you get

  • text and markdown: the full answer, as plain text and formatted.
  • sources: the numbered sources behind the answer, each with URL, title and a short description.
  • related_queries: the follow-up questions Perplexity suggests next.
  • Images, videos, places, hotels and product cards whenever the answer shows them.

How it works

Perplexity answers every question with a web search, and its numbered sources show exactly where each statement comes from. Each task asks your prompt from the country you set and returns the answer and its sources as people in that market see them.

Set include.searchQueries to also receive the searches Perplexity ran, which reveal how it breaks a question down into research steps.

Where it helps

  • See which domains Perplexity relies on in your category and where your pages stand among its sources.
  • Turn the suggested follow-up questions into new prompts to track.
  • Compare Perplexity’s recommendations with ChatGPT and Gemini on the same prompts.

Send a request

Send the request with your API key in the Authorization header.

curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "PERPLEXITY",
    "payload": {
      "prompt": "Recommend 3 wireless earbuds for commuting. Compare noise cancellation and battery life in a short table, with sources. Keep it under 180 words.",
      "country": "US",
      "include": { "markdown": true }
    }
  }'

Request fields

taskTypestringRequired
The engine to run, such as CHATGPT or GOOGLE.
payload.promptstringRequired
The question, written the way a user types it into the chat. Up to 100,000 characters.
payload.countrystring
Two-letter country code of the market to ask from, such as US, KR or JP. Default US.
payload.include.markdownboolean
true adds markdown: the answer with its headings, lists, tables and links.
payload.include.searchQueriesboolean
true adds searchQueries: the web searches the engine ran to write the answer.
webhook.urlstring
An HTTPS address on your server. The finished task is posted there the moment it completes.
idempotencyKeystring
Your own ID for the request. Each key creates one task per account, so a retried send stays a single task.

Response

A finished task looks like this, trimmed for length.

JSON
{
  "success": true,
  "task": {
    "id": "67030796-8ecd-4aed-b2c4-6ced6639a313",
    "taskType": "PERPLEXITY",
    "status": "COMPLETED",
    "createdAt": "2026-09-10T02:34:24.023Z"
  },
  "credits": { "creditsToCharge": 1, "creditsCharged": 1 },
  "response": {
    "text": "For commuting, I’d choose **Sony for strongest all-around isolation**, **Bose for maximum ANC comfort**, or **AirPods for Apple integration**.",
    "markdown": "| Earbuds | Noise cancellation | Battery life* | Best for |\n|---|---|---:|---|\n| **Sony WF-1000XM5** | Excellent; measured 32 dB attenuation in key transit-noise frequencies | 8h / 24h case | Android and mixed devices |\n…",
    "sources": [
      {
        "position": 1,
        "url": "https://www.rtings.com/headphones/reviews/best/wireless-earbuds",
        "label": "The 6 Best Wireless Earbuds of 2026 - RTINGS.com",
        "description": "The best wireless earbuds we've tested are the Sony WF-1000XM6. These buds offer top-tier ANC performance."
      },
      {
        "position": 2,
        "url": "https://www.businessinsider.com/guides/tech/best-earbuds",
        "label": "The best earbuds of 2026, tested by audio experts - Business Insider",
        "description": "The best wireless earbuds offer great audio quality in a compact design. These are our top picks from Sony, Bose, Technics, Anker, Apple, and JLab."
      }
    ]
  }
}
task.statusstring
QUEUED, PROCESSING, then COMPLETED with the answer or FAILED with error.
credits.creditsChargedinteger
Credits charged for the finished task. A failed task charges 0.
response.textstring
The answer as plain text.
response.markdownstring
The answer with its formatting: headings, lists, tables and links.
response.sourcesarray
The pages the answer cites, in the engine’s order, each with position, url and label.
response.searchQueriesarray
The web searches the engine ran to write the answer.

Receive the result

The request returns the task right away with status QUEUED. Poll GET /v1/async/task/{id} until status is COMPLETED or FAILED, or add webhook.url and the finished task arrives at your server with the same task, credits and response. Results stay available for 24 hours after a task finishes.

curl https://api.querying.ai/v1/async/task/$TASK_ID \
  -H "Authorization: Bearer $QUERYING_API_KEY"

Pricing

Each completed Perplexity task uses 1 credit.

More updates

Stay in the loop

Get new product updates in your inbox.

RSS feed