Category
Name the decision
Use a question such as “Which AI search monitoring tools are best for a small SaaS team?”
Developer recipe
Send one buyer prompt to ChatGPT and receive the mention status, position, answer text, cited sources, sentiment, competitors, and explicit failure state in one JSON response.
The Foglift AI Visibility API uses the brand and domain already attached to your workspace. The recipe runs as a dry check, so it does not add an ad hoc prompt to monitoring history.
// check-chatgpt-mention.mjs (Node.js 22+)
const apiKey = process.env.FOGLIFT_API_KEY;
const prompt = process.env.BUYER_PROMPT ??
"Which AI search monitoring tools are best for a small SaaS team?";
if (!apiKey) throw new Error("Set FOGLIFT_API_KEY first.");
const response = await fetch("https://foglift.io/api/v1/ai-visibility", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": apiKey,
},
body: JSON.stringify({
prompts: [prompt],
models: ["chatgpt"],
dry_run: true,
...(process.env.FOGLIFT_BRAND_ID
? { brand_id: process.env.FOGLIFT_BRAND_ID }
: {}),
}),
});
const payload = await response.json();
if (!response.ok) {
throw new Error(
payload.message ??
payload.error ??
`Request failed with HTTP ${response.status}`,
);
}
const result = payload.results?.find((item) => item.model === "ChatGPT");
if (!result || result.error) {
console.error(result?.error ?? "ChatGPT returned no usable result.");
process.exit(2);
}
console.log(JSON.stringify({
prompt: result.prompt,
mentioned: result.brand_mentioned,
position: result.position,
sentiment: result.sentiment,
citations: result.citations,
competitors: result.competitor_mentions,
}, null, 2));
process.exit(result.brand_mentioned ? 0 : 1);Run it
Save the script, choose the buyer question that matters, and run it with Node.js 22 or later. A multi-brand API key can set FOGLIFT_BRAND_ID to select the workspace explicitly.
export FOGLIFT_API_KEY=sk_fog_your_api_key
export BUYER_PROMPT="Which AI search monitoring tools are best for a small SaaS team?"
node check-chatgpt-mention.mjs
# Exit 0: mentioned
# Exit 1: completed answer, brand absent
# Exit 2: no usable ChatGPT evidence{
"prompt": "Which AI search monitoring tools are best for a small SaaS team?",
"mentioned": true,
"position": 3,
"sentiment": "positive",
"citations": ["https://example.com/source"],
"competitors": ["Competitor A"]
}Prompt design
A useful mention check measures whether ChatGPT selects your brand for a real category question. Putting the brand name inside a recommendation prompt changes the task from discovery to recall.
Category
Use a question such as “Which AI search monitoring tools are best for a small SaaS team?”
Control
Keep the prompt text, ChatGPT engine, locale, and workspace brand stable when comparing runs.
Evidence
Position, answer text, citations, sentiment, and competitors explain what the mention status alone cannot.
Pricing and limits
This recipe uses one API request and one ChatGPT prompt-engine check. The request counts against the API allowance, and the model run uses the workspace's monthly token balance.
| Plan | Price | Requests per day | Requests per month |
|---|---|---|---|
| Launch | $49/mo | 50 | 1,000 |
| Growth | $129/mo | 200 | 5,000 |
| Enterprise | Custom | Custom | Custom |
Launch includes all five monitored engines and defaults to weekly scheduled monitoring, with daily scheduling available. See the complete plan comparison.
Brand-mention API FAQ
Send one POST request to https://foglift.io/api/v1/ai-visibility with models set to chatgpt, one buyer prompt, dry_run set to true, and your X-API-Key header. The first result returns brand_mentioned, position, sentiment, response_text, citations, competitor_mentions, and error.
No. False means ChatGPT completed the prompt but the tracked brand was absent from that answer. A provider failure appears in error or as a non-successful HTTP response. The recipe uses a separate exit code for that missing-evidence state.
No. The recipe sets dry_run to true, so the result is returned without being written to monitoring history. Remove dry_run only when the prompt belongs in the workspace record and the persistence rules fit your workflow.
Use the exact category or buyer question you want to measure. Do not put your brand name in a recommendation prompt unless the job is to test factual brand knowledge. Keep the prompt, engine, and locale stable when comparing runs over time.
Developer access and ChatGPT monitoring start on Launch at $49 per month. Launch includes 50 API requests per day and 1,000 per month. Each prompt-engine check also uses the workspace's model-token balance.
Tracked prompt
This recipe turns that job into one request with an explicit evidence boundary. Use scheduled monitoring when you need a trend instead of a point-in-time answer.