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 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.