How can I get metrics for each day for my campaign via Google Ads Api ?

426 views
Skip to first unread message

Виталий Мамонтов

unread,
Feb 21, 2023, 9:19:52 AM2/21/23
to Google Ads API and AdWords API Forum
Hi!
I need to get Campaign metrics for each day of its being.
For example, I have a campaign that started on 01/01/2023 and ended on 01/07/2023.

I want to get metrics for:
  • 01/01/2023
  • 01/02/2023
  • 01/03/2023
  • 01/04/2023
  • 01/05/2023
  • 01/06/2023
  • 01/07/2023
I know that we can paste something like segments.date = "xx/xx/xxxx" in query, but if the campaign was serving for 1 year, I should send 360+ requests!
Could I get this data in 1 request?
As I know, Google Ads API has limited requests per day, so it will be great.

Vitalii Mamontov

unread,
Feb 21, 2023, 9:30:40 AM2/21/23
to Google Ads API and AdWords API Forum
Chat GPT said, that I need to use DURING in WHERE clause.
But, will it return data for each day? Or just an aggregation for this period?
chat.png

Google Ads API Forum Advisor

unread,
Feb 21, 2023, 2:23:54 PM2/21/23
to vinti...@gmail.com, adwor...@googlegroups.com

Hi Vitalii, 

Thanks for reaching out to the Google Ads API Forum. I hope you are doing well today.

Moving forward to your concern, in general when it comes to date segmentation, I recommend to see the Google Ads API Rules for segments in the WHERE clause and Rules for core date segment fields for segments.date, segments.week, segments.month, segments.quarter, segments.year.

You may also see the Google Ads API Date Ranges, which lets you specify the date range in these ways: Custom date rangePredefined date rangePredefined time period.

The above documentation and guidelines will help you to understand the date segmentation and ranges that are supported in Google Ads API, please use what best suits to your queries to avoid future errors.

You may use “Google Ads Query Validator” to test if the entered query is valid.

I hope it helps. Have a great day.

Regards,

Google Logo
Marjorie
Google Ads API Team
 


ref:_00D1U1174p._5004Q2jF1qI:ref

Vitalii Mamontov

unread,
Feb 21, 2023, 2:27:22 PM2/21/23
to Google Ads API and AdWords API Forum
Thanks.
Will try to do so.

Have a nice day.
Reply all
Reply to author
Forward
0 new messages