Hi,  I am using 201809 version of adwords. trying to first get and then 
modify bidding at adgroup level. 
My CAMPAIGN_ID=1647087544 is one with tcpa set 
with biddingStrategySource=CAMPAIGN level. I believe in that way I can see 
the bidsCPA value. however, the ‘bids’ field is returned as empty. I get 
returns like this

Your doc, does not tell me how to access to “bids” field, can you tell me 
specificlly how based on below code?
https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201809 

Thank you

def main(client, campaign_id):

  # Initialize appropriate service.

  ad_group_service = client.GetService('AdGroupCriterionService', 
version='v201809')
  offset = 0
  # Construct selector and get all ad groups.
  selector = {
      'fields': [
          'AdGroupId','BaseCampaignId','QualityScore' 
          
,'BiddingStrategyId','BiddingStrategyName','BiddingStrategySource','BiddingStrategyType'
                 ],
      'predicates': [
          {
              'field': 'CampaignId',
              'operator': 'EQUALS',
              'values': [campaign_id]
          }
      ],
      'paging': {
          'startIndex': str(offset),
          'numberResults': str(PAGE_SIZE)
      }
  }

  more_pages = True
  while more_pages:
    page = ad_group_service.get(selector)

    # Display results.
    if 'entries' in page:
      for ad_group in page['entries']:
        print(ad_group)
    else:
      print ('No ad groups were found.')
    offset += PAGE_SIZE

    selector['paging']['startIndex'] = str(offset)
    more_pages = offset < int(page['totalNumEntries'])

if __name__ == '__main__':
  # Initialize client object.
  adwords_client = adwords.AdWordsClient.LoadFromStorage()
  main(adwords_client, CAMPAIGN_ID)


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/528ff8f4-d455-4259-985d-cf33ee38f0dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Stella
    • ... Yang Yang
      • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
        • ... Yang Yang
          • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
    • ... 'Bharani Cherukuri (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to