How to get Text Ads count of AdGroups

95 views
Skip to first unread message

Aswini

unread,
Aug 19, 2014, 2:40:40 AM8/19/14
to adwor...@googlegroups.com
Hi

How can i get Text Ads count for particular AdGroups. Is there any Adwords api class providing this option ? 

Josh Radcliff (AdWords API Team)

unread,
Aug 19, 2014, 9:02:49 AM8/19/14
to adwor...@googlegroups.com
Hi,

There are (at least) two ways you could do this:

1. Perform an AdGroupAdService.get (or AdGroupAdService.query) and filter by AdType equal to TEXT_AD. Each client library contains an example named GetTextAds that does just that in the examples/basic_operations folder.

2. Use the Ad Group Performance Report with a filter on AdType  of TEXT_AD, and include zero impressions.

Cheers,
Josh, Adwords API Team

Aswini

unread,
Aug 19, 2014, 9:12:00 AM8/19/14
to adwor...@googlegroups.com
Hi Josh, 

I followed 1st way ( AdGroupAdService.get ). Through this I downloaded total Text Ads of all campaigns it's took almost 3 hours time. I don't want to download any Text Ads of particular AdGroup. I need only count of TextAds for particular Adgroups. How can i get it this. 

Josh Radcliff (AdWords API Team)

unread,
Aug 19, 2014, 9:31:37 AM8/19/14
to adwor...@googlegroups.com
Hi,

The text ad count is not available directly from the API, so you'll have to count it yourself by retrieving the ads. From the 3 hour time you mentioned below it sounds like you must have a rather large account, in which case I would definitely recommend trying the reporting approach I mentioned.

Cheers,
Josh, AdWords API Team

Aswini

unread,
Aug 19, 2014, 9:38:16 AM8/19/14
to adwor...@googlegroups.com
Thanks Josh. 

mm

unread,
Aug 21, 2014, 2:11:03 PM8/21/14
to adwor...@googlegroups.com
Hey Aswini -
At least with the java client, I don't believe that you actually have to download all of the ads. Instead, set up your selector, and then do something like:
        Paging paging = new Paging();
        paging.setNumberResults(1); //make this as small as possible since we don't really want to retrieve the ads
        paging.setStartIndex(0);
        selector.setPaging(paging);
        AdGroupAdPage page = getAdGroupAdService(acctId).get( selector );
        int numberOfAds = page.getTotalNumEntries();

I haven't used this for ads, but I use this technique for other objects and it works great.

HTH -
mm
Reply all
Reply to author
Forward
Message has been deleted
0 new messages