Hello Google Ads API team,
I’m encountering an issue when querying the ad group criteria for my campaigns, where certain fields are consistently returning null values, particularly for location, age_range, and gender. However, I am getting results for keywords, which seems to cause confusion with the other targeting fields.
I’m using the following query to retrieve targeting criteria for a specific campaign:
While this query runs successfully, it returns rows where the location, age_range, and gender fields are null, but I am getting keywords (exactly 10 results for 10 keywords in this ad group). Based on this, I’m led to believe that:
Are keywords and targeting data (e.g., location, age_range, gender) stored in the same structure as ad group criteria?
My results suggest that keywords and other targeting criteria like location, age, and gender share the same resource (ad_group_criterion), but I’d like clarification on whether this is intended behavior.
Why are non-relevant fields (like location, age, and gender) returning null for keyword targeting?
Is it expected for those fields to return null when querying keywords, or is there something I’m missing in my query setup that causes this?
How should I structure my query to filter out keywords when I only want to focus on location, demographic, and device targeting?
I attempted to use the following query to exclude keywords:
Hi,
Thank you for reaching out to the Google Ads API support team.
AdGroupCriterion is structured in such a way that its report only includes criteria that have been explicitly added to the ad group. That means if the KeywordInfo criterion is added to the Adgroup, then the AdGroupCriterion returns the KeywordInfo criterion in its report.
At the ad group level, you can either target or exclude specific keywords for targeting explicitly.
Regarding the returning null values, particularly for location, age_range, and gender, kindly get back to us with the complete API logs (request and response logs with request-id and request header) generated at your end when retrieving the data via the API so that we will check and get back to you.
If you are using a client library and haven't enabled the logging yet, I would request that you enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby 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.
![]() |
Google Ads API Team |