Search Console's web interface works fine for a quick look, but it caps what you can see. Reports show a limited number of rows, the data only goes back about sixteen months, and filtering across many pages at once gets tedious. For a criminal defense firm with dozens of charge, court and process pages, those limits show up fast.
The bulk data export sends Search Console performance data to Google BigQuery every day. Google launched it in early 2023. Once it is running, you can write SQL against the full data set, keep it as long as you like and join it with other data. This article walks through setting it up for a law firm site and writing a first useful query.
What the export contains
The export creates a dataset in your Google Cloud project, usually named searchconsole, with three tables. The ones you will use most are:
- searchdata_site_impression, with performance data aggregated by property
- searchdata_url_impression, with performance data aggregated by page URL
A third table, ExportLog, records each day's export so you can check that it ran. Each row in the URL table includes the date, the page URL, the query, the country, the device and the search type, along with clicks, impressions and a sum_position field. Average position is not stored directly. You divide sum_position by impressions and add one, because Google's stored position is zero-based.
Some queries are anonymized for privacy. Those rows have is_anonymized_query set to true and an empty query string. On a small site, a large share of impressions may fall into that bucket, so do not be surprised if query-level totals are lower than page-level totals.
Setting up the export
You need a Google Cloud project with the BigQuery API turned on. Read Google's notes on billing first, since BigQuery storage and queries can cost money once you pass the free tier. In the Cloud project, grant Search Console's service account permission to write to BigQuery. Then, in Search Console, open Settings, choose bulk data export, enter the project ID and pick a dataset location. Google's documentation gives the exact service account name and role.
The export only includes data from the day it starts. It does not backfill history, so set it up early even if you will not use it for a while. A firm that starts the export today will have a year of detailed data by next November.
A first query: clicks by practice area
Defense firm URLs often follow a pattern such as /dui/first-offense/ or /drug-charges/possession/. The first folder makes a convenient practice area label. This query groups the last 90 days of data by that folder:
SELECT REGEXP_EXTRACT(url, r'^https?://[^/]+/([^/]+)/') AS practice_area, SUM(clicks) AS clicks, SUM(impressions) AS impressions, ROUND(SUM(sum_position) / SUM(impressions) + 1, 1) AS avg_position FROM `your-project.searchconsole.searchdata_url_impression` WHERE data_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY) AND search_type = 'WEB' GROUP BY practice_area ORDER BY clicks DESC; Replace your-project with your project ID. If your URLs are flat, you can build the label with a CASE statement that matches words in the URL instead.
Questions this data answers well
Once the export has a few months of data, some questions that are awkward in the interface become simple. Which charge pages get impressions for statute number searches? Filter the query field with a regular expression for digits. How does mobile compare with desktop for court pages? Group by device and filter URLs that contain your courts folder. Which pages lost clicks after a site change? Compare two date ranges for the same URLs.
Branded searches deserve their own treatment, because a firm's name searches behave differently from searches for a charge. A clear walkthrough of separating branded from unbranded searches in Search Console explains the logic, which carries over easily into a SQL filter.
Keeping costs and errors in check
BigQuery charges by the amount of data scanned. The export tables are partitioned by date, so always filter on data_date. On a typical law firm site the tables stay small, but an unfiltered query against several years of data still scans more than it needs to.
Check the ExportLog table now and then. If the export stops because a permission changed or billing lapsed, you will not get the missing days back.
Questions about Search Console bulk export
Does the export include Discover and News data?
The search_type field covers web, image, video, news, Discover and Google News results where your site appears. Most law firm sites will see nearly all of their data under web search.
Can we connect it to Looker Studio?
Yes. Looker Studio can read BigQuery tables directly, and you can point a dashboard at a saved query instead of the raw table to keep costs down.
Is it worth setting up for a small firm?
If the firm has fewer than a dozen pages, the regular interface is probably enough. Once the site has many charge and court pages, the export pays for itself in time saved.
SBD Marketing works only with criminal defense firms and helps them with websites, SEO for the charges they defend, visibility in AI search tools and SEO audits. More guides on this subject are in the library on legal marketing analytics and search data.
