type Location (v202408)
Stay organized with collections
Save and categorize content based on your preferences.
A Location represents a geographical entity that can be targeted. If a location type is
not available because of the API version you are using, the location will be represented as just
the base class, otherwise it will be sub-classed correctly.
- Namespace
-
https://www.google.com/apis/ads/publisher/v202408
Field
|
id
|
xsd:long
Uniquely identifies each Location .
|
type
|
xsd:string
The location type for this geographical entity (ex. "COUNTRY", "CITY", "STATE", "COUNTY", etc.)
|
canonicalParentId
|
xsd:int
The nearest location parent's ID for this geographical entity.
|
displayName
|
xsd:string
The localized name of the geographical entity.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-06 UTC.
[null,null,["Last updated 2025-08-06 UTC."],[[["\u003cp\u003eLocation in Google Ad Manager is a geographical entity used for targeting.\u003c/p\u003e\n"],["\u003cp\u003eIt's uniquely identified by an ID and categorized by type (e.g., COUNTRY, CITY).\u003c/p\u003e\n"],["\u003cp\u003eEach location can have a parent indicated by 'canonicalParentId' and a localized name 'displayName'.\u003c/p\u003e\n"],["\u003cp\u003eYou can access location information through the NativeStyleService API.\u003c/p\u003e\n"]]],["The provided content details the structure and attributes of a `Location` within a service API. Key services include AdRule, Adjustment, Forecast, LineItem, NativeStyle, ProposalLineItem, Proposal, PublisherQueryLanguage, TargetingPreset, and YieldGroup. `Location` represents a targetable geographical entity, uniquely identified by an `id`. Its attributes include `type` (e.g., \"COUNTRY,\" \"CITY\"), `canonicalParentId` for its parent entity, and `displayName` for the localized name. The namespace for the API is defined.\n"],null,["# type Location (v202408)\n\n**Service** \n[AdRuleService](/ad-manager/api/reference/v202408/AdRuleService.Location) [AdjustmentService](/ad-manager/api/reference/v202408/AdjustmentService.Location) [ForecastService](/ad-manager/api/reference/v202408/ForecastService.Location) [LineItemService](/ad-manager/api/reference/v202408/LineItemService.Location) **NativeStyleService** [ProposalLineItemService](/ad-manager/api/reference/v202408/ProposalLineItemService.Location) [ProposalService](/ad-manager/api/reference/v202408/ProposalService.Location) [PublisherQueryLanguageService](/ad-manager/api/reference/v202408/PublisherQueryLanguageService.Location) [TargetingPresetService](/ad-manager/api/reference/v202408/TargetingPresetService.Location) [YieldGroupService](/ad-manager/api/reference/v202408/YieldGroupService.Location) **Dependencies** \n[GeoTargeting](/ad-manager/api/reference/v202408/NativeStyleService.GeoTargeting) \n▼\n**Location**\n\nA [Location](/ad-manager/api/reference/v202408/NativeStyleService.Location) represents a geographical entity that can be targeted. If a location type is\nnot available because of the API version you are using, the location will be represented as just\nthe base class, otherwise it will be sub-classed correctly.\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202408`\n\n| Field ----- ||\n|-------------------------|-----------------------------------------------------------------------------------------------------------------|\n| ### `id` | ` `xsd:`long` Uniquely identifies each `Location`. |\n| ### `type` | ` `xsd:`string` The location type for this geographical entity (ex. \"COUNTRY\", \"CITY\", \"STATE\", \"COUNTY\", etc.) |\n| ### `canonicalParentId` | ` `xsd:`int` The nearest location parent's ID for this geographical entity. |\n| ### `displayName` | ` `xsd:`string` The localized name of the geographical entity. |"]]