Report failed with error code 400

168 views
Skip to first unread message

Jatin Katyal

unread,
Sep 18, 2018, 4:57:47 PM9/18/18
to AdWords API and Google Ads API Forum
Hello
I am trying to download GEO_PERFORMANCE_REPORT, but i receive this error "Report failed for customer ID #### with code 400 after 1 retries". From my past experience, i know this might be related to report definition, but i couldn't fine any faults in it. Here is the report definition:
 
 report_definition = {
      'reportName': 'Custom GEO_PERFORMANCE_REPORT',
      'dateRangeType': 'CUSTOM_DATE',
      'reportType': 'GEO_PERFORMANCE_REPORT',
      'downloadFormat': 'CSV',
      'selector': {
          'fields': ['AccountCurrencyCode',
          'AccountDescriptiveName',
          'AccountTimeZone',
          'CampaignId',
          'CampaignName',
          'CampaignStatus',
          'CityCriteriaId',
          'CountryCriteriaId',
          'CustomerDescriptiveName',
          'ExternalCustomerId',
          'IsTargetingLocation',
          'MetroCriteriaId',
          'MostSpecificCriteriaId',
          'RegionCriteriaId',
          'layers   Segment',
          'AdFormat',
          'AdGroupId',
          'AdGroupName',
          'AdGroupStatus',
          'AdNetworkType1',
          'AdNetworkType2',
          'Date',
          'DayOfWeek',
          'Device',
          'LocationType',
          'Month',
          'MonthOfYear',
          'Quarter',
          'Week',
          'Year',
          'show_chart   Metric',
          'AllConversionRate',
          'AllConversions',
          'AllConversionValue',
          'AverageCost',
          'AverageCpc',
          'AverageCpm',
          'AverageCpv',
          'AveragePosition',
          'Clicks',
          'ConversionRate',
          'Conversions',
          'ConversionValue',
          'Cost',
          'CostPerAllConversion',
          'CostPerConversion',
          'CrossDeviceConversions',
          'Ctr',
          'Impressions',
          'InteractionRate',
          'Interactions',
          'InteractionTypes',
          'ValuePerAllConversion',
          'ValuePerConversion',
          'VideoViewRate',
          'VideoViews',
          'ViewThroughConversions'],
          'dateRange':{
            'min': report_dt,
            'max': report_dt
          }
      }
  }

Please help in figuring out the issue. 

Luis Xander Talag (AdWords API Team)

unread,
Sep 19, 2018, 3:03:23 AM9/19/18
to AdWords API and Google Ads API Forum
Hi Jatin,

Thank you for providing your report definition. The error code 400 that you encountered could be due to timeouts. This error usually occurs when generating large amount of data. I would suggest to check your date range and add more filters to lessen the result of your data. 

If you still encounter any error after doing my suggestions, could you provide your latest report definition as well as your clientCustomerId and the date range that you used to generate the report so I could further investigate the issue? Please reply via Reply privately to author.

Thanks and regards,
Luis
AdWords API Team

Jatin Katyal

unread,
Sep 20, 2018, 8:12:24 AM9/20/18
to AdWords API and Google Ads API Forum
Hi Luis, thanks for looking into issue and sorry for late reply. I tried using predicate reduce size, also for simplicity, now i am looking for YESTERDAY only. Here is the new report definition.

  report_definition = {
      'reportName': 'Custom GEO_PERFORMANCE_REPORT',
      'dateRangeType': 'YESTERDAY',
      'reportType': 'GEO_PERFORMANCE_REPORT',
      'downloadFormat': 'CSV',
      'selector': {
          'fields': ['AccountCurrencyCode,'
            'AccountDescriptiveName,'
            'AccountTimeZone,'
            'CampaignId,'
            'CampaignName',
            'CampaignStatus',
            'CityCriteriaId',
            'CountryCriteriaId',
            'CustomerDescriptiveName',
            'ExternalCustomerId',
            'IsTargetingLocation',
            'MetroCriteriaId',
            'MostSpecificCriteriaId',
            'RegionCriteriaId',
            'AdFormat',
            'AdGroupId',
            'AdGroupName',
            'AdGroupStatus',
            'Date',
            'DayOfWeek',
            'Device',
            'LocationType',
            'Month',
            'MonthOfYear,'
            'Quarter,'
            'Week,'
            'Year,'
            'AllConversionRate,'
            'AllConversions,'
            'AllConversionValue,'
            'AverageCost,'
            'AverageCpc,'
            'AverageCpm,'
            'AverageCpv,'
            'AveragePosition,'
            'Clicks,'
            'ConversionRate,'
            'Conversions,'
            'ConversionValue',
            'Cost',
            'CostPerAllConversion',
            'CostPerConversion',
            'CrossDeviceConversions',
            'Ctr',
            'Impressions',
            'InteractionRate',
            'Interactions',
            'InteractionTypes',
            'ValuePerAllConversion',
            'ValuePerConversion',
            'VideoViewRate',
            'VideoViews',
            'ViewThroughConversions'],
          'predicates': {
              'field': 'CityCriteriaId',
              'operator': 'IN',
              'values': ['1017310','1016479']

Luis Xander Talag (AdWords API Team)

unread,
Sep 20, 2018, 11:33:00 PM9/20/18
to AdWords API and Google Ads API Forum
Hi Jatin,

Thank you for providing additional information. However, I would need your clientCustomerID to check this further on my end. Could you provide your clientCustomerId and reply to me via Reply privately to author.

Regards,
Luis
AdWords API Team

Jatin Katyal

unread,
Sep 23, 2018, 2:15:34 PM9/23/18
to AdWords API and Google Ads API Forum
Hi Luis,

Like in our private conversation, i can download reports for campaign, click and keyword performance reports using my customer client id. Only Geo performance report is giving the issue. Another strange thing that i noticed is that, I can't download same using the Web UI too. Page keeps on waiting for response when i try to download geo performance report. I suspect there is something wrong with geo performance reports.

Peter Oliquino (AdWords API Team)

unread,
Sep 23, 2018, 11:39:39 PM9/23/18
to AdWords API and Google Ads API Forum
Hi Jatin,

Allow me to provide support as Luis is currently OOO. Regarding your issue with not being able to generate the Geo Performance Report, the 788-458-2821 account ID you provided belongs to a MCC account. This MCC account ID cannot be used as your clientCustomerId to download an AdWords API report as reports can only be downloaded per client account. Unless you are using the Parallel Report Download example, only then can you specify a MCC account ID as the clientCustomerId.

That being said, could you retry your request and use a client account ID instead? I also noticed that you are retrieving all the fields of the Geo Performance Report. Doing so might result to a timeout due to the volume of information you are using. You may need to reduce the number of fields or break down your report using predicates to avoid the said timeouts.

Should the issue persist, you may send to me privately your clientCustomerId (account ID of the client account) and your updated report definition so I can further investigate.

Thanks and regards,
Peter
AdWords API Team

Jatin Katyal

unread,
Sep 24, 2018, 2:48:09 AM9/24/18
to AdWords API and Google Ads API Forum
Hi Peter

Thank you for looking into the matter, I was using Parallel Report Download for all other reports, I did same for Geo Performance report when using API. I reduced number of fields, still response if 400. I tried Web UI and I was able to download report by reducing number of columns. New report definition is 
report_definition = {
      'reportName': 'Custom GEO_PERFORMANCE_REPORT',
      'dateRangeType': 'YESTERDAY',
      'reportType': 'GEO_PERFORMANCE_REPORT',
      'downloadFormat': 'CSV',
      'selector': {
          'fields': ['AccountDescriptiveName,'
            'CampaignName',
            'RegionCriteriaId',
            'CityCriteriaId',
            'Clicks,'
            'Conversions,'
            'Cost',
            'Ctr',
            'Impressions']
        }
  }

Can I change time out to see if, helps?

Peter Oliquino (AdWords API Team)

unread,
Sep 24, 2018, 3:26:38 AM9/24/18
to AdWords API and Google Ads API Forum
Hi Jatin,

Thank you for providing your report definition. I noticed an error in your code and that being said, could you try and update it as seen below?

'Clicks,' -> 'Clicks',

You can place the comma ( , ) after the end quotation mark ( ' ). Let me know if this helps.

Best regards,
Peter
AdWords API Team

Jatin Katyal

unread,
Sep 24, 2018, 6:02:06 AM9/24/18
to AdWords API and Google Ads API Forum
Hi
Thanks for that, that must've happened when i reduced the number of columns. I did that but still no good, Reports are still failing with code 400, I am using Parallel report download example.

Peter Oliquino (AdWords API Team)

unread,
Sep 25, 2018, 12:07:38 AM9/25/18
to AdWords API and Google Ads API Forum
Hi Jatin,

Could you provide to me any SOAP request and response logs or the exact error messages you receive when the issue occurred? You may reply to me privately via the Reply privately to author option.

Best regards,
Peter
AdWords API Team

Jatin Katyal

unread,
Jan 28, 2019, 2:29:48 AM1/28/19
to AdWords API and Google Ads API Forum
Hi all

Sorry for such a delayed reply. My problem was taken care of by another guy in team, however i am facing this same issue in another report. He mentioned changing some sort of settings before pulling the report but I am not sure of what exactly. This time i am trying to pull Shopping Performance report. Can you tell how can I share my soap request?

Regards
Jatin

Jatin Katyal

unread,
Jan 28, 2019, 3:35:43 AM1/28/19
to AdWords API and Google Ads API Forum
report_definition = {
      'reportName': 'Custom report',
      'dateRangeType': 'CUSTOM_DATE',
      'reportType': 'SHOPPING_PERFORMANCE_REPORT',
      'downloadFormat': 'CSV',
      'selector': {
          'fields': ['Date',
          'AccountDescriptiveName',
          'CustomAttribute0'
          'Cost'],

googleadsapi...@google.com

unread,
Jan 28, 2019, 3:47:56 AM1/28/19
to adwor...@googlegroups.com
Hi Jatin,

Since this is an old thread and for better tracking, can you create a new thread and mention the complete details of the issue there instead? We will continue our discussion about your issue from there.

Thanks and regards,
Peter
AdWords API Team

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Reply all
Reply to author
Forward
0 new messages