Free trial Test every endpoint on all 8 AI engines with a free trial. Start free trial →

Test the API on 8 AI engines with a free trial.

Start free trial

Query Fan-Out API: the web searches behind every AI answer

The Query Fan-Out API returns the generative engine optimization (GEO) data on searches: the web searches an AI engine ran while it answered your prompt, in the order it ran them. They come in result.fanOuts[] on every task, on 8 engines, at no extra cost. You count them across tasks and join them with the brands each answer names, on your side.

  • ChatGPT
  • Gemini
  • Google AI Mode
  • AI Overviews
  • Microsoft Copilot
  • Grok
  • Rufus
  • Alexa for Shopping

Updated

Playground

One task on ChatGPT ran 4 web searches before it answered

The Query Fan-Out API returns the searches of each task in the order the model ran them. In this sample, ChatGPT ran four searches for the agency prompt, starting with client approval workflows and price per seat. Google AI Mode ran five for the same prompt. Pick another prompt or model to see the request change and the fan-outs that come back.

POST/v1/tasks·GET/v1/tasks/{taskId}

model

Extra cost
none
Searches run
4
# 1. create the task
curl -X POST https://api.apiforgeo.com/v1/tasks \
  -H "Authorization: Bearer $API_FOR_GEO_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "best project management tool for creative agencies",
    "model": "chatgpt",
    "country": "US",
    "language": "en"
  }'

# 2. read it once completed
curl https://api.apiforgeo.com/v1/tasks/task_0193f2a7c1d84e6f9b2a5c7d3e1f4a6b \
  -H "Authorization: Bearer $API_FOR_GEO_KEY"
200 OK · completed · 4 fan-outs
OrderSearch phrase
1 which project management tools have client approval workflows
2 how much does project management software cost per seat
3 best pm tool for agencies with under 20 people
4 does it integrate with design and proofing tools
The fan-out fields of GET /v1/tasks/{taskId}
FieldTypeDescription
statusenumqueued · processing · completed · failed. completed and failed are final.
resultExpiresAtdatetime | nullWhen the result stops being readable: 7 days after completion.
result.fanOuts[]arrayThe web searches the model ran while it answered.
result.fanOuts[].phrasestringOne search, as the model phrased it.

Across tasks

One loop over your saved results ranks the searches and joins the brand

The Query Fan-Out API returns the searches of one task, and you rank them across tasks. Save each result when task.completed arrives, count every phrase once per task, and note whether the answer named your brand. The entity id stays the same across your workspace's tasks, so the join holds. A phrase that recurs without your brand is a gap to cover.

// results: each completed task's result, saved when task.completed arrived
const BRAND = "ent_3f9c2a7e1b5d4c8a9e6f0b2d4a7c1e3f"; // Loopwork: the same id in every task
const phrases = new Map();
for (const result of results) {
  const named = result.entities.some((e) => e.id === BRAND);
  for (const phrase of new Set(result.fanOuts.map((f) => f.phrase))) {
    const row = phrases.get(phrase) ?? { phrase, tasks: 0, withBrand: 0 };
    row.tasks += 1;
    if (named) row.withBrand += 1;
    phrases.set(phrase, row);
  }
}
// the searches that recur most, and how often their answer named the brand
const ranked = [...phrases.values()].sort((a, b) => b.tasks - a.tasks);

Get started

Four steps put the first fan-outs in your hands

The Query Fan-Out API needs no setup of its own: every task returns its fan-outs. Sign in to the dashboard, create a key, send POST /v1/tasks with a prompt, a model, a country and a language, then read the result. A test key runs the free sandbox and returns a sample result in about 15 seconds, so you can build the parser first.

  1. Step 1

    Sign in

    Sign in to the dashboard with an email link or Google. The first sign-in creates your workspace.

  2. Step 2

    Create a key

    Create an API key in the dashboard. A test key runs in the free sandbox; a live key spends the balance.

  3. Step 3

    Create a task

    Send POST /v1/tasks with a prompt, a model, a country and a language. One task is one answer.

  4. Step 4

    Read the result

    Poll GET /v1/tasks/{taskId}, or pass a webhookUrl and get task.completed. Keep what you need within 7 days.

Comparison

Only 1 of 4 approaches returns the fan-out searches as data

The Query Fan-Out API returns the searches each engine ran as a plain array on every task. An AI scraping API returns the final answer without them, a GEO dashboard tool rarely exposes them, and an in-house build has to capture them per engine and keep up each time an engine changes how it searches. Ranking them across tasks stays on your side.

3 of the 15 capabilities on the full comparison

Capability API for GEOAI scraping APIGEO dashboard toolIn-house build
Fan-out web searches YesNoRareBuild it
Raw answer text YesYesSometimesBuild it
Ongoing maintenance when engines change OursPartly theirsTheirsYours

See the full comparison on 15 capabilities →

Pricing

Query Fan-Out API pricing runs from $0.013 to $0.007 per task

The Query Fan-Out API adds no charge of its own: every task returns its fan-outs with the other layers, and reading the task is free. You pay per task, one prompt on one model in one country and language, from a prepaid balance. The month's total volume sets the tier, with no commitment needed to reach a lower one.

0 – 50k / month $0.013 per task
50k – 250k / month $0.011 per task
250k – 1M / month $0.009 per task
1M+ / month $0.007 per task

Price per task, set by the month's total volume. 200 prompts × 3 models × 30 runs = 18,000 tasks a month, $234 at $0.013

FAQ

Fan-out data, answered

What does a task return for fan-outs?

The Query Fan-Out API returns result.fanOuts[], one object per web search the model ran while it answered. Each object holds the phrase as the model typed it, and the array keeps the order the model ran them in. A model that answered without searching returns an empty array. The same task also carries the answer, the brands it names and the cited sources.

How stable are fan-outs between runs?

The Query Fan-Out API returns what one run searched, and one run differs from the next. Run the same prompt as several tasks, then count each phrase across them on your side. The frequent searches change slowly while the rare ones churn, so a monthly brief built on the 20 most frequent phrases stays valid.

Do fan-outs cost extra?

The Query Fan-Out API bills nothing beyond the task. Each task costs from $0.013 down to $0.007 with every layer included, fan-outs among them. Reading the task with GET /v1/tasks/{taskId} is free, as often as you like for 7 days. A failed task is refunded in full, so a search list you never got costs nothing.

How do I link a fan-out to the brands?

The Query Fan-Out API returns the fan-outs and the entities in the same task result, so the task is the join. Pair every phrase with the entities its answer named. Across many tasks, a phrase that keeps coming with a competitor and never with your brand marks a gap. Entity ids stay the same across your workspace's tasks, so the counts add up.

How long can I read the fan-outs?

The Query Fan-Out API keeps each result readable for 7 days after the task completes, then it is gone: resultExpiresAt gives the exact time. Save the phrases you need when task.completed reaches your webhook. Counts across weeks and months then run on your own copy, with your own schedule sending new tasks.

Can I resell fan-out data?

The Query Fan-Out API allows resale and white-label use, like every layer. The payload carries no branding, and each client can sit in its own workspace with its own keys and balance, so an agency can ship fan-out briefs under its own name or a platform can show the searches inside its product.

Read the web searches behind every AI answer

Free trial · then pay per task