Parsing Bing AI Performance Exports Into Database Rows
Bing Webmaster Tools’ AI Performance report summarizes when a site’s pages appear as sources in AI-generated answers. Its downloads contain aggregated report…
If you already save Bing Webmaster Tools AI Performance exports, a changed column or value format can break an importer or make a trend misleading. A schema describes a file's structure: its field names, their order, and the kinds of values they contain. To detect changes, keep each original export, record its context and observed structure, then compare that record with later exports.
Bing provides AI Performance exports in CSV and Excel formats, but its public documentation does not publish a versioned, complete field-and-type contract for every export. The report covers citation activity across Microsoft Copilot, AI-generated Bing summaries, and select partner integrations; its data is aggregated and representative rather than a complete log. Use the downloaded file to document the structure Bing sent. Before adding its values to a historical trend, check whether each metric still has the same meaning. Bing describes the report’s scope and export behavior in its AI Performance documentation.
Keep the downloaded file unchanged. Store it beside a manifest, a record of when and how you collected the file. Include the site or property, report view, export format, and date range. Also record the applied filters, original filename, file hash, and importer version. Record whether the file is a fresh download or a re-export of an earlier period.
Bing says applied filters affect exports, and it describes daily refreshes, processing delays, and later data refinements. A re-export for the same dates can therefore contain different values even when its structure stays the same. The export documentation also covers the report’s views and filters.
Preserve the original bytes and create normalized data as a separate output. That lets you rerun an importer after a bug fix or compare a later export without losing the file that Bing supplied.
For every export, capture the exact header strings and their order. Also record the set of field names regardless of order, along with the values observed under each field. Record the row count and empty-value counts, plus a hash of the original file. Record each field's observed type separately from what you think the field means. A number-looking value might be an identifier rather than a measure, and a field with only blanks has no known type yet.
The code below inspects a CSV you supply. It does not assume any particular Bing field names. It records types found in the file, not a guaranteed type definition from Bing. For Excel exports, use a reader that preserves the workbook’s sheets and cell values, then record the same observations for the selected sheet.
Example setup: article setup: technical explainer: direct mechanism (private trial 2026-10-04). No example Bing headers or sample values are asserted here as universal or current.
import csv
import hashlib
import io
import json
import sys
from collections import Counter
from decimal import Decimal, InvalidOperation
from pathlib import Path
def observed_type(value):
value = value.strip()
if not value:
return None
if value.casefold() in {"true", "false"}:
return "boolean"
try:
number = Decimal(value)
if number.is_finite():
return "integer" if number == number.to_integral_value() else "decimal"
except InvalidOperation:
pass
return "text"
path = Path(sys.argv[1])
raw = path.read_bytes()
text = raw.decode("utf-8-sig")
reader = csv.reader(io.StringIO(text, newline=""))
headers = next(reader, None)
if headers is None:
raise ValueError("The CSV has no header row.")
if len(headers) != len(set(headers)):
raise ValueError("Duplicate headers found; resolve them before mapping by name.")
type_counts = {name: Counter() for name in headers}
empty_counts = {name: 0 for name in headers}
row_count = 0
row_width_mismatches = 0
for row in reader:
row_count += 1
if len(row) != len(headers):
row_width_mismatches += 1
for index, name in enumerate(headers):
value = row[index] if index < len(row) else ""
kind = observed_type(value)
if kind is None:
empty_counts[name] += 1
else:
type_counts[name][kind] += 1
snapshot = {
"file_name": path.name,
"sha256": hashlib.sha256(raw).hexdigest(),
"row_count": row_count,
"headers_in_order": headers,
"fields_as_set": sorted(set(headers)),
"columns": {
name: {
"observed_type_counts": dict(type_counts[name]),
"empty_count": empty_counts[name],
"empty_rate": empty_counts[name] / row_count if row_count else None,
}
for name in headers
},
"row_width_mismatches": row_width_mismatches,
}
print(json.dumps(snapshot, indent=2))
The type check classifies values from their text, so it cannot establish what they mean or which units they use. It also does not infer date formats or distinguish a numeric identifier from a numeric measure. Keep the raw values available for investigation, and treat an all-empty field as unknown rather than as a confirmed type.
Compare field sets, header order, observed types, and empty-value rates separately. Comparing field names as sets shows which fields were added or removed. Comparing header order catches importers that use column positions. Comparing observed types and empty-value rates can reveal changes that a header-only check misses.
previous_fields = set(previous["fields_as_set"])
current_fields = set(current["fields_as_set"])
added = current_fields - previous_fields
removed = previous_fields - current_fields
order_changed = (
previous["headers_in_order"] != current["headers_in_order"]
)
common = previous_fields & current_fields
type_changes = {
name: (
previous["columns"][name]["observed_type_counts"],
current["columns"][name]["observed_type_counts"],
)
for name in common
if previous["columns"][name]["observed_type_counts"]
!= current["columns"][name]["observed_type_counts"]
}
A removed field and a new field with similar-looking values suggest a possible rename, but they do not prove one. Check the report view and the values before mapping the fields together. Likewise, a field that keeps its name can still change meaning without triggering this diff.
When a diff appears, first confirm that both files use the same property, view, date range, filters, and format. Then inspect the raw headers and rows for changes in encoding or quoting. Check for date-format or row-width changes too. When possible, export the same date range again with matching settings. If the file hash changes but the fields and types stay stable, check for refreshed or refined data before interpreting the value difference as a change in site performance.
Bing introduced Intents, Topics, Citation Share, and Compare in June 2026, then announced Topics Portfolio beta in October. These releases show that report capabilities have expanded; they do not establish which columns appear in a particular CSV or Excel export. Use the feature announcements as context, then verify the fields in your own download.
A stable schema and a comparable metric are different things. Schema continuity means the observed fields and types stayed consistent. Metric comparability means the measure still has the same definition, scope, time basis, and filters. A header diff can test the first; it cannot establish the second.
Use the evidence to decide how to handle the series:
| Finding | Treatment |
|---|---|
| The field order changed, while names, types, definitions, and export context match | Map values by header name and test the importer. The order change alone does not break comparability. |
| A field was added or removed | Keep clearly equivalent fields under review; investigate the changed field separately. Do not assume that every existing metric changed. |
| A field name changed | Treat the rename as unverified until the definition and scope match. |
| The field name stayed the same, but its definition, units, population, or calculation changed or is unknown | Mark a boundary in the series. Store the new metric as a separate version or label the comparison unverified. |
| The schema stayed the same, but a later download changes values for the same dates | Check refresh and data refinement before reading the difference as a performance trend. |
| The view, filters, or date range changed | Align the settings before comparing, or label the result as a different data slice. |
Bing says its AI Performance measures are aggregated and sampled, and that totals can differ between views. It also describes classifier-based Intents and Topics as evolving features. Those conditions make it unsafe to infer a stable definition from a repeated field name alone. For more on the report’s coverage and limits, see what AI Performance shows; for ingestion details, see how to parse Bing exports.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com