How can I retrieve the exact "search keyword" UI column data using the Google Ads API?

110 views
Skip to first unread message

Nelson Brochado

unread,
Nov 24, 2022, 6:48:30 AM11/24/22
to Google Ads API and AdWords API Forum
Hello.

Currently, I'm trying to reproduce a report that was created in the Google Ads interface using the Google Ads API. This is not my ultimately goal, but it's necessary in order to check that I get the data that I see in the UI using the API.

In particular, I've been trying to map the columns

1. search keyword
2. quality score
3. landing page experience
4. exp. CTR 

to resources, metrics or segments in the API. However, I couldn't find the mappings. 

In this conversation, let me focus on the "Search Keyword" UI column. Then I will create other conversations for the other columns.

I thought that "search keyword" would correspond to e.g. "ad_group_criterion.keyword.text". However, if I try to get the keyword by selecting them from the ad_group_criterion resource (like here https://developers.google.com/google-ads/api/docs/samples/get-keywords), the results do not match what I see in the UI. Specifically, if I create a report in the UI with the columns "Search Keyword" and "Ad Group ID", there are "82,230" results. However, if I execute the following query

SELECT
ad_group.id,
ad_group_criterion.keyword.text
FROM ad_group_criterion
WHERE ad_group_criterion.type = KEYWORD

I get 98153 results. So, there's a clear discrepancy. Even if I add the condition: 

ad_group_criterion.status != REMOVED

to the WHERE part, I get 92637 results, which still doesn't match the ones from the UI. If I use the condition 

ad_group_criterion.status = ENABLED

I get 82081 results, which are closer to the 82,230 results, but still not the same. Here https://developers.google.com/google-ads/api/reference/rpc/v12/AdGroupCriterionStatusEnum.AdGroupCriterionStatus are all the available status, apparently.

I even tried to get this data from the keyword_view with

SELECT
ad_group_criterion.keyword.text,
ad_group.id
FROM keyword_view
WHERE ad_group_criterion.status = 'ENABLED'
AND ad_group_criterion.type = 'KEYWORD'


I still get the 82081 results.

So, my question is: how can I match these 82,230 results using the API? What query should I run?

Thank you for all the help.

Google Ads API Forum Advisor

unread,
Nov 25, 2022, 12:55:43 AM11/25/22
to nelson....@webrepublic.ch, adwor...@googlegroups.com
Hi Nelson,

It appears that you created two threads with the same concern. Please avoid creating two threads with the same concern to avoid confusion. With this, you may reply to the thread with a subject of "What do these UI columns in the Google Ads Reporting page correspond to in the GADs API?".

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


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