New data in Demand Gen - ad_network_type

74 views
Skip to first unread message

Krzysztof Bycina

unread,
Jun 8, 2025, 7:11:24 AM6/8/25
to Google Ads Scripts Forum
Hi Scripts Team!

I saw that there was an updated in API:
https://ads-developers.googleblog.com/2025/06/announcing-v20-of-google-ads-api.html

Can we access the new Demand Gen data (ad_network_type)in scripts??

Thanks a lot,
Krzysztof


Google Ads Scripts Forum Advisor

unread,
Jun 8, 2025, 11:58:31 PM6/8/25
to adwords...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads Scripts Support team.

I would like to inform you that Demand Gen campaigns are not yet supported in Google Ads Scripts. Currently we don't have any specific method available for Demand Gen campaigns like AdsApp.campaigns() or AdsApp.videoCampaigns(). We recommend you to please follow our blog posts for future updates and announcements. 

I would recommend you to use the reporting option where you are able to get the campaign data related to the Demand Gen based on the campaign channel type. You can go through the below sample example used to get the data. Refer to the reporting documentation to export the campaign data to a spreadsheet. In order to add additional fields you can go through the Campaign query builder.
 
function main(){

let report = AdsApp.report(
    "SELECT campaign.id, campaign.name, segments.ad_network_type FROM campaign WHERE campaign.advertising_channel_type = 'DEMAND_GEN' and segments.ad_network_type IN ('DISCOVER', 'GMAIL', 'MAPS', 'YOUTUBE')");

let rows = report.rows();
while (rows.hasNext()) {
    let row = rows.next();
  console.log(row);
}
}

Thanks,
 
Google Logo Google Ads Scripts Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-06-09 03:57:59Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01recAq:ref" (ADR-00310870)



Krzysztof Bycina

unread,
Jun 9, 2025, 3:23:35 AM6/9/25
to Google Ads Scripts Forum
Hey,

Thanks for the answer, and what about AdsApp.search(query)?

I can't access it via this function?

Google Ads Scripts Forum

unread,
Jun 10, 2025, 6:42:22 PM6/10/25
to Google Ads Scripts Forum
Hi,

You can just replace the "AdsApp.report()" method with the "AdsApp.search()" method to use the search method. You can go through the Search Example for reference. Also, you may refer to the Create a text report document for sample code using the search method.

I hope this helps! Feel free to get back to us for any further issues.

Thanks,
Google Ads Scripts team.

Reply all
Reply to author
Forward
0 new messages