How to Query Auction Insights Data via Google Ads Scripts?

92 views
Skip to first unread message

Pitchayut Wangsukit

unread,
Oct 30, 2025, 5:00:45 AMOct 30
to Google Ads Scripts Forum

Hello,

I am developing a Google Ads script to export auction insights data from search campaigns directly into a Google Sheet. I am encountering an issue and would appreciate some guidance.

My objective is to automate the reporting of auction insights metrics.

Could you please advise on the following:

  1. What is the correct report name or view to query for auction insights (e.g., auction_insights)?
  2. Which specific metrics and dimensions are available and necessary for this report (e.g., metrics.impression_shareauction_insights.display_domain)?
  3. Are there any mandatory filters or parameters required in the WHERE clause, such as filtering by campaign.id?

A basic example of a GAQL query to retrieve this data would be extremely helpful.

Thank you for your assistance.


Google Ads Scripts Forum Advisor

unread,
Oct 30, 2025, 11:24:10 AMOct 30
to adwords...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads Scripts support team.
 
The provided metrics.impression_share and auction_insights.display_domain are invalid metrics. To know valid and supported metrics in the Google Ads API, refer to this document

Note that the auction insight metrics are not publicly available and only for the allowlisted accounts. For example, below metrics :

If your account is allowlisted, you can fetch the search impression share and domain name using the campaign report. This can be accessible via AdsApp.search/AdsApp.report. For more details refer to this reporting document.

You may try the sample code : 

function main () {
  
 var spreadsheet = SpreadsheetApp.openByUrl("ADD_YOUR_SPREADSHEET_URL");
 var sheet = spreadsheet.getSheetByName("ADD_YOUR_SHEET_NAME");

 const query = `SELECT campaign.id, campaign.name, campaign.status, campaign.advertising_channel_type, metrics.auction_insight_search_impression_share, segments.auction_insight_domain FROM campaign`;
   
 console.log("GAQL query to fetch the auction insight search impression share and domain") 
 const report = AdsApp.report(query);
 const rows = report.rows();
  
  while (rows.hasNext()) {
    let row = rows.next();
  console.log(row);
}
    
 report.exportToSheet(spreadsheet.getActiveSheet());
  
  console.log("Data exported successfully");
}

Additionally, you can utilize the Query Builder and Query Validator to build and validate your queries.

I hope this helps! Feel free to get back to us if you have any further questions. 

Thanks,
 
Google Logo Google Ads Scripts Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-10-30 15:23:36Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vSDed:ref" (ADR-00337725)



Pitchayut Wangsukit

unread,
Oct 30, 2025, 7:55:21 PMOct 30
to Google Ads Scripts Forum
Hi,

How to allowlist my account, this would be help us in day to day operation as an global firm agency work (WPP Media)

Google Ads Scripts Forum Advisor

unread,
Oct 31, 2025, 2:37:23 AMOct 31
to adwords...@googlegroups.com
Hi,
 
Please be informed that to allowlist the auction insight metrics feature in your Google Ads account, you need to contact your Google representative.
 
While these metrics are not yet accessible programmatically through the API, you can still view them directly in your Google Ads UI by navigating to Insights > Reports > Auction Insights. The closest option to accessing auction insights programmatically would be creating a report in the Google Ads UI and downloading it periodically.

As previously said, the auction insight metrics are not available in the Google Ads Scripts. I recommend that you follow our blog post any future announcements regarding this functionality.  
 
I hope this helps! Feel free to get back to us in case of any further queries.
 

Thanks,
 
Google Logo Google Ads Scripts Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-10-31 06:36:46Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vSDed:ref" (ADR-00337725)



Pitchayut Wangsukit

unread,
Nov 11, 2025, 7:12:54 PMNov 11
to Google Ads Scripts Forum
Hi Google Ads Script team,

Can you confirm that if my account have an allowlist, we can pull the Auction Insight data via Google Ads Script to Google Sheet (Output).

Thanks again.

Google Ads Scripts Forum Advisor

unread,
Nov 11, 2025, 11:15:25 PMNov 11
to adwords...@googlegroups.com

Hi,

The best way to get more information about your issue is the Google Ads Help Center. You can also utilize the Google Ads Communities for additional support.

Kindly note that this support channel specializes in Google Ads Scripts related concerns and technical implementations only and issues related to the allowlisting status are not in our scope.

Thanks,
 
Google Logo Google Ads Scripts Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-11-12 04:14:55Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vSDed:ref" (ADR-00337725)



Reply all
Reply to author
Forward
0 new messages