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"
import os, requests API = "https://api.apiforgeo.com/v1" H = {"Authorization": f"Bearer {os.environ['API_FOR_GEO_KEY']}"} # 1. create the task requests.post(f"{API}/tasks", headers=H, json={ "prompt": "best project management tool for creative agencies", "model": "chatgpt", "country": "US", "language": "en" }, timeout=30) # 2. read it once completed r = requests.get(f"{API}/tasks/task_0193f2a7c1d84e6f9b2a5c7d3e1f4a6b", headers=H, timeout=30) print(r.json())
const API = "https://api.apiforgeo.com/v1"; const auth = { Authorization: `Bearer ${process.env.API_FOR_GEO_KEY}` }; const post = (path, body) => fetch(API + path, { method: "POST", headers: { ...auth, "Content-Type": "application/json" }, body: JSON.stringify(body) }).then((r) => r.json()); const get = (path) => fetch(API + path, { headers: auth }).then((r) => r.json()); // 1. create the task await post("/tasks", { "prompt": "best project management tool for creative agencies", "model": "chatgpt", "country": "US", "language": "en" }); // 2. read it once completed console.log(await get("/tasks/task_0193f2a7c1d84e6f9b2a5c7d3e1f4a6b"));
| Order | Search 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 |
{
"id": "task_0193f2a7c1d84e6f9b2a5c7d3e1f4a6b",
"status": "completed",
"prompt": "best project management tool for creative agencies",
"model": "chatgpt",
"country": "US",
"language": "en",
"completedAt": "2026-10-14T09:14:05Z",
"resultExpiresAt": "2026-10-21T09:14:05Z",
"result": {
"fanOuts": [
{
"phrase": "which project management tools have client approval workflows"
},
{
"phrase": "how much does project management software cost per seat"
},
{
"phrase": "best pm tool for agencies with under 20 people"
},
{
"phrase": "does it integrate with design and proofing tools"
}
]
}
} | Field | Type | Description |
|---|---|---|
status | enum | queued · processing · completed · failed. completed and failed are final. |
resultExpiresAt | datetime | null | When the result stops being readable: 7 days after completion. |
result.fanOuts[] | array | The web searches the model ran while it answered. |
result.fanOuts[].phrase | string | One 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.
-
Step 1
Sign in
Sign in to the dashboard with an email link or Google. The first sign-in creates your workspace.
-
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.
-
Step 3
Create a task
Send POST /v1/tasks with a prompt, a model, a country and a language. One task is one answer.
-
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 GEO | AI scraping API | GEO dashboard tool | In-house build |
|---|---|---|---|---|
| Fan-out web searches | Yes | No | Rare | Build it |
| Raw answer text | Yes | Yes | Sometimes | Build it |
| Ongoing maintenance when engines change | Ours | Partly theirs | Theirs | Yours |
Use cases
Fan-out searches feed 3 deliverables: briefs, prompt lists and gap reports
The Query Fan-Out API turns the searches engines run into work items. Agencies build content briefs from the searches that recur, platforms suggest new prompts to their customers, and brands find searches whose answers name a competitor and not them. You count the searches across your saved tasks. Each card opens the matching pattern.
Prompt lists that grow themselves
Count the phrases across a customer's tasks and suggest the ones that recur as new prompts. Each accepted phrase becomes one more task per model in the next run.
Read the pattern → AgenciesContent briefs in the engine's words
Turn the 20 most frequent searches of a topic into H2s and FAQ entries, phrased the way the engine phrased them. Those are the queries that retrieve a page.
Read the pattern → E-commerce & brandsGaps where competitors get named
Join each task's fan-outs with its entities. A search whose answers keep naming a competitor and never the brand is a page to write or a source to win.
Read the pattern →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.
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.
Related GEO APIs
AI Visibility Tracking API →
Read the brands each answer names, to join with its searches.
APICitations API →
See the pages the engine cited once it had searched.
APIPrompt Tracking API →
Run a search that recurs as a prompt of its own, one task per model.
Same topic: Query fan-out tool · Query fan-out guide