Thanks a lot.

On Tue, 28 Feb 2023 at 02:06, Google Ads API Forum Advisor
<adsapi@forumsupport.google> wrote:

> Hi Amritpal,
>
> Thanks for reaching out to the Google Ads API Forum.
>
> I see that you have concerns regarding finding the location id for a
> country which contains all the cities. you may use the *Campaign
> Criterion resource*
> <https://developers.google.com/google-ads/api/reference/rpc/v12/CampaignCriterion?authuser=1>,
> more specifically in your question is the *location*
> <https://developers.google.com/google-ads/api/reference/rpc/v12/CampaignCriterion#location>.
> You may use the *geo_target_constant*
> <https://developers.google.com/google-ads/api/fields/latest/geo_target_constant>
> report. You may see the GAQL below:
>
> 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 = 'IN'
>
> *Results:*
>
> {
>
>       "geoTargetConstant": {
>
>         "status": "ENABLED",
>
>         "targetType": "Country",
>
>         "name": "India",
>
>         "countryCode": "IN",
>
>         "canonicalName": "India",
>
>         *"resourceName": "geoTargetConstants/2356",*
>
>         "id": "2356"
>
>       }
>
>     },
>
>     {
>
>       "geoTargetConstant": {
>
>         "status": "ENABLED",
>
>         "targetType": "Union Territory",
>
>         "name": "Andaman and Nicobar Islands",
>
>         "countryCode": "IN",
>
>         "canonicalName": "Andaman and Nicobar Islands,India",
>
>     *    "parentGeoTarget": "geoTargetConstants/2356",*
>
>         "resourceName": "geoTargetConstants/20452",
>
>         "id": "20452"
>
>       }
>
>     },
>
>     {
>
>       "geoTargetConstant": {
>
>         "status": "ENABLED",
>
>         "targetType": "State",
>
>         "name": "Andhra Pradesh",
>
>         "countryCode": "IN",
>
>         "canonicalName": "Andhra Pradesh,India",
>
>      *   "parentGeoTarget": "geoTargetConstants/2356",*
>
>         "resourceName": "geoTargetConstants/20453",
>
>         "id": "20453"
>
>       }
>
>     },
>
>     :
>
>     :
>
>
>
> As you can see above, *geoTargetConstants/2356* is for India which has
> targetType as a country. I hope this helps.
>
> Regards,
> [image: Google Logo] Google Ads API Team
>
>
>
>
> ref:_00D1U1174p._5004Q2jH6B7:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/CANB-VmmE%3DXV_f6gB_0-95MkKSZxAq%3DEF-Z3n8jHbiHQQR5WGpw%40mail.gmail.com.

Reply via email to