How to get all the data that we need in resource ad_group_ad

138 views
Skip to first unread message

Project YSS

unread,
Jul 9, 2019, 6:30:35 AM7/9/19
to AdWords API and Google Ads API Forum
Hello there,
we can get data for all customerId except this customerId=6251304670. The details are below:
We use the Google Ads API V2 to get data from resource ad_group_ad for customerId = 6251304670.
With endpoint: 
This is the query we use:
   SELECT
      customer.id, ad_group_ad.ad.id, ad_group_ad.ad_group, campaign.id, ad_group_ad.ad.legacy_responsive_display_ad.accent_color, ad_group_ad.ad_strength, ad_group_ad.ad.type, ad_group_ad.ad.legacy_responsive_display_ad.allow_flexible_color, ad_group_ad.ad.added_by_google_ads, ad_group_ad.ad.legacy_responsive_display_ad.business_name, ad_group_ad.ad.call_only_ad.phone_number, ad_group_ad.ad.legacy_responsive_display_ad.call_to_action_text, ad_group_ad.policy_summary, ad_group_ad.ad.final_mobile_urls, ad_group_ad.ad.final_urls, ad_group_ad.ad.tracking_url_template, ad_group_ad.ad.url_custom_parameters, ad_group_ad.ad.expanded_text_ad.description, ad_group_ad.ad.text_ad.description1, ad_group_ad.ad.text_ad.description2, ad_group_ad.ad.device_preference, ad_group_ad.ad.display_url, ad_group_ad.ad.legacy_responsive_display_ad.logo_image, ad_group_ad.ad.legacy_responsive_display_ad.square_logo_image, ad_group_ad.ad.legacy_responsive_display_ad.marketing_image, ad_group_ad.ad.legacy_responsive_display_ad.square_marketing_image, ad_group_ad.ad.expanded_dynamic_search_ad.description, ad_group_ad.ad.expanded_text_ad.description2, ad_group_ad.ad.expanded_text_ad.headline_part3, ad_group_ad.ad.legacy_responsive_display_ad.format_setting, ad_group_ad.ad.gmail_ad.header_image, ad_group_ad.ad.gmail_ad.teaser.logo_image, ad_group_ad.ad.gmail_ad.marketing_image, ad_group_ad.ad.gmail_ad.teaser.business_name, ad_group_ad.ad.gmail_ad.teaser.description, ad_group_ad.ad.gmail_ad.teaser.headline, ad_group_ad.ad.text_ad.headline, ad_group_ad.ad.expanded_text_ad.headline_part1, ad_group_ad.ad.expanded_text_ad.headline_part2, ad_group_ad.ad.image_ad.image_url, ad_group_ad.ad.image_ad.pixel_height, ad_group_ad.ad.image_ad.pixel_width, ad_group_ad.ad.image_ad.mime_type, ad_group_ad.ad.image_ad.name, ad_group_ad.ad.legacy_responsive_display_ad.long_headline, ad_group_ad.ad.legacy_responsive_display_ad.main_color, ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.text, ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.text_color, ad_group_ad.ad.gmail_ad.marketing_image_headline, ad_group_ad.ad.gmail_ad.marketing_image_description, ad_group_ad.ad.responsive_display_ad.accent_color, ad_group_ad.ad.responsive_display_ad.allow_flexible_color, ad_group_ad.ad.responsive_display_ad.business_name, ad_group_ad.ad.responsive_display_ad.call_to_action_text, ad_group_ad.ad.responsive_display_ad.descriptions, ad_group_ad.ad.responsive_display_ad.price_prefix, ad_group_ad.ad.responsive_display_ad.promo_text, ad_group_ad.ad.responsive_display_ad.format_setting, ad_group_ad.ad.responsive_display_ad.headlines, ad_group_ad.ad.responsive_display_ad.logo_images, ad_group_ad.ad.responsive_display_ad.square_logo_images, ad_group_ad.ad.responsive_display_ad.long_headline, ad_group_ad.ad.responsive_display_ad.main_color, ad_group_ad.ad.responsive_display_ad.marketing_images, ad_group_ad.ad.responsive_display_ad.square_marketing_images, ad_group_ad.ad.expanded_text_ad.path1, ad_group_ad.ad.expanded_text_ad.path2, ad_group_ad.policy_summary, ad_group_ad.ad.legacy_responsive_display_ad.price_prefix, ad_group_ad.ad.legacy_responsive_display_ad.promo_text, ad_group_ad.ad.responsive_search_ad.descriptions, ad_group_ad.ad.responsive_search_ad.headlines, ad_group_ad.ad.responsive_search_ad.path1, ad_group_ad.ad.responsive_search_ad.path2, ad_group_ad.ad.legacy_responsive_display_ad.short_headline, ad_group_ad.status, ad_group_ad.ad.system_managed_resource_source, ad_group_ad.ad.app_ad.descriptions, ad_group_ad.ad.app_ad.headlines, ad_group_ad.ad.app_ad.html5_media_bundles, ad_group_ad.ad.app_ad.images, ad_group_ad.ad.app_ad.mandatory_ad_text, ad_group_ad.ad.app_ad.youtube_videos 
   FROM ad_group_ad 
  
Then we could not get the data and the response we received was 502 Bad Gateway. 
But for the other customerId we can still get enough data from this source. So, is there any issues with this customerId(6251304670)?
Could you please help me that is there any way to get and get enough data from this resource?

Google Ads API Forum Advisor Prod

unread,
Jul 9, 2019, 2:43:19 PM7/9/19
to ad...@septeni-technology.jp, adwor...@googlegroups.com
Hello, 

This could be a transient issue which is caused when the servers are not reachable. Could you please retry the request? If you are facing an issue, could you please share the JSON request and response logs, to check this further? You can share the details privately via Reply privately to author option. 

Regards,
Bharani, Google Ads API Team

ref:_00D1U1174p._5001UCbm8P:ref

Project YSS

unread,
Jul 11, 2019, 4:47:47 AM7/11/19
to AdWords API and Google Ads API Forum
Thank you much for your quick response
The problem we met is that we tried to send this request many times to get data but still get  502 error then(while for the other customerIds, there was no problem yet - we could still get data as normal).
below is our request we use:

POST /v2/customers/6251304670/googleAds:search HTTP/1.1
User-Agent: curl
Content-Type: application/json
Accept: application/json
login-customer-id: xxxxxxxxxxxx
Authorization: Bearer xxxxxxxxxxx
developer-token: xxxxxxxxx

Parameters:
{
  "query" : "SELECT customer.id, ad_group_ad.ad.id, ad_group_ad.ad_group, campaign.id, ad_group_ad.ad.legacy_responsive_display_ad.accent_color, ad_group_ad.ad_strength, ad_group_ad.ad.type, ad_group_ad.ad.legacy_responsive_display_ad.allow_flexible_color, ad_group_ad.ad.added_by_google_ads, ad_group_ad.ad.legacy_responsive_display_ad.business_name, ad_group_ad.ad.call_only_ad.phone_number, ad_group_ad.ad.legacy_responsive_display_ad.call_to_action_text, ad_group_ad.policy_summary, ad_group_ad.ad.final_mobile_urls, ad_group_ad.ad.final_urls, ad_group_ad.ad.tracking_url_template, ad_group_ad.ad.url_custom_parameters, ad_group_ad.ad.expanded_text_ad.description, ad_group_ad.ad.text_ad.description1, ad_group_ad.ad.text_ad.description2, ad_group_ad.ad.device_preference, ad_group_ad.ad.display_url, ad_group_ad.ad.legacy_responsive_display_ad.logo_image, ad_group_ad.ad.legacy_responsive_display_ad.square_logo_image, ad_group_ad.ad.legacy_responsive_display_ad.marketing_image, ad_group_ad.ad.legacy_responsive_display_ad.square_marketing_image, ad_group_ad.ad.expanded_dynamic_search_ad.description, ad_group_ad.ad.expanded_text_ad.description2, ad_group_ad.ad.expanded_text_ad.headline_part3, ad_group_ad.ad.legacy_responsive_display_ad.format_setting, ad_group_ad.ad.gmail_ad.header_image, ad_group_ad.ad.gmail_ad.teaser.logo_image, ad_group_ad.ad.gmail_ad.marketing_image, ad_group_ad.ad.gmail_ad.teaser.business_name, ad_group_ad.ad.gmail_ad.teaser.description, ad_group_ad.ad.gmail_ad.teaser.headline, ad_group_ad.ad.text_ad.headline, ad_group_ad.ad.expanded_text_ad.headline_part1, ad_group_ad.ad.expanded_text_ad.headline_part2, ad_group_ad.ad.image_ad.image_url, ad_group_ad.ad.image_ad.pixel_height, ad_group_ad.ad.image_ad.pixel_width, ad_group_ad.ad.image_ad.mime_type, ad_group_ad.ad.image_ad.name, ad_group_ad.ad.legacy_responsive_display_ad.long_headline, ad_group_ad.ad.legacy_responsive_display_ad.main_color, ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.text, ad_group_ad.ad.gmail_ad.marketing_image_display_call_to_action.text_color, ad_group_ad.ad.gmail_ad.marketing_image_headline, ad_group_ad.ad.gmail_ad.marketing_image_description, ad_group_ad.ad.responsive_display_ad.accent_color, ad_group_ad.ad.responsive_display_ad.allow_flexible_color, ad_group_ad.ad.responsive_display_ad.business_name, ad_group_ad.ad.responsive_display_ad.call_to_action_text, ad_group_ad.ad.responsive_display_ad.descriptions, ad_group_ad.ad.responsive_display_ad.price_prefix, ad_group_ad.ad.responsive_display_ad.promo_text, ad_group_ad.ad.responsive_display_ad.format_setting, ad_group_ad.ad.responsive_display_ad.headlines, ad_group_ad.ad.responsive_display_ad.logo_images, ad_group_ad.ad.responsive_display_ad.square_logo_images, ad_group_ad.ad.responsive_display_ad.long_headline, ad_group_ad.ad.responsive_display_ad.main_color, ad_group_ad.ad.responsive_display_ad.marketing_images, ad_group_ad.ad.responsive_display_ad.square_marketing_images, ad_group_ad.ad.expanded_text_ad.path1, ad_group_ad.ad.expanded_text_ad.path2, ad_group_ad.policy_summary, ad_group_ad.ad.legacy_responsive_display_ad.price_prefix, ad_group_ad.ad.legacy_responsive_display_ad.promo_text, ad_group_ad.ad.responsive_search_ad.descriptions, ad_group_ad.ad.responsive_search_ad.headlines, ad_group_ad.ad.responsive_search_ad.path1, ad_group_ad.ad.responsive_search_ad.path2, ad_group_ad.ad.legacy_responsive_display_ad.short_headline, ad_group_ad.status, ad_group_ad.ad.system_managed_resource_source, ad_group_ad.ad.app_ad.descriptions, ad_group_ad.ad.app_ad.headlines, ad_group_ad.ad.app_ad.html5_media_bundles, ad_group_ad.ad.app_ad.images, ad_group_ad.ad.app_ad.mandatory_ad_text, ad_group_ad.ad.app_ad.youtube_videos FROM ad_group_ad ",
  "page_token": ""

}


But error occurred continuously every time we sent, and here is it:

"502. That’s an error.

The server encountered a temporary error and could not complete your request.

Please try again in 30 seconds. That’s all we know."

Could you please check again that is it possible to get data for this account?

Project YSS

unread,
Jul 11, 2019, 5:11:29 AM7/11/19
to AdWords API and Google Ads API Forum
One more thing about this problem: when we add limit clause in the query to limit the number of responses then we can still get the data(those data have totalResultCount more than 1 million)
so, is there any way we can use to get all data for those customerId? please help me.

Google Ads API Forum Advisor Prod

unread,
Jul 11, 2019, 3:25:01 PM7/11/19
to ad...@septeni-technology.jp, adwor...@googlegroups.com

Hello, 

It looks like the error could be due to the extremely large data sets that you are retrieving. Could you please retry the request with a shorter date range or use filters to break up the report request into multiple, smaller requests? If you're facing the issue, please let us know to investigate the issue further.

Thanks,


Bharani, Google Ads API Team



ref:_00D1U1174p._5001UCbm8P:ref

Project YSS

unread,
Jul 12, 2019, 6:13:43 AM7/12/19
to AdWords API and Google Ads API Forum
Thanks for your response,
We are going to use ad_group_ad.id as filter. But I don't know whether ad_group_ad.is is increment or not.
So, can you please tell me that ad_group_ad.id is increment, isn't it?

Google Ads API Forum Advisor Prod

unread,
Jul 12, 2019, 8:39:10 AM7/12/19
to ad...@septeni-technology.jp, adwor...@googlegroups.com
Hello, 

That's right. You should be able to filter based on the Ad group Id. Please find the sample query below:

"SELECT customer.id, ad_group_ad.ad.id, ad_group_ad.ad_group, campaign.id FROM ad_group_ad WHERE ad_group.id = 'xxxxxxxxxxx'";

You can also segment this based on date using segments.date. Please give this a try and let us know if you have any issues.



Thanks,
Bharani, Google Ads API Team



ref:_00D1U1174p._5001UCbm8P:ref
Reply all
Reply to author
Forward
0 new messages