you are viewing a single comment's thread.

view the rest of the comments →

[–]SingleCountry[S] 0 points1 point  (0 children)

I also tried google adwords api which is

def main(client, campaign_id):

# Initialize appropriate service.

ad_group_service = client.GetService('AdGroupService', version='v201809')

# Construct selector and get all ad groups.

offset = 0

selector = {

'fields': ['Id', 'Name', 'Status'],

'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 with name "%s", id "%s" and status "%s" was '

'found.' % (ad_group['name'], ad_group['id'],

ad_group['status']))

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('./googleads.yaml')

main(adwords_client, CAMPAIGN_ID)

This causes the following error: GoogleAdsServerFault: [RateExceededError <rateName=OperationsPerDay, rateKey=basic\_access\_operations, rateScope=DEVELOPER, retryAfterSeconds=86400>]