Duplicate Results in Google Ads API

65 views
Skip to first unread message

Bharani

unread,
Feb 19, 2023, 8:56:22 PM2/19/23
to Google Ads API and AdWords API Forum
I am trying the get the meta data from the keyword view / ad_group_criterion.
Please find the query that I use to fetch the data.
I am getting duplicate data for the and the pageination is endless which goes upto 12 pages after which I manually killed. Similar report when computed from the Google Ads Reporting UI, I get only ~8600 Records.

SELECT ad_group_criterion.keyword.text,ad_group.id,ad_group.name,ad_group.status,customer.descriptive_name,campaign.id,campaign.name,campaign.status,ad_group_criterion.criterion_id,ad_group_criterion.criterion_id from ad_group_criterion

Thanks.

Google Ads API Forum Advisor

unread,
Feb 20, 2023, 7:47:31 AM2/20/23
to adwor...@googlegroups.com
Hi Bharani,

 

Thank you for reaching out to us.

 

To help me better understand the issue, could you please provide the information below so that I can further check this and provide appropriate recommendations to you?
  • Your Google Ads Customer ID with this issue.
  • Detailed steps to reproduce duplicate rows in API response.
  • Detailed steps to reproduce the same report from Google Ads UI.
  • An example screenshot highlighting the duplicate rows.
 

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

 

Best Regards,
Google Logo
Da
Google Ads API Team
 


ref:_00D1U1174p._5004Q2j1y9p:ref

Bharani

unread,
Feb 22, 2023, 5:33:19 AM2/22/23
to Google Ads API and AdWords API Forum
Hi Da,

* The customerID used is "8046382631".
Body: {
"pageSize": 10000,
"query": "SELECT ad_group_criterion.keyword.text,ad_group.id,ad_group.name,ad_group.status,customer.descriptive_name,campaign.id,campaign.name,campaign.status,ad_group_criterion.criterion_id,ad_group_criterion.criterion_id from ad_group_criterion"
}

This request give the actual result and next_page_token. While send the next_page_token under the "page_token" parameter, We get the next set of records and so on.

* Go to Google Ads console.
  1. Select reports section.
  2. Create custom report
  3. select the customer id(8046382631).
  4. select "Keyword","Keyword ID","Adgroup ID","Adgroup name","Campaign id","Campaign name" and generate the report.
* PFA attached duplicate records screenshot.

Regards,
Bharani

Screenshot 2023-02-22 at 3.58.59 PM.png

Google Ads API Forum Advisor

unread,
Feb 23, 2023, 8:53:14 AM2/23/23
to adwor...@googlegroups.com
Hi Bharani,

Thanks for providing the details to us.

After taking a look at them, we confirm this is working as intended. The keyword criterion that you took in the screenshot is linked to different ad groups and campaigns. It is correct for it to show up in multiple different rows when you select ad group and campaign fields in the GAQL query.

Bharani

unread,
Feb 27, 2023, 6:54:39 AM2/27/23
to Google Ads API and AdWords API Forum
Hi,

Thanks for the clarification.

But is there any way, I can get just the result that I get from the UI?

Any resource on that front is much appreciated.

Google Ads API Forum Advisor

unread,
Feb 27, 2023, 11:52:42 PM2/27/23
to adwor...@googlegroups.com
Hi Bharani,

Our query cookbook provides a set of Google Ads Query Language queries that demonstrate how to return the same data as screens in the Google Ads UI. You can use these queries as is or as starting points on for constructing your own customized queries.

Best Regards,
Google Logo Google Ads API Team


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