Use Google Ads API to synchronize data from Google Ads

68 views
Skip to first unread message

Rostyslav Bilan

unread,
Mar 29, 2023, 10:01:46 AM3/29/23
to Google Ads API and AdWords API Forum
Hello,
We are using Google Ads API to synchronize data from Google Ads with our database. To do this, we are using multiple queries to get up-to-date data. However, due to the high volume of requests, we are not entirely satisfied with this method.
We were wondering if there is a way to retrieve all the data we need with a single request, rather than splitting it into several. We would appreciate it if you could provide us with any information or suggestions on how to achieve this.

We're currently using queries to different tables (campaign, label, bidding_strategy, ...) 
query = ( " select ... FROM campaign WHERE ... " ) response = ga_service.search_stream(customer_id=customer_id, query=query) ...
query = ( " select ... FROM label WHERE ... " ) ...
Maybe there is a way how we can get all the data in one response or download a file with all data and then process it on our side?Any help or guidance you can provide would be greatly appreciated. Thank you in advance for your time and assistance.Best regards,
Rostyslav

Google Ads API Forum Advisor

unread,
Mar 29, 2023, 2:00:58 PM3/29/23
to rostysl...@mint.ai, adwor...@googlegroups.com

Hello Rostyslav,

Thank you for reaching out to Google Ads API Support.

Reporting of performance data is an integral part of Google Ads API applications. With the API's flexible reporting options, you can obtain performance data for all resources. However, since some resources such as metrics are only available to specific reports, I'm afraid that not everything can be pulled within a single request as you will need to create multiple reports to pull different data. If you are performing queries to different resources like campaignlabelbidding_strategy, then there is no way to join each of your queries into 1 query and get all the data in one response in Google Ads API.

More information can be found on the below documentations:

Additionally, you may also refer in this guide about the Google Ads Query Language Grammar. Moreover, trying to retrieve a single report with huge amount of data may also result in different errors. Thus, we as part of best reporting practices, we also suggest using segmentation and paging on such scenarios. More information can be found below:


Let us know if you have further questions related to Google Ads API.

Regards,

Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2kCv78:ref

Google Ads API Forum Advisor

unread,
Mar 29, 2023, 2:13:08 PM3/29/23
to rostysl...@mint.ai, adwor...@googlegroups.com
ref:_00D1U1174p._5004Q2kCvFf:ref
Reply all
Reply to author
Forward
0 new messages