How can i get the total number of active ads?

18 views
Skip to first unread message

sarthaka...@gmail.com

unread,
Jun 13, 2018, 5:38:11 PM6/13/18
to AdWords API and Google Ads API Forum
Hi 

i am working on MCC account and i want to get the total number of active ads. 

As per the UI (AdWord Dashboard) there are 2 options, one is enable and second one is pause. I want all the ads that are enable

Right now i am able to get list of client and its ids, and then i pass it in PHP loop and use the AdService class to get the all ads, but there are coming all ads not only the active ads.

Thanks
Sarthak


Dannison Yao (AdWords API Team)

unread,
Jun 14, 2018, 2:27:27 AM6/14/18
to AdWords API and Google Ads API Forum
Hi Sarthak,

Unfortunately, the AdService does not have a filter for you to set for the ad status. However, you could use the AdGroupAdService to get the AdGroupAd.Status and set it to ENABLED. If you just wish to retrieve a list of ENABLED ads, you could use the AD_PERFORMANCE_REPORT and set the Status field to ENABLED only. This way, only ads that are ENABLED will be retrieved. 

Let me know if you have further clarifications.

Regards,
Dannison
AdWords API Team

sarthaka...@gmail.com

unread,
Jun 14, 2018, 8:11:19 AM6/14/18
to AdWords API and Google Ads API Forum
thanks Dannison for your support , i will check this 
Message has been deleted

sarthaka...@gmail.com

unread,
Jun 19, 2018, 9:28:12 AM6/19/18
to AdWords API and Google Ads API Forum
thanks, this solved my problem
Reply all
Reply to author
Forward
0 new messages