Google Ads API with segments column result in empty

105 views
Skip to first unread message

Manish Kumar

unread,
Apr 5, 2023, 5:33:17 AM4/5/23
to Google Ads API and AdWords API Forum
Hi All ,

I am getting the empty results when I call the below API for campaign table with segments table column in select query.


Could anyone please help me how to populate data for segments column in campaign table.
Thanks
Manish
Message has been deleted

Google Ads API Forum Advisor

unread,
Apr 5, 2023, 8:35:22 AM4/5/23
to manish...@gmail.com, adwor...@googlegroups.com

Hello Manish,

Thank you for reaching out to Google Ads API Support.

I noticed that you are using Google Ads API v11 in your request. Please check out our blog post about the Google Ads API v11 sunset reminder for more information. In this sunset reminder, Google Ads API v11 will sunset on March 29, 2023. After this date, all v11 API requests will begin to fail. Please migrate to a newer version as soon as possible to ensure your API access is unaffected, and keep an eye on our blog for updates.

Please note that, when adding some segments, the metrics in the summary row may decrease. For more information please refer to this segmentation guide.

If you have already tried reducing the fields and segments in your query and yet you are still getting empty data, can you please provide us with the complete request and response logs with request ID generated by the v13 API as shown in the respective links, so we can check on our end the errors being thrown? And also an uncropped screenshot of the Google Ads UI showing the data you wish to pull from the API.

You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,

Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2kFXJF:ref
Message has been deleted

Manish Kumar

unread,
Apr 11, 2023, 2:26:17 AM4/11/23
to Google Ads API and AdWords API Forum
Hi All,

I have created a test account for testing . Let me know if its possible to populate the data in the segment with test account?

Thanks
Manish

On Monday, April 10, 2023 at 6:21:18 PM UTC+5:30 Manish Kumar wrote:
Hi ,

I have attached the screenshot of working query and the query which results in empty. There is only one difference if I use segments.date(or any other segment) the API results are empty.

Let me know if this is the desired behaviour if yes how to populate the data in segments ? If not what is wrong I am doing.

Thanks
Manish

Google Ads API Forum Advisor

unread,
Apr 11, 2023, 6:05:59 AM4/11/23
to manish...@gmail.com, adwor...@googlegroups.com
Hi Manish,

Thank you for getting back to us. I hope that you are doing well today.

I had to delete your post since complete logs posted on the forum. For the reference, you may refer to below without sensitive information:

“URL was: https://googleads.googleapis.com/v11/customers/XXXXX/assets:mutate

Moving forward to your concern, please note that "when adding some segments, the metrics in the summary row may decrease". In addition, the segments segments.date, segments.week, segments.month, segments.quarter, and segments.year function as follows:
  • These segments can be filtered in the WHERE clause without appearing in the SELECT clause.
  • If any of these segments are in the SELECT clause, a finite date range composed of core date segments must be specified in the WHERE clause (the date segments don't need to be the same ones specified in the SELECT).

For more information about segmentation, you may check on this link ( https://developers.google.com/google-ads/api/docs/reporting/segmentation ).

In addition, the reason why it does not return is because all of the metrics are 0. You may check on this document ( https://developers.google.com/google-ads/api/docs/reporting/zero-metrics ) regarding Zero metrics.

Lastly, if this is not what you are referring to, you may provide us the full non-cropped and non-redacted screenshot of the UI where we can see the report that you are trying to fetch via API. You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Kind regards,
Reply all
Reply to author
Forward
0 new messages