Journal
Google Search Console BigQuery: Setup, SQL, and SEO Reporting
A practical guide to connecting Search Console bulk export to BigQuery, understanding its data, and building SQL reports for long-term SEO analysis.
- google-search-console
- bigquery
- seo-reporting
- sql
- search-data
Search Console retains performance data in its interface for 16 months, which can leave a team without the history needed to compare this year with two years ago. Google Search Console BigQuery export gives analysts a way to preserve daily data, query it with SQL, and build repeatable reports beyond one-off downloads.
To connect Search Console to BigQuery, choose a verified Search Console property and a Google Cloud project, then configure bulk data export in the property’s settings. Search Console sends performance data to the selected dataset, where SQL can summarize clicks and impressions by query, page, date, country, or device. Bulk export is useful for longer-term analysis, but anonymized queries remain unavailable as identifiable search terms.
Why send Google Search Console data to BigQuery?
The Search Console interface works well for checking recent performance and investigating a focused question. Its 16-month history, however, limits year-over-year comparisons once older dates age out. A bulk export can preserve the daily performance data in a warehouse, where an analyst can retain and query it according to the project’s settings.
BigQuery is most valuable when the analysis needs to be repeated or segmented at scale. A saved SQL query can classify terms as brand or non-brand, group landing pages by product line, or compare the same date ranges each month. That is more consistent than downloading multiple spreadsheets and combining them by hand.
There is also a distinction between Search Console’s interface reports and the bulk export. High-volume query data in Search Console reports can be heavily sampled; bulk export is designed to provide a warehouse-level performance archive that is not subject to the interface’s daily row limit. It also supports custom categorization and joins. The export still withholds anonymized query text, so an archive is broader and more useful for analysis, but not a record of every identifiable search phrase.
| Approach | Useful for | Main tradeoff |
|---|---|---|
| Search Console interface | Quick checks and focused investigations | A 16-month history and report-level constraints |
| Manual Sheets or Excel export | A one-off snapshot or small analysis | Repeated downloads and file consolidation become maintenance work |
| BigQuery bulk export | Repeatable SQL, segmentation, and a longer-term archive | Requires a Cloud project, dataset decisions, and ongoing ownership |
For a single snapshot, a spreadsheet may be the simplest option. A team that needs multi-year comparisons, recurring segmentation, or shared reporting has a stronger reason to set up BigQuery.
What the Search Console bulk export includes—and excludes
Search Console exports performance data into tables with metrics such as clicks and impressions and dimensions such as date, search type, country, and device. The two principal tables serve different grains: searchdata_site_impression provides property-level aggregation, while searchdata_url_impression includes URL-level performance. The Search Console table reference describes the fields and table structure.
Anonymized queries are not exported as readable query text. In query-related rows, the query can be NULL and is_anonymized_query can identify an anonymized row. Treating a null query as an empty string or assigning it to a fabricated search term creates a misleading report. For visible-query analysis, exclude anonymized rows and null query values explicitly.
This is also why BigQuery query totals can differ from Search Console totals. A property-level report can include performance that cannot be tied to a visible query, while a query report necessarily focuses on the terms available to that report. Differences can also come from date range, search type, country, device, property scope, or aggregation grain.
The site and URL tables should not be added together as if they were separate sets of visits. They are alternative aggregations of performance. Use the site table for property-level totals and the URL table for page-level analysis, and label the chosen grain in the report.
Position is another field that needs interpretation. The table reference describes sum_top_position for site-level data and sum_position for URL-level data. In URL-level analysis, an impression-weighted average position can be calculated by dividing the sum of positions by impressions and adding one, because the stored position sum is zero-based. Confirm the relevant field in the dataset before adapting a query.
Before you connect Search Console to BigQuery
The export requires a Search Console property and a Google Cloud project to receive its data. The setup is performed for a specific property, so first decide whether the intended scope is a domain property or a URL-prefix property. They represent different property boundaries and should not be treated as interchangeable when comparing reports.
Choose the Cloud project and dataset location with the team’s ongoing use in mind. The project ID is entered during configuration, and the dataset becomes the destination for exported tables. Dataset location affects where the data is stored, so it is worth settling before the first export rather than treating it as a temporary setting.
Before starting, agree on who will own the project, dataset, recurring queries, and access to the reports. A short preflight list helps make the setup repeatable:
- Confirm the exact Search Console property to export.
- Select a Google Cloud project the team can continue to use and manage.
- Choose a dataset name and location that fit the project’s data setup.
- Decide who will review export status and manage retention settings.
- Record the property, project ID, dataset, and intended report grain for future analysts.
The official bulk export setup guide documents the required configuration flow. Access requirements depend on the organization’s Google Cloud permissions, so the person setting up the export needs appropriate access to both the Search Console property and destination project.
Connect Google Search Console to BigQuery
Opening BigQuery alone does not connect a Search Console property. The export must be configured from Search Console and pointed to the Google Cloud project that will receive the data.
Prepare the Cloud project
In Google Cloud Console, select the intended project and enable the services required for BigQuery. The Search Console setup guide covers enabling the BigQuery APIs and the project access needed to accept the export. Use the project that the team has chosen for the archive, not a temporary project that may later be abandoned.
Configure bulk export in Search Console
Open the target property in Search Console and navigate to Settings, then Bulk data export. Enter the Cloud project ID, select a dataset name and location, and confirm the destination. Review the selected property and destination before saving so the export starts in the intended place.
Google’s setup instructions say the first export can take up to 48 hours to arrive after successful configuration. That window is useful when deciding whether a newly created dataset is genuinely empty or simply waiting for its first export.
Confirm the export
Open the selected project and dataset in BigQuery and look for the Search Console performance tables and the ExportLog table. The log provides operational evidence of successful exports and the dates they cover. The table reference explains how to interpret the exported schema and log fields.
A practical first check is to confirm that the expected performance tables exist and that their latest dates match the available export history. If the first export has not arrived beyond the documented setup window, revisit the property’s export configuration and the project’s API access before changing SQL. The central question is whether the destination and property are connected correctly, not whether a query has been written yet.
Understand the exported tables and schema
Start with the table that matches the question. searchdata_site_impression is suited to daily property trends, while searchdata_url_impression supports page and query-by-URL analysis. Both can support clicks and impressions reporting, but their aggregation levels differ.
Useful fields to locate include:
data_date: the performance date, represented in Pacific Time.site_url: the Search Console property identifier.query: a visible query where Search Console exposes it; anonymized query rows can have a null value.url: the landing page in the URL-level table.clicksandimpressions: performance measures to aggregate.search_type,country, anddevice: dimensions for filtering or grouping.is_anonymized_query: a flag for privacy-protected query rows.sum_position: the URL-level position sum used in the weighted calculation.
Inspect the actual BigQuery schema before adapting examples. Field availability can differ by table, and details such as position fields are table-specific. This is particularly important if a report moves from site-level trends to page-level averages.
For filters, use the values stored in the export. Search type values are uppercase, such as WEB; country codes use uppercase values such as USA; device values are uppercase, such as MOBILE. A filter using a different case can return no rows. The examples below use these exact forms.
Run your first Search Console queries in BigQuery
The examples use your-project.searchconsole_yourproperty as a placeholder. Replace it with the project and dataset shown in BigQuery, then confirm the table and field names against the dataset schema.
Check daily clicks and impressions
This query reads property-level data and returns one row per date for web search. The date window uses Pacific Time to align the query’s current date with Search Console’s performance dates.
SELECT
data_date,
SUM(clicks) AS clicks,
SUM(impressions) AS impressions
FROM `your-project.searchconsole_yourproperty.searchdata_site_impression`
WHERE data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 28 DAY)
AND CURRENT_DATE('America/Los_Angeles')
AND search_type = 'WEB'
GROUP BY data_date
ORDER BY data_date;The WHERE clause limits the dates and search type before aggregation. Change 28 days to the period the report needs, and use the same range when comparing this result with another report.
Summarize visible queries
For a query report, use the URL table and group by query. The query and anonymization filters below retain visible terms without treating null query rows as empty strings.
SELECT
query,
SUM(clicks) AS clicks,
SUM(impressions) AS impressions,
SAFE_DIVIDE(SUM(clicks), SUM(impressions)) AS ctr
FROM `your-project.searchconsole_yourproperty.searchdata_url_impression`
WHERE data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 28 DAY)
AND CURRENT_DATE('America/Los_Angeles')
AND search_type = 'WEB'
AND query IS NOT NULL
AND NOT is_anonymized_query
GROUP BY query
HAVING SUM(impressions) >= 20
ORDER BY impressions DESC
LIMIT 100;SAFE_DIVIDE returns a safe result when the denominator is zero. The 20-impression cutoff is a reporting choice in this example, not a Search Console rule. Removing the HAVING clause includes all visible-query groups in the selected period.
Summarize page performance
A page report groups URL-table data by landing page. The example filters to mobile web performance using the export’s uppercase dimension values.
SELECT
url,
SUM(clicks) AS clicks,
SUM(impressions) AS impressions,
SAFE_DIVIDE(SUM(clicks), SUM(impressions)) AS ctr
FROM `your-project.searchconsole_yourproperty.searchdata_url_impression`
WHERE data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 28 DAY)
AND CURRENT_DATE('America/Los_Angeles')
AND search_type = 'WEB'
AND device = 'MOBILE'
GROUP BY url
ORDER BY clicks DESC
LIMIT 100;To filter for the United States, add AND country = 'USA'. Add country or device restrictions only when the report’s purpose calls for that segment; otherwise, the filter changes the scope of the totals.
Build useful SEO views from the export
A useful warehouse report answers one specific question with a stable definition. Start with a comparison period, a page group, or a query segment rather than combining every dimension into one dashboard. The following patterns turn the basic counts into two practical investigation views.
Compare recent and prior periods
This query compares two adjacent 28-day periods for each URL, ending yesterday so the current, incomplete day does not enter the comparison. It reports both clicks and impressions because a click change can reflect visibility, click-through rate, or both.
SELECT
url,
SUM(IF(data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 28 DAY)
AND DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 1 DAY), clicks, 0)) AS recent_clicks,
SUM(IF(data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 56 DAY)
AND DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 29 DAY), clicks, 0)) AS prior_clicks,
SUM(IF(data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 28 DAY)
AND DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 1 DAY), impressions, 0)) AS recent_impressions,
SUM(IF(data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 56 DAY)
AND DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 29 DAY), impressions, 0)) AS prior_impressions
FROM `your-project.searchconsole_yourproperty.searchdata_url_impression`
WHERE data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 56 DAY)
AND DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 1 DAY)
AND search_type = 'WEB'
GROUP BY url
ORDER BY recent_clicks DESC;The date ranges are adjacent and equal in length. A percentage-change column can be added with SAFE_DIVIDE(recent_clicks - prior_clicks, prior_clicks), but interpret it only when prior clicks are greater than zero. If the prior period has no clicks, the percentage change is undefined; the raw counts remain useful context.
Find striking-distance pages
A striking-distance view can prioritize URLs with substantial impressions and average positions near the first page. The URL table’s position sum is zero-based, so the calculation below divides summed position by impressions and adds one. The filter selects average positions from 8 through 20 and at least 50 impressions.
SELECT
url,
SUM(impressions) AS impressions,
SUM(clicks) AS clicks,
SAFE_DIVIDE(SUM(sum_position), SUM(impressions)) + 1 AS avg_position
FROM `your-project.searchconsole_yourproperty.searchdata_url_impression`
WHERE data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 28 DAY)
AND CURRENT_DATE('America/Los_Angeles')
AND search_type = 'WEB'
GROUP BY url
HAVING SUM(impressions) >= 50
AND SAFE_DIVIDE(SUM(sum_position), SUM(impressions)) + 1 BETWEEN 8 AND 20
ORDER BY impressions DESC;For example, a URL with 120 impressions and a summed position of 960 has a calculated average position of 9: 960 / 120 + 1. An illustrative result might look like this:
| URL | Impressions | Clicks | Average position |
|---|---|---|---|
/guides/site-migrations | 120 | 8 | 9.0 |
/features/keyword-groups | 86 | 3 | 12.5 |
Those rows suggest which pages merit a closer query and content review; they are not a ranking forecast. The number is an average across the selected dates and impressions, not a fixed position for every search.
A team can connect this kind of trend analysis to its refresh workflow. Seovyn considers an article for refresh when clicks fall by more than 40% over 28 days, when its average position is between 8 and 20 with at least 50 impressions, or when it is more than 180 days old. Those are product refresh signals; an analyst can use a BigQuery view to investigate why a page meets a threshold before deciding what to change.
Surface possible page overlap for a query
To identify queries receiving impressions across multiple URLs, aggregate first by query and URL, then return query groups with at least two URLs above the chosen impression threshold. The threshold below is an analyst-defined screening choice.
WITH query_page AS (
SELECT
query,
url,
SUM(impressions) AS impressions,
SUM(clicks) AS clicks
FROM `your-project.searchconsole_yourproperty.searchdata_url_impression`
WHERE data_date BETWEEN DATE_SUB(CURRENT_DATE('America/Los_Angeles'), INTERVAL 28 DAY)
AND CURRENT_DATE('America/Los_Angeles')
AND search_type = 'WEB'
AND query IS NOT NULL
AND NOT is_anonymized_query
GROUP BY query, url
)
SELECT
query,
url,
impressions,
clicks
FROM query_page
WHERE query IN (
SELECT query
FROM query_page
WHERE impressions >= 20
GROUP BY query
HAVING COUNT(DISTINCT url) >= 2
)
ORDER BY query, impressions DESC;The output is a review queue, not an automatic diagnosis. Check whether the URLs target the same intent, whether each serves a distinct audience, and how the page-level pattern changes over time. Multiple URLs can appear for a query for reasons that do not call for consolidating pages.
Validate results and troubleshoot common issues
When a result differs from the Search Console interface, first align the report definitions. Check the property, dates, search type, country, device, and whether the query uses site-level or URL-level data. A property-level total and a page-level sum are different views of performance, so compare like with like.
Use this sequence when a query returns no rows or unexpected totals:
- Confirm the project, dataset, table, and Search Console property in the query path.
- Temporarily remove country and device filters, then confirm
search_type = 'WEB'matches the data. - Check the date range and the Pacific Time basis of
data_date. - For query reports, distinguish visible terms from null anonymized-query rows.
- Confirm that the selected table contains the fields used in the SQL, especially the position field.
- Review the latest successful dates in
ExportLogif the dataset appears to have a gap.
A zero-row result often comes from a mismatched value or an over-restrictive filter. Uppercase dimension values matter: WEB and MOBILE are not the same literals as web and mobile. Start with a narrow set of filters, inspect distinct values, then add segments back one at a time.
If dates are missing, check whether the export has arrived for those dates before treating the result as a SQL defect. The export log is useful for confirming successful arrivals; it is an operational check, while the performance tables remain the source for the metrics being analyzed.
Use BigQuery as a longer-term Search Console archive
An ongoing export can preserve dates beyond Search Console’s 16-month interface window. This makes longer-term comparisons possible after enough export history has accumulated. It does not populate dates from before the export began, so an organization that expects multi-year analysis benefits from configuring the archive before older interface data expires.
Retention is a project decision. BigQuery storage settings and any organization policies determine how long exported tables remain available. If a team intends to retain a permanent history, its owner should understand whether project policies or table expiration settings remove old partitions. If the goal is a limited archive, define that retention deliberately rather than letting an unnoticed setting determine the comparison window.
Bulk export also changes the maintenance pattern, not the need for maintenance. Compared with recurring spreadsheet downloads, it can reduce manual collection and consolidation. A named owner still needs to monitor that exports continue, maintain shared SQL, and keep the retention approach aligned with reporting needs. A small site with occasional snapshots may reasonably prefer local files; a team that repeatedly needs segmented, multi-year analysis is more likely to benefit from a warehouse.
Send BigQuery results to a reporting workflow
BigQuery can remain the analytical source while a reporting layer presents stable query results to marketers and stakeholders. Looker Studio is one option for charts based on BigQuery output; its BigQuery connector documentation describes the connection. A daily page summary or query report can provide a clear view without requiring every viewer to write SQL.
Keep the reporting grain explicit. Label a site-level chart as property-level and a URL-table chart as page-level. For a starter report, use date, clicks, impressions, CTR, and one clearly defined query or page dimension. Add country, device, or search type only when that slice supports a specific decision.
BigQuery’s costs depend on storage and query usage. Google’s BigQuery pricing page describes the free usage tier for storage and query processing, along with the applicable billing models. For an estimate, use the project’s observed storage and query patterns and the pricing page’s current terms; there is no single cost that applies to every Search Console property.
FAQ
How do I connect Google Search Console to BigQuery?
Select a Search Console property and Google Cloud project, enable the required BigQuery services, then open Bulk data export in the property’s settings. Enter the project ID and choose a dataset name and location. Once configured, check the dataset for the Search Console performance tables and export log.
What happens if anonymized queries appear in the export?
An anonymized query row can have a NULL query and an anonymization flag. It does not expose the search phrase, so a query report should keep it out of visible-term groupings while recognizing that those rows affect the distinction between query-level and property-level totals.
Can BigQuery restore Search Console data from before the export started?
Bulk export builds a continuing archive from its setup, rather than backfilling a team’s full historical interface window. If an older comparison matters, export needs to be running before the relevant Search Console dates age beyond the interface’s 16-month retention period.
What does storing Search Console data in BigQuery cost?
Google provides a free usage tier for BigQuery storage and query processing, described on its pricing page, but actual charges depend on data stored and queries run. A small daily aggregation and a query scanning a large date range can have different usage. Use the project’s billing view and the official pricing terms to evaluate the team’s own workload.
Start free with Seovyn to build a source-grounded content workflow alongside Search Console analysis: Start free.
Keep reading
- Google Search Console Average Position: Why Trackers DifferA practical guide to interpreting Search Console’s impression-based position metric, understanding rank-tracker snapshots, and investigating changes with query-level evidence.
- Google Search Console Impressions: What They Count and How to Read ThemLearn what counts as a Search Console impression, how to segment the metric, and how to turn changes into a proportionate SEO action.
- Google AI Overview Tracking: Measure Citations, Mentions, and ClicksA practical way for lean teams to track AI Overview presence, brand mentions, cited URLs, and organic performance as separate signals.