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: SELECT ad_group_criterion.type, ad_group_criterion.negative, ad_group_criterion.location.geo_target_constant, ad_group_criterion.age_range.type, ad_group_criterion.gender.type, ad_group_criterion.device.type, ad_group_criterion.language.language_constant, ad_group_criterion.resource_name FROM ad_group_criterion WHERE campaign.id = ${campaignId} 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: 1. *Keywords* are treated as part of the *ad group criteria*. 2. Since *keywords* do not use fields like *location*, *age_range*, or *gender*, those fields naturally return null for those rows. What I’m Trying to Understand: 1. *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. 2. *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: SELECT ad_group_criterion.type, ad_group_criterion.location.geo_target_constant, ad_group_criterion.age_range.type, ad_group_criterion.gender.type, ad_group_criterion.device.type, ad_group_criterion.language.language_constant, ad_group_criterion.resource_name FROM ad_group_criterion WHERE ad_group_criterion.type != 2 AND campaign.id = ${campaignId} But I still have some uncertainty about how ad group criteria are structured in the Google Ads system. So, does each keyword being created for an ad group also create a targeting criteria in that ad group for that keyword? Even if I haven't specific any targeting? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/03f6d07a-671e-417a-8635-10b982b86981n%40googlegroups.com.