Why does the API return different results than the UI when using paid_organic_search_term_view?

363 views
Skip to first unread message

Nelson Brochado

unread,
Jan 16, 2023, 11:51:09 AM1/16/23
to Google Ads API and AdWords API Forum
Hello. 

I was trying to reproduce the "Paid & Organic" report, to which I also added the campaign and ad group statuses. 

In the UI, if I filter the data by these statuses, the resulting report is significantly smaller than the original report without the campaign and ad group statuses equal to ENABLED. Specifically, I get 28584 if I only fetch rows where the campaign is enabled (rather than 28881), and I get 13256 rows if I also select only enabled ad groups. 

However, if I try to reproduce that same report, whose screenshot you can find below, using the API and the following query, I am not able, because the API returns a lot more results. 

Here's the query.

SELECT
paid_organic_search_term_view.search_term,
campaign.status,
ad_group.status,
metrics.impressions,
metrics.clicks,
metrics.ctr,
metrics.average_cpc,
metrics.organic_impressions,
metrics.organic_clicks,
metrics.organic_queries,
metrics.organic_clicks_per_query,
metrics.organic_impressions_per_query,
metrics.combined_clicks,
metrics.combined_queries,
metrics.combined_clicks_per_query,
segments.search_engine_results_page_type
FROM paid_organic_search_term_view
WHERE segments.date BETWEEN '2022-10-01' AND '2022-11-12' AND campaign.status = 'ENABLED' AND ad_group.status = 'ENABLED'

The API returns 28404, excluding rows where all metrics are zero, and so on. In any case, the differences are too big.

Here's the UI report I'm trying to reproduce.

paid_and_organic.png

According to the docs, the API doesn't segment the data by the campaign or ad group status (or any other campaign or ad group attributes). However, if the API is supposed to mirror the UI, we should be able to reproduce the report that I'm trying to reproduce. So, how can I do it? 

Thank you.

Nelson Brochado

unread,
Jan 16, 2023, 11:55:38 AM1/16/23
to Google Ads API and AdWords API Forum
Sorry, the screenshot above is the wrong one. It should be this one.

paid_organic_report.png

Message has been deleted

Pawan Rai

unread,
Oct 17, 2023, 3:34:16 PM10/17/23
to Google Ads API and AdWords API Forum
Any solution to this problem yet?

I am also facing the same issue.

If you found any answer please let me know

Pawan Rai

unread,
Oct 17, 2023, 3:34:33 PM10/17/23
to Google Ads API and AdWords API Forum
table from API  =  paid_organic_search_term_view

API Query :  SELECT 
                ad_group.id
                ad_group.name,
                campaign.id,
                campaign.name,
                customer.id,
                customer.descriptive_name,
                customer.currency_code,
                customer.manager,
                metrics.clicks,
                metrics.combined_clicks,
                metrics.combined_clicks_per_query,
                metrics.combined_queries,
                metrics.impressions,
                metrics.ctr, 
                metrics.organic_clicks,
                metrics.organic_clicks_per_query,
                metrics.organic_impressions,
                metrics.organic_impressions_per_query,
                metrics.organic_queries,
                segments.date, segments.device,
                paid_organic_search_term_view.resource_name,
                paid_organic_search_term_view.search_term
                FROM paid_organic_search_term_view
                WHERE segments.date BETWEEN '{}' AND '{}' 

But when I am Checking the same for Google Ads UI and result are not matching and difference are following 

org_imp diff =  145
org_clicks diff = 
 2
org_queries diff = 
 11

date = 2023-10-01



Google Ads API Forum Advisor

unread,
Oct 18, 2023, 3:42:25 AM10/18/23
to pawan...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are seeing the discrepancies while retrieving the data between the Google Ads UI and the Google Ads API. Kindly note that the Google Ads API mirrors the Google Ads UI. We would like to specify first the following when comparing the value of the Google Ads UI and the Google Ads API.
  • The segments and fields of the API and UI should be the same.
  • The date range should also be the same.
  • Comparing the API and UI at the same level as possible.
With that, please provide us with the complete API logs (request and response with request-id and request header) generated along with the uncropped UI screenshot of the Google Ads account at your end to better assist you.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02pU055:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages