metrics always 0

85 views
Skip to first unread message

Viktor Zeman

unread,
Feb 13, 2025, 5:17:12 AM2/13/25
to Google Ads API and AdWords API Forum
I am trying to retrieve data from search_term_view

I want to get keywords with more than 2 impressions not added to group  or negative keywords

Example of query  (real customer_id was replaced with 0000...):

SELECT
search_term_view.search_term,
campaign.id,
campaign.name,
ad_group.id,
ad_group.name,
metrics.clicks,
metrics.impressions
FROM search_term_view
WHERE
search_term_view.status='NONE' AND
campaign.status='ENABLED' AND
ad_group.status='ENABLED' AND
ad_group.type='SEARCH_STANDARD' AND
metrics.impressions > 0 AND
customer.id = 0000000000 AND segments.date DURING TODAY


PROBLEM: it never returns any row, even I see keywords with more than 2 impressions in the live google ads. Even if I execute query like this, I get always all metrics data with 0

SELECT
search_term_view.search_term,
campaign.id,
campaign.name,
ad_group.id,
ad_group.name,
metrics.clicks,
metrics.impressions
FROM search_term_view
WHERE
search_term_view.status='NONE' AND
campaign.status='ENABLED' AND
ad_group.status='ENABLED' AND
ad_group.type='SEARCH_STANDARD' AND
customer.id = 0000000000 AND segments.date DURING TODAY



Does my developer token needs different permissions to access metrics data?

Thank you for your help


Google Ads API Forum Advisor

unread,
Feb 13, 2025, 5:55:59 AM2/13/25
to vze...@gmail.com, adwor...@googlegroups.com
Hi,

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

In order to assist you further, please provide us with the uncropped UI screenshot of the report by highlighting the data that you're trying to retrieve via the API.  

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.!5004Q02vH1ho:ref" (ADR-00288205)

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5


 




 

Google Ads API Forum Advisor

unread,
Feb 13, 2025, 1:47:11 PM2/13/25
to vze...@gmail.com, adwor...@googlegroups.com
Hi,

From the provided query, I tried modifying some of the segments and metrics and I am able to retrieve the impressions greater than 2 and those are not added to ad group group or negative keywords, where the metrics are same as in the Google Ads UI. Please refer to the query below:
"query":"SELECT search_term_view.search_term, segments.keyword.info.match_type, search_term_view.status, campaign.name, ad_group.name, metrics.clicks, metrics.impressions, metrics.ctr, metrics.average_cpc, metrics.cost_micros, campaign.advertising_channel_type FROM search_term_view WHERE segments.date = '"'"'2025-02-13'"'"' AND metrics.impressions > 1 AND search_term_view.status = '"'"'NONE'"'"'"
You can try making a request using the Search or SearchStream by passing the customer Id. Also, you can use Query Builder to create your query and Query Validator to validate your query. I hope this helps, let me know how this goes on your end.

Viktor Zeman

unread,
Feb 13, 2025, 6:29:17 PM2/13/25
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Here is the Query:
SELECT 
search_term_view.search_term,
campaign.id,
campaign.name,
ad_group.id,
ad_group.name,
metrics.clicks,
metrics.impressions
FROM search_term_view
WHERE
search_term_view.status='NONE' AND
campaign.status='ENABLED' AND
ad_group.status='ENABLED' AND
ad_group.type='SEARCH_STANDARD' AND
        customer.id = 1795092665 AND metrics.impressions > 1 AND segments.date DURING TODAY

This is the screen from Google Ads for today, there are 3 rows with more than one impression:
Screenshot 2025-02-13 at 16.30.21.jpg
If I remove AND metrics.impressions > 1
from the query, it returns rows, but metrics columns are zero (always and all metrics)

Thank you

Regards,

Viktor Zeman

Alexandre Airvault

unread,
Feb 17, 2025, 3:13:43 AM2/17/25
to Google Ads API and AdWords API Forum
Have you tried with the following trying to get data on last 7 days and remove search_term_view.status='NONE. This filter was likely the main reason you weren't getting results. Search terms with impressions are rarely going to have a status other than NONE.

SELECT search_term_view.search_term, campaign.id, campaign.name, ad_group.id, ad_group.name, metrics.clicks, metrics.impressions FROM search_term_view WHERE campaign.status = 'ENABLED' AND ad_group.status = 'ENABLED' AND ad_group.type = 'SEARCH_STANDARD' -- Or consider removing if you have Performance Max and want to include its search terms. AND metrics.impressions > 2 -- Your original condition AND segments.date DURING LAST_7_DAYS -- Try a broader date range for testing AND customer.id = 0000000000

Blobr - AI agents to optimise Google Ads spending

Viktor Zeman

unread,
Feb 21, 2025, 7:46:16 AM2/21/25
to Google Ads API and AdWords API Forum
I found the problem:
if in WHERE string is customer.id = 000000 ..... it will return always 0 in metrics .... when I removed this condition, it is working fine

Reply all
Reply to author
Forward
0 new messages