Bulk Download - Google Ads API

1,054 views
Skip to first unread message

Harshi Manju

unread,
Jan 5, 2021, 12:22:59 PM1/5/21
to AdWords API and Google Ads API Forum
Hi there, how to fetch data from google ads API. 

Here are my questions.
1.Is there any way to bulk download all the campaign structure and stats (Including adgroups, keywords, ads), or should we send each request separately to get the response in the object form?
2. Also,  Is there anyway like aw-reporting for Google ads api?

Google Ads API Forum Advisor Prod

unread,
Jan 5, 2021, 4:53:39 PM1/5/21
to harshim...@gmail.com, adwor...@googlegroups.com

Hi Harshi,

Thank you for reaching out. Please find my response to your questions below:
 

  1. You could use BatchJobService to perform batches of operations on multiple services without synchronously waiting for the operations to complete. This way, you would be able to bulk download various entities in your Google Ads account asynchronously. Please refer to this guide for more information on Batch Processing.
     

  2. In Google Ads API, you could download a set of reports from a list of accounts in parallel by using this sample code with GAQL

 

Thanks and regards,
Xiaoming, Google Ads API Team

 

Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2AHc6C:ref

Harshi Manju

unread,
Jan 19, 2021, 6:48:18 AM1/19/21
to AdWords API and Google Ads API Forum
Hi, 

How can we get the stats data for 380 days?

Harshi Manju

unread,
Jan 19, 2021, 8:28:52 AM1/19/21
to AdWords API and Google Ads API Forum
1. How can we get the stats data for the last 380 days in one go? If no, let me know if there is any alternate solution.
2.  I assume  we can get the multiple accounts in one go,  Just wanted to check there anyway to get the entire account structure for one specific account(Campaigns > adgroups > keywords > ads) within one request?

Google Ads API Forum Advisor Prod

unread,
Jan 19, 2021, 4:00:52 PM1/19/21
to harshim...@gmail.com, adwor...@googlegroups.com

Hi Harshi,

Thank you for reaching out. Please find my response to your questions below:
 

  1. You could specify a date range with 380 days difference by setting a predicate such as segments.date BETWEEN '2018-01-01' AND '2019-01-31'in the WHERE clause.

  2. To get the whole account hierarchy and objects, you could give it a try to query the account by using the get request
     

Thanks and regards,
Xiaoming, Google Ads API Team



ref:_00D1U1174p._5004Q2AHc6C:ref

Harshi Manju

unread,
Feb 2, 2021, 12:45:59 PM2/2/21
to AdWords API and Google Ads API Forum
Hi Google Team,

How can we get the data keyword structure? Could you please send  the GAQL query.
I need the keyword_id, keyword_name, keyword_status in the GAQL query. 
I was confusing for the keyword and was able to get the GAQL query for Campaign, AdGroup. Below is the reference

For Campaign: SELECT campaign.id, campaign.name , campaign.status FROM campaign ORDER BY campaign.id
For AdGroup: SELECT ad_group.id, ad_group.name , ad_group.status FROM ad_group where ad_group.status != 'REMOVED'

Google Ads API Forum Advisor Prod

unread,
Feb 3, 2021, 10:49:12 AM2/3/21
to harshim...@gmail.com, adwor...@googlegroups.com

Hi Harshi,

Thank you for reaching out. You could query the ad_group_criterion.criterion_id, ad_group_criterion.keyword.text and ad_group_criterion.status from the ad_group_criterion resource to fetch the keyword_id, keyword_name and keyword_status.



Thanks and regards,
Xiaoming, Google Ads API Team
 

Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2AHc6C:ref

Harshi Manju

unread,
Mar 9, 2021, 2:37:20 PM3/9/21
to AdWords API and Google Ads API Forum
Hi, Currently I'm fetching only keywords(Including search, display, video, negative keywords) from my account. 
1. How do we differentiate all different types of keywords(Is it like Is_negative = 1 for negative keywords)
I was confusing on how to write GAQL query for this?
Please help me with the GAQL.

  String query = "SELECT ad_group_criterion.criterion_id,ad_group_criterion.keyword.text,ad_group_criterion.status "
                        + "FROM ad_group_criterion where ad_group_criterion.status NOT IN ('UNKNOWN' ,'REMOVED')"; 
                 

Google Ads API Forum Advisor Prod

unread,
Mar 10, 2021, 11:03:08 AM3/10/21
to harshim...@gmail.com, adwor...@googlegroups.com

Hi Harshi,

Thank you for reaching out. You could add ad_group_criterion.negative in your query to check whether the keyword is excluded (`true`) or targeted(`false`). 



Thanks and regards,
Xiaoming, Google Ads API Team

 

Harshi Manju

unread,
Mar 23, 2021, 8:59:51 AM3/23/21
to AdWords API and Google Ads API Forum
How do we get only Search keywords and ignore negative keywords from ad_group_criterion service?

I've used like this:
SELECT ad_group_criterion.criterion_id,ad_group_criterion.keyword.text,ad_group_criterion.status FROM ad_group_criterion where ad_group_criterion.status NOT IN ('UNKNOWN' ,'REMOVED') and ad_group_criterion.negative=true

I would need only Search Keywords. I tried different ways, but count is not matching

Google Ads API Forum Advisor Prod

unread,
Mar 23, 2021, 9:55:06 PM3/23/21
to harshim...@gmail.com, adwor...@googlegroups.com
Hi Harshi,

The query that you provided appears to be correct and it return the search keywords only on the said report type. With this, could you clarify if you encountered any issues with the lastest GAQL of the report?

In addition, if you are looking for the report type dedicated for keywords only, then I would suggest using the keyword_view and include the ad_group_criterion.negative as filter of the report to get search keywords only and to not include negative keywords.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


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