googleads.errors.AdWordsReportBadRequestError: Type: RateExceededError.RATE_EXCEEDED

233 views
Skip to first unread message

Chaitanya Phani

unread,
Jan 11, 2018, 9:34:54 AM1/11/18
to AdWords API Forum
Hi,

I tried to pull the data for all campaigns and their metrics. I got the following error.

Error Message: 

googleads.errors.AdWordsReportBadRequestError: Type: RateExceededError.RATE_EXCEEDED
Trigger: Basic Access Daily Reporting Quota
Field Path: None

Right now I was able to pull the data based on client_customer_id. My organization have more than 100 client_customer_ids. So looped each customer id and pulling the data. 

I think that is the reason I was getting "RateExceededError.RATE_EXCEEDED" error. Is there a way I can get all the campaigns and their metrics in a single API call instead of loop?

Following code I am using. 


def download_Performance_Criteria_Report():
 
for client_customer_id in account_list:
    o2client
= GoogleRefreshTokenClient(adc['client_id'],adc['client_secret'],adc['refresh_token'])
    client
=AdWordsClient(adc['developer_token'],o2client,'OBI',client_customer_id=client_customer_id)
    _fpath
=os.path.join('D:/adwords/inbound/Adwords_MMA_'+str(client_customer_id)+'_'+datetime.datetime.now().strftime( "%Y%m%d%H%M") + '.csv')
 
##    client = AdWordsClient.LoadFromStorage('googleads.yaml')
    rep_downloader
= client.GetReportDownloader(version='v201710')
    report
= {
           
'reportName' : 'CAMPAIGN_PERFORMANCE_REPORT',
           
'dateRangeType' :'CUSTOM_DATE',
           
'reportType': 'CAMPAIGN_PERFORMANCE_REPORT',
           
'downloadFormat': 'CSV',
           
'selector': {
               
'fields': ['CampaignId','CampaignName','ExternalCustomerId','CustomerDescriptiveName','Impressions','Clicks','Cost','Date'],
               
'dateRange' : { 'min': '20170101' , 'max' : '20171231'}
               
}
           
}
    _f
=open(_fpath,'wb')
    rep_downloader
.DownloadReport(report,output=_f,skip_report_header=False,skip_column_header=False,skip_report_summary=True)


Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jan 11, 2018, 1:39:02 PM1/11/18
to AdWords API Forum
Hi Chaitanya, 

You are right. It looks like you have exhausted the daily quota of 1000 report downloads. You may have to wait until the quota resets and retry the requests (time specified in the retryAfterSeconds). The report requests can only be made against one client account at a time. That said, you will need to make as many API calls as the target accounts that you need to extract the campaign performance data from. 

Thanks,
Sreelakshmi, AdWords API Team

Chaitanya Phani

unread,
Jan 11, 2018, 2:46:50 PM1/11/18
to AdWords API Forum
is there a way I can pull all campaigns in a single API call instead of looping customer client ids?

Thanks,
Chaitanya

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jan 11, 2018, 3:11:35 PM1/11/18
to AdWords API Forum
Hi Chaitanya, 

With one API call, you will be able to pull all campaigns of one client customer Id. But pulling all campaigns for a list of client customer ids in one API call is not possible. 

Chaitanya Phani

unread,
Jan 22, 2018, 4:26:38 PM1/22/18
to AdWords API Forum
Hi Sreelakshmi , 

I have more than 270 advertiser accounts in a ManagerAccount. Right now I am pulling one by one in loop. Is there a way I can pull all the advertiser account details in a single call instead of loop.

Thanks,
Chaitanya 

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jan 22, 2018, 5:13:28 PM1/22/18
to AdWords API Forum
Hi Chaitanya, 

Since all the 270 client accounts are under one Manager account, you could take a look at the parallel_report_download sample. This sample downloads an Ad Hoc report for all accounts directly under a manager account in multiple parallel threads. Please note that this sample should be run against a Manager account. 
Reply all
Reply to author
Forward
0 new messages