Bug in returning AdGroupType in response form AdGroupService

90 views
Skip to first unread message

tetiana....@partners.2sixty.io

unread,
Jul 14, 2020, 9:28:09 AM7/14/20
to AdWords API and Google Ads API Forum
Hi,

I just noticed a kind of very strange behavior when calling get method of AdGroupService. Usually type (AdGroupType enum) comes as a string in response:
Screen Shot 2020-07-14 at 3.52.08 PM.png

BUT for some campaigns/ad_groups it comes as a number. I guess that it can be a sequence number of value in this enum https://developers.google.com/google-ads/api/reference/rpc/v3/AdGroupTypeEnum.AdGroupType but it's still very strange inconsistency in response.
Screen Shot 2020-07-14 at 3.52.34 PM.png

Is it a kind of a bug in Ads API Beta?

Thanks,
Tetiana

Google Ads API Forum Advisor Prod

unread,
Jul 14, 2020, 10:41:02 AM7/14/20
to adwor...@googlegroups.com
Hi Tetiana,

Thank you for reaching out to us. The number you're seeing there is actually a proto (see here for a list of protos), and the one you're currently seeing is an ad_group_type proto. You can reference these numbers from this list if you encounter these numbers via reports. Let me know if you have further questions.

Thank you,
Bryan, Google Ads API Team

ref:_00D1U1174p._5004Q21lalW:ref

tetiana....@partners.2sixty.io

unread,
Jul 15, 2020, 3:59:01 AM7/15/20
to AdWords API and Google Ads API Forum
Hi, Bryan

Yeah, I was sure that it's some kind of sequence number in enum. BUT why are we getting it only for 16th element? All other types come as a string, it would be strange to write a kind of hack in our code to search if type is int and if yes - map 16th element with it's value... Is it possible to make response consistent no matter what type the ad_group has?

Thanks,
Tetiana

Google Ads API Forum Advisor Prod

unread,
Jul 15, 2020, 12:19:03 PM7/15/20
to adwor...@googlegroups.com
Hi Tetiana,

I'll take a closer look at this internally with my team and get back to you as soon as possible.

Google Ads API Forum Advisor Prod

unread,
Jul 15, 2020, 1:48:05 PM7/15/20
to adwor...@googlegroups.com
Hi Tetiana,

Thank you for your patience. I'm still currently taking a look at this issue. Could you provide me with your request and response logs for where you get this proto, and one when you don't get this proto? Could you also confirm if you're using our client library, REST endpoints, and what language you're using? For privacy, you can use the "reply privately to author" button.

tetiana....@partners.2sixty.io

unread,
Jul 16, 2020, 9:02:31 AM7/16/20
to AdWords API and Google Ads API Forum
Hi, Bryan!

Unfortunately I don't have permissions to reply directly to you.
In my first letter there are examples of responses with ad_group.type  presented as string and as int and also there you can see account_id and ad_group_id for which we are fetching data.
Screen Shot 2020-07-14 at 3.52.08 PM.png

Screen Shot 2020-07-14 at 3.52.34 PM.png
I saw this kind of bug only with ad_group of 16th type but it's possible that API returns int for some other ad_group types.
We are using you Python client library and v3 version of Google Ads API Beta.
Our query is pretty simple and looks like this:
"SELECT ad_group.resource_name, ad_group.id, ad_group.name, ad_group.status, ad_group.type, ad_group.ad_rotation_mode, ad_group.url_custom_parameters, ad_group.final_url_suffix FROM ad_group WHERE ad_group.status = 'ENABLED' AND campaign.id = '9725987021'"

Thanks,
Tetiana

Google Ads API Forum Advisor Prod

unread,
Jul 16, 2020, 10:12:38 AM7/16/20
to adwor...@googlegroups.com
Hi Tetiana,

Thank you for this information. Finally, could I ask you for the approximate time you made this request (the ones in your images), and what your MCC ID is that's associated with your developer token? Make sure you're posting your Manager account number, and not your developer token for privacy reasons.

tetiana....@partners.2sixty.io

unread,
Jul 16, 2020, 10:30:38 AM7/16/20
to AdWords API and Google Ads API Forum
I noticed this bug a few days ago and made that request in the same day I wrote to Support team. Our MCC ID is 7735173772.
But I just rerun this request for the SAME entity I received type VIDEO_RESPONSIVE instead of 16.
Screen Shot 2020-07-16 at 5.30.00 PM.png
Is it possible that this issue doesn't exist any more?

tetiana....@partners.2sixty.io

unread,
Jul 16, 2020, 10:40:51 AM7/16/20
to AdWords API and Google Ads API Forum
Since that time I also updated versions of this libraries:
google-ads==5.0.4 -> 5.1.0
google==2.0.3 -> 3.0.0
May be there were some troubles in previous versions.

tetiana....@partners.2sixty.io

unread,
Jul 16, 2020, 10:52:12 AM7/16/20
to AdWords API and Google Ads API Forum
I just made this request with previous and new versions of this libs, inconsistent response exists only in old versions.
So, you can stop investigating this issue.

Thank you very mush for your help!
Tetiana

Reply all
Reply to author
Forward
0 new messages