Skip to content

Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.

fix(cloro): count only cited ChatGPT sources and stop requesting its empty searchQueries (#1120)

Gökhan Geyikde317b57c593
diff --git a/server/src/lib/cloro-scraper.js b/server/src/lib/cloro-scraper.js
index e3d569f5e..b363b8c6f 100644
--- a/server/src/lib/cloro-scraper.js
+++ b/server/src/lib/cloro-scraper.js
@@ -88,15 +88,34 @@ export function buildRequestBody(promptText, scraperId, region, state) {
html: false,
markdown: true,
rawResponse: false,
- // Opt in to the observed query fan-out (#332). Copilot and Perplexity
- // populate it; ChatGPT does too (a +2 credit add-on), though its came
- // back empty from 2026-09-30 — the health report's fan-out section
- // flags an engine that stops. Gemini documents no fan-out field.
- searchQueries: true,
+ // Opt in to the observed query fan-out (#332), which Copilot and
+ // Perplexity populate; the health report's fan-out section flags one
+ // that stops. Not on ChatGPT: since 2026-09-30 its default (mobile-web)
+ // interface carries no query text, so the field came back empty on
+ // every answer while the add-on still cost +2 credits a task (#1119).
+ ...(scraperId === 'chatgpt-web' ? {} : { searchQueries: true }),
},
};
}
+/**
+ * The sources an answer cites, as the citations we store. Since 2026-10-09
+ * ChatGPT's `sources` also list the pages it read without citing them, marked
+ * `footnote: true`; counted as citations, they put ChatGPT's citation numbers
+ * at about 2.5× what its answers cite (#1119). Only ChatGPT sets the flag, but
+ * it is honoured for every engine.
+ */
+function toCitations(sources) {
+ return (sources || [])
+ .filter((src) => src.footnote !== true)
+ .map((src, idx) => ({
+ url: src.url || '',
+ title: src.label || '',
+ startIndex: idx * 100,
+ endIndex: idx * 100 + 50,
+ }));
+}
+
/**
* Normalize the observed query fan-out from a raw Cloro response into a rich,
* engine-labelled array: `[{ query, engine?, source_platform }]` (#332).
@@ -157,12 +176,7 @@ export function parseScraperResponse(result, scraperId) {
// (which exclude `platform = 'chatgpt-shopping'`) never mix this row
// into brand-level visibility numbers.
const text = stripEntityMarkup(result.markdown || result.text || '');
- const citations = (result.sources || []).map((src, idx) => ({
- url: src.url || '',
- title: src.label || '',
- startIndex: idx * 100,
- endIndex: idx * 100 + 50,
- }));
+ const citations = toCitations(result.sources);
return {
text,
citations,
@@ -179,12 +193,7 @@ export function parseScraperResponse(result, scraperId) {
}
const text = stripEntityMarkup(aio.markdown || aio.text || '');
- const citations = (aio.sources || []).map((src, idx) => ({
- url: src.url || '',
- title: src.label || '',
- startIndex: idx * 100,
- endIndex: idx * 100 + 50,
- }));
+ const citations = toCitations(aio.sources);
return { text, citations, model: 'google-aio', shopping_cards: [] };
}
@@ -192,12 +201,7 @@ export function parseScraperResponse(result, scraperId) {
if (scraperId === 'google-aimode') {
const aiMode = result.result || result;
const text = stripEntityMarkup(aiMode.markdown || aiMode.text || '');
- const citations = (aiMode.sources || []).map((src, idx) => ({
- url: src.url || '',
- title: src.label || '',
- startIndex: idx * 100,
- endIndex: idx * 100 + 50,
- }));
+ const citations = toCitations(aiMode.sources);
// AI Mode returns its product cards under camelCase `shoppingCards`
// (like Copilot — verified against the live response; not snake_case).
@@ -213,12 +217,7 @@ export function parseScraperResponse(result, scraperId) {
const text = stripEntityMarkup(result.markdown || result.text || '');
const model = result.model || scraperId;
- const citations = (result.sources || []).map((src, idx) => ({
- url: src.url || '',
- title: src.label || '',
- startIndex: idx * 100,
- endIndex: idx * 100 + 50,
- }));
+ const citations = toCitations(result.sources);
return {
text,
diff --git a/server/src/lib/cloro-scraper.test.js b/server/src/lib/cloro-scraper.test.js
index a9997f87a..e3344ce8a 100644
--- a/server/src/lib/cloro-scraper.test.js
+++ b/server/src/lib/cloro-scraper.test.js
@@ -170,6 +170,40 @@ describe('cloro-scraper – parseScraperResponse', () => {
});
});
+ describe('ChatGPT footnote sources (#1119)', () => {
+ // Since 2026-10-09 ChatGPT lists the pages it read without citing them,
+ // marked footnote: true, after the cited ones.
+ const sources = [
+ { url: 'https://cited.com/a', label: 'Cited A', position: 1, footnote: false },
+ { url: 'https://cited.com/b', label: 'Cited B', position: 2, footnote: false },
+ { url: 'https://read.com/c', label: 'Read only', position: 3, footnote: true },
+ ];
+
+ it('stores only the sources the answer cites', () => {
+ const parsed = parseScraperResponse({ markdown: 't', sources }, 'chatgpt-web');
+ expect(parsed.citations).toEqual([
+ { url: 'https://cited.com/a', title: 'Cited A', startIndex: 0, endIndex: 50 },
+ { url: 'https://cited.com/b', title: 'Cited B', startIndex: 100, endIndex: 150 },
+ ]);
+ });
+
+ it('does the same on ChatGPT Shopping', () => {
+ const parsed = parseScraperResponse({ markdown: 't', sources }, 'chatgpt-shopping');
+ expect(parsed.citations.map((c) => c.url)).toEqual([
+ 'https://cited.com/a',
+ 'https://cited.com/b',
+ ]);
+ });
+
+ it('keeps sources without the flag', () => {
+ const parsed = parseScraperResponse(
+ { markdown: 't', sources: [{ url: 'https://foo.com', label: 'Foo' }] },
+ 'copilot-web',
+ );
+ expect(parsed.citations).toHaveLength(1);
+ });
+ });
+
describe('ChatGPT entity markup', () => {
const markdown =
'Top tools: **<Entity category="software" value="Tesseract" disambig="Adlift AI search optimization platform"/>** and <Entity category="software" value="Ansvisor" />.';
@@ -330,6 +364,18 @@ describe('cloro-scraper – parseScraperResponse', () => {
});
});
+describe('cloro-scraper – buildRequestBody query fan-out (#332, #1119)', () => {
+ it('asks Copilot, Perplexity, Gemini and Grok for their searches', () => {
+ for (const scraperId of ['copilot-web', 'perplexity-web', 'gemini-web', 'grok-web']) {
+ expect(buildRequestBody('p', scraperId, 'US').include.searchQueries).toBe(true);
+ }
+ });
+
+ it("doesn't ask ChatGPT, whose default interface no longer carries them", () => {
+ expect(buildRequestBody('p', 'chatgpt-web', 'US').include).not.toHaveProperty('searchQueries');
+ });
+});
+
describe('cloro-scraper – buildRequestBody state targeting (#554)', () => {
const AI_ENDPOINTS = ['chatgpt-web', 'copilot-web', 'grok-web', 'perplexity-web', 'gemini-web'];
diff --git a/server/src/lib/health/report.js b/server/src/lib/health/report.js
index d64b4b247..baceacba1 100644
--- a/server/src/lib/health/report.js
+++ b/server/src/lib/health/report.js
@@ -145,8 +145,11 @@ async function checkCloro(now) {
* too; or
* - its share over the last day fell below FANOUT_DROP_RATIO of its share
* over the BASELINE_DAYS before, for any other platform that fans out.
+ *
+ * ChatGPT isn't expected: its default interface carries no query text since
+ * that day, and we no longer ask Cloro for it (#1119).
*/
-export const FANOUT_EXPECTED = ['chatgpt-web', 'copilot-web', 'perplexity-web'];
+export const FANOUT_EXPECTED = ['copilot-web', 'perplexity-web'];
export const FANOUT_DROP_RATIO = 0.25;
/** Fewer answers than this, on either side, are too few to judge. */
export const FANOUT_MIN_ANSWERS = 20;
diff --git a/server/src/lib/health/report.test.js b/server/src/lib/health/report.test.js
index e507ce86e..857e6f5a1 100644
--- a/server/src/lib/health/report.test.js
+++ b/server/src/lib/health/report.test.js
@@ -220,10 +220,9 @@ describe('query fan-out', () => {
});
it('keeps flagging an engine that should fan out, however long it has been silent', () => {
- // ChatGPT on the day this check shipped: nothing for two weeks, so the
- // days before are empty too.
+ // Nothing for two weeks, so the days before are empty too.
const silent = {
- platform: 'chatgpt-web',
+ platform: 'copilot-web',
answers: 400,
withFanout: 0,
rate: 0,
@@ -233,6 +232,8 @@ describe('query fan-out', () => {
expect(fanoutDropped(silent)).toBe(true);
// Gemini documents no fan-out, so a silent day is normal for it.
expect(fanoutDropped({ ...silent, platform: 'gemini-web' })).toBe(false);
+ // Nor is it news on ChatGPT, whose default interface carries none (#1119).
+ expect(fanoutDropped({ ...silent, platform: 'chatgpt-web' })).toBe(false);
});
it('says so when the check cannot run', async () => {
diff --git a/server/src/scripts/probe-cloro-fanout.js b/server/src/scripts/probe-cloro-fanout.js
index 522d0197e..4bc6e2fc2 100644
--- a/server/src/scripts/probe-cloro-fanout.js
+++ b/server/src/scripts/probe-cloro-fanout.js
@@ -42,10 +42,11 @@ if (!taskType) {
// The request production sends, plus the raw stream where the engine takes
// it (Google's endpoints don't), to look for queries outside the documented
-// fields. On ChatGPT it shares the fan-out add-on's +2 credits.
+// fields, and the fan-out flag, which production no longer sends to ChatGPT
+// (#1119). On ChatGPT the two share one add-on's +2 credits.
const payload = buildRequestBody(prompt, platform, country);
if (!['google-aio', 'google-aimode'].includes(platform)) {
- payload.include = { ...payload.include, rawResponse: true };
+ payload.include = { ...payload.include, rawResponse: true, searchQueries: true };
}
const headers = { Authorization: `Bearer ${key}`, 'Content-Type': 'application/json' };
diff --git a/web/messages/en.json b/web/messages/en.json
index c4c9cf8a0..8903ac1bb 100644
--- a/web/messages/en.json
+++ b/web/messages/en.json
@@ -2472,8 +2472,8 @@
"engineEmptyTitle": "No {engine} searches in the {range}",
"engineEmptyBody": "{engine} usually shares the searches behind its answers. Try a longer date range.",
"emptyTitle": "No fan-out captured yet",
- "emptyBody": "ChatGPT, Copilot and Perplexity share the searches behind some of their answers; Google AI Overviews, AI Mode and Gemini don't share them. Once those engines run for your prompts, the searches will appear here.",
- "coverageTooltip": "Of {total} tracked answers in this window, {withFanout} came with the searches the engine ran. Only ChatGPT, Copilot and Perplexity share them."
+ "emptyBody": "Copilot and Perplexity share the searches behind their answers; ChatGPT, Google AI Overviews, AI Mode and Gemini don't share them. Once those engines run for your prompts, the searches will appear here.",
+ "coverageTooltip": "Of {total} tracked answers in this window, {withFanout} came with the searches the engine ran. Only Copilot and Perplexity share them."
},
"bulkDelete": {
"progress": "Deleting {done} of {total} prompts…",
diff --git a/web/src/app/[locale]/(dashboard)/dashboard/prompts/_fanout-engines.test.tsx b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_fanout-engines.test.tsx
index 23d47e23c..d25f87a98 100644
--- a/web/src/app/[locale]/(dashboard)/dashboard/prompts/_fanout-engines.test.tsx
+++ b/web/src/app/[locale]/(dashboard)/dashboard/prompts/_fanout-engines.test.tsx
@@ -21,16 +21,17 @@ const engine = (over: Partial<FanoutEngineCoverage>): FanoutEngineCoverage => ({
...over,
});
-// What production showed on 2026-10-15: Copilot shares, ChatGPT stopped on
-// Sep 30, Google's engines never share.
+// Copilot shares; Perplexity usually does but went silent after Sep 29;
+// ChatGPT (since 2026-09-30, #1119) and Google's engines don't share.
const engines = [
engine({}),
engine({
- platform: 'chatgpt-web',
+ platform: 'perplexity-web',
answersWithFanout: 0,
subQueries: 0,
lastFanoutAt: '2026-09-29T05:12:00Z',
}),
+ engine({ platform: 'chatgpt-web', answersWithFanout: 0, subQueries: 0 }),
engine({ platform: 'google-aio', answersWithFanout: 0, subQueries: 0 }),
engine({ platform: 'gemini-web', answersWithFanout: 0, subQueries: 0 }),
];
@@ -75,14 +76,28 @@ describe('FanoutEngineStrip', () => {
expect(buttons).toEqual([
'All engines706',
'Microsoft Copilot21% of answers · 706',
- 'ChatGPTnone since Sep 29',
+ 'Perplexitynone since Sep 29',
]);
// Never-sharing engines are labels, not filters.
+ expect(container.textContent).toContain('ChatGPT · not shared');
expect(container.textContent).toContain('Google AI Overview · not shared');
expect(container.textContent).toContain('Google Gemini · not shared');
act(() => container.querySelectorAll('button')[2].click());
- expect(onSelect).toHaveBeenCalledWith('chatgpt-web');
+ expect(onSelect).toHaveBeenCalledWith('perplexity-web');
+ });
+
+ it('still lets ChatGPT filter a long window that holds its older searches', () => {
+ render(
+ <FanoutEngineStrip
+ engines={[engine({ platform: 'chatgpt-web', answersWithFanout: 12, subQueries: 30 })]}
+ totalSubQueries={30}
+ selected={null}
+ onSelect={vi.fn()}
+ />,
+ );
+ const buttons = [...container.querySelectorAll('button')].map((b) => b.textContent);
+ expect(buttons).toEqual(['All engines30', 'ChatGPT12% of answers · 30']);
});
it('clears the filter when the picked engine is clicked again', () => {
@@ -104,10 +119,10 @@ describe('FanoutEngineNotices', () => {
it('explains a silent engine and names the engines that never share', () => {
render(<FanoutEngineNotices engines={engines} />);
expect(container.textContent).toContain(
- 'ChatGPT usually shares the searches behind its answers, but none arrived since Sep 29.',
+ 'Perplexity usually shares the searches behind its answers, but none arrived since Sep 29.',
);
expect(container.textContent).toContain(
- "Google AI Overview and Google Gemini don't come with the searches behind their answers",
+ "ChatGPT, Google AI Overview, and Google Gemini don't come with the searches behind their answers",
);
});
@@ -121,10 +136,12 @@ describe('isSilentEngine', () => {
it('is only an engine that shares searches, answered, and shared none', () => {
expect(isSilentEngine(engines[1])).toBe(true);
expect(isSilentEngine(engines[0])).toBe(false);
+ // ChatGPT no longer shares searches, so its none is no outage (#1119).
expect(isSilentEngine(engines[2])).toBe(false);
+ expect(isSilentEngine(engines[3])).toBe(false);
// Four answers with none is chance, not an outage.
expect(
- isSilentEngine(engine({ platform: 'chatgpt-web', answers: 4, answersWithFanout: 0 })),
+ isSilentEngine(engine({ platform: 'perplexity-web', answers: 4, answersWithFanout: 0 })),
).toBe(false);
});
});
diff --git a/web/src/config/fanout-platforms.ts b/web/src/config/fanout-platforms.ts
index 014da0a85..39f569eb6 100644
--- a/web/src/config/fanout-platforms.ts
+++ b/web/src/config/fanout-platforms.ts
@@ -7,19 +7,18 @@
*/
/** Platforms whose answers come with the searches the engine ran. */
-export const FANOUT_SHARING_PLATFORMS: readonly string[] = [
- 'chatgpt-web',
- 'copilot-web',
- 'perplexity-web',
-];
+export const FANOUT_SHARING_PLATFORMS: readonly string[] = ['copilot-web', 'perplexity-web'];
/**
* Platforms whose answers never come with their searches: those our provider
- * documents no fan-out for, and the API models (`claude`, `gemini`, `chatgpt`,
- * see resolveModelPlatform in the tracking worker), whose searches we don't
+ * documents no fan-out for; ChatGPT, whose default interface carries no query
+ * text since 2026-09-30 (#1119), so older answers in a long window may still
+ * have some; and the API models (`claude`, `gemini`, `chatgpt`, see
+ * resolveModelPlatform in the tracking worker), whose searches we don't
* capture.
*/
export const FANOUT_NOT_SHARED_PLATFORMS: readonly string[] = [
+ 'chatgpt-web',
'google-aio',
'google-aimode',
'gemini-web',
@@ -30,8 +29,8 @@ export const FANOUT_NOT_SHARED_PLATFORMS: readonly string[] = [
/**
* Answers an engine needs in the window before "it shared none" means
- * something. ChatGPT shared searches on about a quarter of its answers, so
- * four answers with none is ordinary chance on a small brand.
+ * something. An engine can share searches on only some of its answers, so a
+ * few answers with none is ordinary chance on a small brand.
*/
export const FANOUT_MIN_SILENT_ANSWERS = 20;
diff --git a/web/src/lib/actions/fanout.test.ts b/web/src/lib/actions/fanout.test.ts
index 948fbb0a8..1b80f33f1 100644
--- a/web/src/lib/actions/fanout.test.ts
+++ b/web/src/lib/actions/fanout.test.ts
@@ -359,33 +359,41 @@ describe('getQueryFanout — engines', () => {
it('says when an engine that shares its searches last did, and only for such an engine', async () => {
resultRows = [
- ...Array.from({ length: 20 }, () => answer('p-loud', [], 'chatgpt-web')),
+ ...Array.from({ length: 20 }, () => answer('p-loud', [], 'perplexity-web')),
...Array.from({ length: 20 }, () => answer('p-loud', [], 'gemini-web')),
+ ...Array.from({ length: 20 }, () => answer('p-loud', [], 'chatgpt-web')),
];
lastFanoutRows = {
- 'chatgpt-web': '2026-09-29T05:12:00Z',
+ 'perplexity-web': '2026-09-29T05:12:00Z',
'gemini-web': '2026-09-01T00:00:00Z',
+ 'chatgpt-web': '2026-09-29T05:12:00Z',
};
const { getQueryFanout } = await import('./fanout');
const { engines } = await getQueryFanout('brand-1');
- expect(engines.find((e) => e.platform === 'chatgpt-web')?.lastFanoutAt).toBe(
+ expect(engines.find((e) => e.platform === 'perplexity-web')?.lastFanoutAt).toBe(
'2026-09-29T05:12:00Z',
);
- // Gemini never shares searches, so there is nothing to look back for.
+ // Gemini never shares searches, and ChatGPT no longer does (#1119), so
+ // there is nothing to look back for.
expect(engines.find((e) => e.platform === 'gemini-web')?.lastFanoutAt).toBeNull();
- expect(calls.filter((c) => c.single).map((c) => c.eq.platform)).toEqual(['chatgpt-web']);
+ expect(engines.find((e) => e.platform === 'chatgpt-web')?.lastFanoutAt).toBeNull();
+ expect(calls.filter((c) => c.single).map((c) => c.eq.platform)).toEqual(['perplexity-web']);
});
it('does not look back for an engine with too few answers to tell', async () => {
- resultRows = Array.from({ length: 4 }, () => answer('p-loud', [], 'chatgpt-web'));
- lastFanoutRows = { 'chatgpt-web': '2026-09-29T05:12:00Z' };
+ resultRows = Array.from({ length: 4 }, () => answer('p-loud', [], 'perplexity-web'));
+ lastFanoutRows = { 'perplexity-web': '2026-09-29T05:12:00Z' };
const { getQueryFanout } = await import('./fanout');
const { engines } = await getQueryFanout('brand-1');
- expect(engines[0]).toMatchObject({ platform: 'chatgpt-web', answers: 4, lastFanoutAt: null });
+ expect(engines[0]).toMatchObject({
+ platform: 'perplexity-web',
+ answers: 4,
+ lastFanoutAt: null,
+ });
expect(calls.filter((c) => c.single)).toHaveLength(0);
});
});