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.

https://developers.google.com/google-ads/api/data/geotargets

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



On Tuesday, 22 April 2025 at 18:40:06 UTC+5:30 Google Ads API Forum Advisor 
wrote:

> 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* 
> <https://developers.google.com/google-ads/api/rest/reference/rest/v17/customers.googleAds/search?apix=true>
>  
> or* searchStream* 
> <https://developers.google.com/google-ads/api/rest/reference/rest/v17/customers.googleAds/searchStream?apix=true>
>  
> methods in making the API calls while retrieving the data. Additionally, 
> you can utilize the *Google Ads Query Builder* 
> <https://developers.google.com/google-ads/api/fields/v18/geographic_view_query_builder>
>  
> and *Query Validator* 
> <https://developers.google.com/google-ads/api/fields/v17/query_validator> 
> to build and validate the queries for retrieving the data from the Google 
> Ads API.
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
> Feedback
> How was our support today? 
>
> [image: rating1] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=1&entry.295079254=500Ht00001qUXuGIAW>
>   
>   [image: rating2] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=2&entry.295079254=500Ht00001qUXuGIAW>
>   
>   [image: rating3] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=3&entry.295079254=500Ht00001qUXuGIAW>
>   
>   [image: rating4] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=4&entry.295079254=500Ht00001qUXuGIAW>
>   
>   [image: rating5] 
> <https://docs.google.com/forms/d/e/1FAIpQLSeRhIg5VeThVmbcD0c5DTWTDjmpJuSktN8vFelEL7_KV_Orbg/viewform?usp=pp_url&entry.141427034=5&entry.295079254=500Ht00001qUXuGIAW>
> [2025-04-22 13:04:47Z GMT] This message is in relation to case 
> "ref:!00D1U01174p.!500Ht01qUXuG:ref" (ADR-00300701)
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/adwords-api/4f800127-c6d8-4891-917a-d69e9fa351abn%40googlegroups.com.

Reply via email to