Export Branded Queries With the Google Search Console API
If an internal report tracks brand searches, use a repeatable Search Analytics API request. Test the pattern against realistic variants and near-matches before comparing the results over time.
Worked example
Search Analytics request body for a synthetic brand
{
"startDate": "2026-10-01",
"endDate": "2026-10-07",
"type": "web",
"dimensions": ["query"],
"dimensionFilterGroups": [{
"filters": [{
"dimension": "query",
"operator": "includingRegex",
"expression": "(?i)(^|[^a-z0-9])fern[ -]?loom([^a-z0-9]|$)"
}]
}]
}Expected matches
Matches fernloom tent, Fern-Loom and fern loom store. Rejects superfernloom and fernlooms.
Steps
- Collect observed spellings and likely false matches. Write a regular expression that distinguishes them and test it on a synthetic list.
- Authorize the Search Analytics query method for a property you can read. In the request body, group by query and add a query filter with the includingRegex operator.
- Request a short date range and inspect the returned queries. Compare the observed matches against the equivalent Performance report filter for the same dates and search type.
- Save the request definition alongside the export. Record the requested date range and row limits before comparing aggregates across weeks.
What to check
- Search Console uses RE2 syntax. Verify the pattern in the actual report before reusing a regex written for another engine.
- The Search Analytics API returns top rows within internal limits. Keep filtered query totals distinct from full property totals.