Skip to content

Glossary

Query fan-out

Query fan-out is when an answer engine turns one prompt into several web searches and writes its answer from what they return. Those searches tell you which queries you have to rank for to be cited. PromptGale returns them as result.searchQueries for engines that show them, which today is Perplexity.

Updated

What is query fan-out?

A prompt such as "best coffee subscription for home espresso" is rarely searched as typed. The engine breaks it into narrower searches (reviews, a grind option, a price comparison), runs them, reads the results and writes one answer. The set of searches is the fan-out.

For a brand, the fan-out is the bridge between the prompt and the citations: a page that ranks for one of those searches can end up cited in the answer.

How do I read the queries an engine ran?

result.searchQueries holds them, in the order the page showed them (up to 10). Perplexity results also have relatedQuestions, the follow-ups it suggests. Engines that do not show their searches leave the field out.

curl
curl -X POST https://promptgale.com/v1/sync/task \
  -H "Authorization: Bearer $PROMPTGALE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "PERPLEXITY",
    "payload": {
      "prompt": "best coffee subscription for home espresso",
      "country": "US"
    }
  }'
Python
import os
import requests

res = requests.post(
    "https://promptgale.com/v1/sync/task",
    headers={"Authorization": f"Bearer {os.environ['PROMPTGALE_API_KEY']}"},
    json={"taskType": "PERPLEXITY", "payload": {"prompt": "best coffee subscription for home espresso", "country": "US"}},
    timeout=300,
)
task = res.json()["data"]
print(task["status"], task["result"]["text"][:300])
Node.js
const res = await fetch('https://promptgale.com/v1/sync/task', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PROMPTGALE_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ taskType: 'PERPLEXITY', payload: {prompt: "best coffee subscription for home espresso", country: "US"} }),
});
const { data: task } = await res.json();
console.log(task.status, task.result.text.slice(0, 300));
Response (PERPLEXITY)
{
  "success": true,
  "data": {
    "id": "tsk_3Xb8Kq0Lm2Np4Rs6Tu8Vw0Yz",
    "taskType": "PERPLEXITY",
    "status": "COMPLETED",
    "country": "US",
    "credits": 1.5,
    "creditsCharged": 1.5,
    "result": {
      "engine": "PERPLEXITY",
      "text": "Based on recent reviews and forum threads, the strongest options right now are: 1. Bluebird Beans ships every two weeks and is easy to pause. 2. Northwind Roasters has a wide range of single-origin espresso roasts. 3. Acme Coffee roasts to order and lets you pick the grind for your machine.",
      "sources": [
        {
          "position": 1,
          "url": "https://bluebirdbeans.example/espresso-subscription",
          "title": "Bluebird Beans: espresso subscription",
          "domain": "bluebirdbeans.example",
          "cited": true,
          "citationNumber": 1
        },
        {
          "position": 2,
          "url": "https://homebarista.example/threads/home-espresso",
          "title": "Home espresso subscriptions, compared",
          "domain": "homebarista.example",
          "cited": true,
          "citationNumber": 2
        },
        {
          "position": 3,
          "url": "https://northwind.example/espresso-subscription",
          "title": "Northwind Roasters: espresso subscription",
          "domain": "northwind.example",
          "cited": true,
          "citationNumber": 3
        },
        {
          "position": 4,
          "url": "https://reddit.com/threads/home-espresso",
          "title": "Home espresso subscriptions, compared",
          "domain": "reddit.com",
          "cited": true,
          "citationNumber": 4
        }
      ],
      "searchQueries": [
        "best coffee subscription home espresso",
        "espresso coffee subscription reviews 2026",
        "coffee subscription grind for espresso machine"
      ],
      "relatedQuestions": [
        "Which coffee subscription is best for a beginner espresso machine?",
        "How often should espresso beans be delivered?"
      ],
      "analysis": {
        "status": "ok",
        "brands": [
          {
            "name": "Acme Coffee",
            "role": "target",
            "mentioned": true,
            "mentions": 1,
            "firstPosition": 218,
            "rank": 3,
            "cited": false,
            "citedUrls": [],
            "shareOfVoice": 33.3
          },
          {
            "name": "Northwind Roasters",
            "role": "competitor",
            "mentioned": true,
            "mentions": 1,
            "firstPosition": 145,
            "rank": 2,
            "cited": true,
            "citedUrls": [
              "https://northwind.example/espresso-subscription"
            ],
            "shareOfVoice": 33.3
          },
          {
            "name": "Bluebird Beans",
            "role": "competitor",
            "mentioned": true,
            "mentions": 1,
            "firstPosition": 83,
            "rank": 1,
            "cited": true,
            "citedUrls": [
              "https://bluebirdbeans.example/espresso-subscription"
            ],
            "shareOfVoice": 33.3
          }
        ]
      },
      "location": {
        "country": "US",
        "locale": "en-US",
        "timezone": "America/New_York"
      }
    }
  }
}

Sample output: the brands, domains and answer are made up (Acme Coffee and its competitors do not exist). The field names and shapes are the real API.

What can I do with the fan-out queries?

  • Collect them across many prompts and count them: the queries that come back often are the ones worth a page.
  • Join them with sources: which search led to which cited domain.
  • Check where your site ranks for each of them with a search task, or in the organic results of a GOOGLE_AIO task.
  • Compare countries: the same prompt can fan out into different searches in different markets.

Do model APIs return fan-out queries too?

Some do, for their own searches: Google's Gemini API with Google Search grounding returns webSearchQueries in its grounding metadata (as of November 2026, Google AI Studio docs). Those are the searches of your API call, with your settings, not the ones the consumer app ran for a person. See ChatGPT API vs ChatGPT app for why the two differ.

Questions, answered

What is query fan-out?

When an answer engine turns one prompt into several web searches and writes its answer from the combined results.

Which PromptGale engines return the queries they ran?

Perplexity, in result.searchQueries. Other engines do not show their searches on the page, so the field is left out for them.

Does query fan-out cost extra?

No. searchQueries is part of the result at the engine price, 1.5 credits per Perplexity answer.

Sources

Statements about other companies come from their own pages, read on . Prices and products change; check the source before you decide.

Run your first prompt in a minute.