Issue with CriteriaID

62 views
Skip to first unread message

cv

unread,
Apr 22, 2025, 7:44:38 AM4/22/25
to Google Ads API and AdWords API Forum
Hi Team,

I can see that there is 2 different CriteriaID for the same CanonicalName.
CanonicalName : Las Vegas,Nevada,United States has 2 CriteriaID (1022639 and 9197757)
how I can identify which need to use?

Thanks,

Google Ads API Forum Advisor

unread,
Apr 22, 2025, 9:10:06 AM4/22/25
to chirag....@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for contacting the Google Ads API support team.

Note that the same canonical name can have multiple criterion IDs due to different levels of targeting. A canonical name might represent the same general location or other criteria, but the specific ID depends on the granular level of detail the targeting is set at. For example targeting a city or region or metro etc.

I would recommend you to use the below query that fetches the location targeting details with canonical names and criteria IDs to know which one to use. I.e., you can use the criteria ID which has an ‘ENABLED’ status.

SELECT geo_target_constant.canonical_name, geo_target_constant.country_code, geo_target_constant.id, geo_target_constant.name, geo_target_constant.parent_geo_target, geo_target_constant.resource_name, geo_target_constant.status, geo_target_constant.target_type FROM geo_target_constant WHERE geo_target_constant.country_code = <country_code>

You can use the search or searchStream methods in making the API calls while retrieving the data. Additionally, you can utilize the Google Ads Query Builder and Query Validator to build and validate the queries for retrieving the data from the Google Ads API.


Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-04-22 13:04:47Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUXuG:ref" (ADR-00300701)



cv

unread,
Jun 27, 2025, 3:29:48 AM6/27/25
to Google Ads API and AdWords API Forum
Hello ,
Thanks for your reply.

In many case the when I requesting when targeting a city or region or metro etc. based on canonical name I can see many same entryes with all other criteria are same.
for example
Canonical name : Rajpur,Gujarat,India with TragetType: City Country as IN state = ENABLED has 6 entries
So what is correct criteriaID?
I can see to be exact 438 Canonical name has more then 1 duplications.


What I was doing:
I have stored geotargets in my DB and doing this
SELECT
    CanonicalName,
    CountryCode,
    TargetType,
    COUNT(*) AS total_count
FROM
    location
WHERE Status = 'active'
GROUP BY
    CanonicalName,
    CountryCode,
    TargetType
HAVING
    COUNT(*) > 1
ORDER BY
    total_count DESC;


Thanks

Google Ads API Forum Advisor

unread,
Jun 27, 2025, 9:14:53 AM6/27/25
to chirag....@gmail.com, adwor...@googlegroups.com
Hi,

With regard to your concern, I am checking with the rest of our team and one of our colleagues will reach out to you once we have an update.​

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-06-27 13:14:05Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUXuG:ref" (ADR-00300701)



Reply all
Reply to author
Forward
0 new messages