cookbook · Fanout · Content planning
Plan content from the questions your buyers ask
Start from the questions your customers actually type into an assistant, run each through Fanout, and pool the searches it predicts. Grouping them by topic gives a plan: each cluster is a page worth having, and each search is a heading or a FAQ entry on it. This recipe runs three questions from a small-food-business audience and groups the results with a few keywords.
Request
POST /v1/fanout, documented in the Fanout reference.
curl https://meragpt.com/v1/fanout \
-H "Authorization: Bearer $MERAGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "fanout-1",
"question": "What'\''s the best accounting software for a small bakery?"
}'What came back
The real output from running this recipe, unedited.
{
"What's the best accounting software for a small bakery?": [
"best accounting software for small bakery 2026",
"Shopify pricing features official",
"cheapest accounting software small business",
"Wave accounting pricing 2026",
"FreshBooks pricing 2026"
],
"How do I do payroll for 3 part-time employees in the UK?": [
"best payroll software for small businesses 2026",
"UK payroll software comparison 2026",
"best payroll software for part-time employees UK"
],
"Should I get a point-of-sale card reader for my farmers market stall?": [
"best point of sale card readers for farmers market",
"point of sale card reader alternatives",
"best mobile payment systems for small business",
"best card readers for food service"
]
}Python
import os, requests
API = "https://meragpt.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['MERAGPT_API_KEY']}"}
import re
from collections import defaultdict
questions = [
"What's the best accounting software for a small bakery?",
"How do I do payroll for 3 part-time employees in the UK?",
"Should I get a point-of-sale card reader for my farmers market stall?",
]
TOPICS = {"accounting": ["accounting", "bookkeeping"], "payroll": ["payroll"], "payments": ["card reader", "point of sale", "payment"]}
plan = defaultdict(set)
for q in questions:
r = requests.post(f"{API}/fanout", headers=HEADERS, json={"model": "fanout-1", "question": q}).json()
for s in r["queries"]:
s = re.sub(r"\b20\d\d\b", "", s).strip() # years are noise for planning
topic = next((t for t, words in TOPICS.items() if any(w in s.lower() for w in words)), "other")
plan[topic].add(s)
for topic, searches in plan.items():
print(topic, sorted(searches))
TypeScript
const API = "https://meragpt.com/v1";
const headers = {
Authorization: `Bearer ${process.env.MERAGPT_API_KEY}`,
"Content-Type": "application/json",
};
const questions = [
"What's the best accounting software for a small bakery?",
"How do I do payroll for 3 part-time employees in the UK?",
"Should I get a point-of-sale card reader for my farmers market stall?",
];
const TOPICS: Record<string, string[]> = { accounting: ["accounting", "bookkeeping"], payroll: ["payroll"], payments: ["card reader", "point of sale", "payment"] };
const plan = new Map<string, Set<string>>();
for (const q of questions) {
const r = await fetch(`${API}/fanout`, { method: "POST", headers, body: JSON.stringify({ model: "fanout-1", question: q }) }).then((res) => res.json());
for (let s of r.queries as string[]) {
s = s.replace(/\b20\d\d\b/g, "").trim(); // years are noise for planning
const topic = Object.entries(TOPICS).find(([, words]) => words.some((w) => s.toLowerCase().includes(w)))?.[0] ?? "other";
plan.set(topic, (plan.get(topic) ?? new Set()).add(s));
}
}
for (const [topic, searches] of plan) console.log(topic, [...searches]);
When to trust it
The searches are a prediction of what an assistant would run, not a log of real searches, so use them to decide what to cover, not to estimate traffic. Wording matters: asked whether a "POS system" was worth it, the model read POS as pest control in an earlier run; spelling it out as "point-of-sale card reader" fixed it, as below. Brand names that appear unasked (here Shopify, Wave and FreshBooks) tell you which products your pages will be compared with.
Try it without code in the playground, or see more Fanout recipes: turn a buyer's question into a content brief, see which rivals an assistant pulls in, anchor an unfamiliar brand with hints, choose the searches to track for ai-answer visibility.