How to access keyword cpc bid from AdGroupCriterion

97 views
Skip to first unread message

Sam

unread,
Feb 19, 2015, 10:34:06 AM2/19/15
to adwor...@googlegroups.com
I can see that when i pull my report my entries look like below (for keywords anyway):

(BiddableAdGroupCriterion){
   adGroupId = 10498715
   criterionUse = "BIDDABLE"
   criterion =
      (Keyword){
         id = 11298522
         type = "KEYWORD"
         Criterion.Type = "Keyword"
         text = "keyword text"
         matchType = "PHRASE"
      }
   AdGroupCriterion.Type = "BiddableAdGroupCriterion"
   approvalStatus = "APPROVED"
   qualityInfo =
      (QualityInfo){
         qualityScore = 9
      }
   biddingStrategyConfiguration =
      (BiddingStrategyConfiguration){
         biddingStrategyType = "MANUAL_CPC"
         bids[] =
            (CpcBid){
               Bids.Type = "CpcBid"
               bid =
                  (Money){
                     ComparableValue.Type = "Money"
                     microAmount = 1070000
                  }
               cpcBidSource = "CRITERION"
            },
      }
 }

But then if I run the below, shouldn't it retrieve the bid?

page = ad_group_ad_service.get(selector)
if 'entries' in page:
for adgroupcriterion in page['entries']:

print adgroupcriterion['biddingStrategyConfiguration']['bids']['bid']['microAmount']

I assume I'm doing something stupid, could someone point me in the right direction please?

Michael Cloonan (AdWords API Team)

unread,
Feb 19, 2015, 11:28:50 AM2/19/15
to adwor...@googlegroups.com
Hello,

I'm not familiar with this language specifically, but it looks like bids[] is an array. Maybe try adgroupcriterion['biddingStrategyConfiguration']['bids'][0]['bid']['microAmount']

Regards,
Mike, AdWords API Team

Sam

unread,
Feb 19, 2015, 11:38:41 AM2/19/15
to adwor...@googlegroups.com
This worked - thank you for your help.
Reply all
Reply to author
Forward
0 new messages