How to export Google Ads data to CSV with a query
Pull exactly the columns you need from Google Ads with a GAQL query and download the result as CSV.
The Google Ads interface exports the columns of whichever table you are looking at. When you need a specific combination of fields β or the same export from several accounts β a query is quicker.
Export from GAQL Lab
- Open GAQL Lab and pick the account.
- Write the query, start from an example, or assemble it in the Builder tab.
- Click Run Query.
- Click CSV to download the rows, or Copy CSV to paste them straight into a spreadsheet.
Cost values are already converted from micros and columns have readable headers. Tick Raw values next to the buttons if you want the untouched API values (micros, enum codes, raw field paths) for a pipeline. The file opens cleanly in Excel, including non-Latin characters.
A few useful queries
Search terms with cost and conversions:
SELECT search_term_view.search_term, campaign.name,
metrics.clicks, metrics.cost_micros, metrics.conversions
FROM search_term_view
WHERE segments.date DURING LAST_30_DAYS
ORDER BY metrics.cost_micros DESCKeywords with quality score:
SELECT ad_group_criterion.keyword.text,
ad_group_criterion.quality_info.quality_score,
metrics.impressions
FROM keyword_view
WHERE segments.date DURING LAST_30_DAYSPerformance by device:
SELECT campaign.name, segments.device,
metrics.clicks, metrics.conversions
FROM campaign
WHERE segments.date DURING LAST_30_DAYSThe same export from several accounts
Switch the account in the dropdown and run the query again; your recent queries are kept in History.
Making it automatic
If you run the same export every week, turn it into a script. Click AdsApp.search() to copy a snippet that runs the query inside Google Ads, add a few lines to write the rows to a Google Sheet, and schedule it. Deployed through chiliad, one script can fill a separate sheet for each client: see How to use different script settings for each account.
- 1
Pick the account to query.
- 2
Start from an example and adapt it.
- 3
Run Query, or press
Cmd+Enter. The validator flags unknown fields and syntax errors before you run. - 4
Results with readable column names. Cost values in micros are converted for you.
- 5
Copy the query as an
AdsApp.search()snippet for a script, or download the rows as CSV.