How to get metrics for each day

1,094 views
Skip to first unread message

Charles Camisasca

unread,
May 24, 2022, 8:39:36 AM5/24/22
to Google Ads API and AdWords API Forum
  Hi, can you help me? I need to parse users metrics for each day from the first account day till now. For example, if account was created 01-01-2021 I need to parse some metrics for 01-01-2021, 02-01-2021, 03-01-2021 .... 24-05-2022. I need it to push metric data to our app chart.
  Of course, I can send requests day by day, 366 requests for the period of 1 year, but Google Ads API has a requests limit, and if I will have a thousand users - I will use this limit fully very quickly. Is there any functionality to generate one big report for all dates in 1 request? Or how I can do it in the best way?
  Thanks!

Google Ads API Forum Advisor

unread,
May 25, 2022, 2:55:34 AM5/25/22
to ecommbo...@gmail.com, adwor...@googlegroups.com
Hi Charles,

Thank you for reaching out to the Google Ads API team. 

Moving forward to your concern, you can use the segments.date filter here. You also need to use the paging through results, please see this documentation about this.

However, kindly note that if you want to call in just 1 request and it has more data, then I am afraid that this is not possible because doing so, you will encounter errors.

Regards,
Google Logo
Carmela
Google Ads API Team
 


ref:_00D1U1174p._5004Q2bCxQN:ref

Charles Camisasca

unread,
May 25, 2022, 11:40:20 AM5/25/22
to Google Ads API and AdWords API Forum
Hello,
Thanks for your answer! I can use more that 1 request. The main question is how to do it with the fewer requests as possible. I tried to send requests using segments, as you provided, but seems like the server returns me just a summary value of all periods. But I need to get data for each day separately. How can I do it? Maybe you can show an example of API query for it?

Google Ads API Forum Advisor

unread,
May 26, 2022, 10:43:09 AM5/26/22
to ecommbo...@gmail.com, adwor...@googlegroups.com

Hi Charles,

Thanks for getting back to us.

Kindly note that while Search can send multiple paginated requests to download the entire report, SearchStream sends a single request and initiates a persistent connection with the Google Ads API regardless of report size, and provides improved performance over paging, especially for bigger reports. For example, when a report consists of 100,000 rows for example,then 1 request of searchStream will get 1 continuous stream of response. SearchStream(SearchGoogleAdsStreamRequest) returns all rows that match the search stream query along with the setting SUMMARY_ROW_WITH_RESULTS options. For streaming examples using the client library, you may check this page.

In addition, you may use a finite date range composed of core date segments in your where clause of your GAQL.

Let me know if this doesn't help, or more details on your use case.

Regards,

Google Logo
Yasar
Google Ads API Team
 


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