Scaling Search Console Analytics with BigQuery
For large properties, the Search Analytics API’s daily row limit can prevent exporting every row you need.
Official Google behavior: BigQuery bulk export provides Search Console performance data in BigQuery for long-term analysis and custom reporting. It is not access to internal indexing logs or individual search events. The export avoids the daily row limit of the Search Analytics API, but still follows Search Console aggregation and privacy rules; anonymized queries do not expose query text. Monitor export status and completeness before comparing periods.
Setting Up BigQuery Export in 4 Steps
Figure 7.1: The Bulk Data Export settings interface displaying active pipeline status, Google Cloud Project ID connection, target dataset configuration, and multi-region dataset location.
┌────────────────────────────────────────────────────────────────────────┐
│ BIGQUERY EXPORT SETUP WORKFLOW │
│ │
│ 1. Cloud Project: Open Google Cloud Console and enable the required APIs. │
│ 2. IAM Permissions: Grant BigQuery Data Editor & Job User to: │
│ search-console-data-export@system.gserviceaccount.com │
│ 3. GSC Settings: In Search Console, navigate to Settings > │
│ "Bulk data export" and input your GCP Cloud Project ID. │
│ 4. Dataset Location: Select a supported dataset location. │
└────────────────────────────────────────────────────────────────────────┘
Pro Tip: Export is Forward-Looking Only!
The scheduled export starts after setup; it does not backfill the historical data already visible in Search Console. Verify the first available date and subsequent successful exports. Engineering recommendation: Plan retention, access, and cost controls before activation.
Follow the official setup guide for billing, the BigQuery API and BigQuery Storage API, dataset location, and the required IAM roles. Scope permissions to the intended project and data access.
BigQuery Table Schemas
Once active, Google creates two daily date-partitioned tables in your dataset:
1. searchdata_site_impression
Contains site-level aggregated metrics partitioned by date:
data_date: Date of the impressionsite_url: Your property domainquery: The search termis_anonymized_query: Boolean indicating privacy maskingcountry,search_type,deviceimpressions,clicks,sum_top_position(zero-based position sum)
2. searchdata_url_impression
Contains URL-level granular impressions:
- Shared dimensions include date, property, query, country, search type, device, and anonymization flags.
url: URL-level attribution, generally to the canonical URL under Search Console rules.sum_position: The URL-table position sum; the site table instead usessum_top_position.is_anonymized_discover: Whether Discover URL information is withheld, not a general Discover-traffic flag.
3. ExportLog
Records successful exports. Missing entries and the export settings/status can help identify failures; the log itself is not a complete list of failed jobs. Consult the official table reference for fields and table-specific semantics. Multiple rows can share dimension values, so aggregate metrics with SUM. Average position is SUM(position_sum) / SUM(impressions) + 1, using the field belonging to the selected table and only search types where position is meaningful.
Reference SQL for Investigation
A. Detect Keyword Cannibalization at Scale
Example: Find queries with impressions attributed to multiple URLs. This is an investigation lead, not proof of harmful cannibalization. The 500-impression filter is an example selection threshold. Aggregate per query and URL before selecting the leading pages:
WITH query_pages AS (
SELECT query, url, SUM(clicks) AS clicks, SUM(impressions) AS impressions
FROM `your-project.searchconsole.searchdata_url_impression`
WHERE data_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
AND data_date < CURRENT_DATE()
AND search_type = 'WEB'
AND NOT is_anonymized_query
AND query != ''
GROUP BY query, url
)
SELECT
query,
COUNT(DISTINCT url) AS competing_urls_count,
ARRAY_AGG(STRUCT(url, clicks, impressions) ORDER BY impressions DESC LIMIT 3) AS top_competing_pages,
SUM(impressions) AS total_impressions,
SUM(clicks) AS total_clicks
FROM query_pages
GROUP BY
query
HAVING
competing_urls_count > 1
AND total_impressions > 500
ORDER BY
total_impressions DESC;
B. Track Query Drift (Year-over-Year New Queries)
Example: Compare observed query sets over two 30-day windows one year apart. Missing exports or anonymized query text can produce apparent new queries; verify both periods in ExportLog first.
WITH current_period AS (
SELECT DISTINCT query
FROM `your-project.searchconsole.searchdata_site_impression`
WHERE data_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
AND data_date < CURRENT_DATE()
AND search_type = 'WEB' AND NOT is_anonymized_query AND query != ''
),
previous_period AS (
SELECT DISTINCT query
FROM `your-project.searchconsole.searchdata_site_impression`
WHERE data_date >= DATE_SUB(DATE_SUB(CURRENT_DATE(), INTERVAL 1 YEAR), INTERVAL 30 DAY)
AND data_date < DATE_SUB(CURRENT_DATE(), INTERVAL 1 YEAR)
AND search_type = 'WEB' AND NOT is_anonymized_query AND query != ''
)
SELECT
c.query AS brand_new_discovered_query,
SUM(s.clicks) AS current_clicks,
SUM(s.impressions) AS current_impressions
FROM
current_period c
LEFT JOIN
previous_period p ON c.query = p.query
JOIN
`your-project.searchconsole.searchdata_site_impression` s ON c.query = s.query
WHERE
p.query IS NULL
AND s.data_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
AND s.data_date < CURRENT_DATE()
AND s.search_type = 'WEB' AND NOT s.is_anonymized_query AND s.query != ''
GROUP BY
brand_new_discovered_query
ORDER BY
current_clicks DESC
LIMIT 100;
BigQuery Cost Optimization Strategies
Querying billions of rows can quickly consume cloud budget if not properly governed:
- Engineering recommendation: filter by
data_date: Partition pruning can reduce scanned data. Measure estimated bytes with a dry run; savings depend on the query and dataset. - Avoid
SELECT *: Only project the explicit columns needed for your analysis (query,url,clicks).
Lab Challenge: Query Your BigQuery Stream
Hands-On Challenge
- Open the Google Cloud BigQuery console.
- Locate the Search Console dataset.
- Run a query calculating the top 10 landing pages with the highest average position improvement over the past 14 days.
Use the performance topic and BigQuery reference for analysis scope. Keep assumptions explicit in the CTR calculator; investigate missing canonical destinations with the canonical runbook.