type Location (v202411)
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/v202411
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\u003eA \u003ccode\u003eLocation\u003c/code\u003e object represents a targetable geographical entity, like a country, city, or state.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eLocation\u003c/code\u003e is uniquely identified by its \u003ccode\u003eid\u003c/code\u003e and categorized by its \u003ccode\u003etype\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eLocations have a hierarchical relationship, indicated by the \u003ccode\u003ecanonicalParentId\u003c/code\u003e, and a localized \u003ccode\u003edisplayName\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe API version you use may influence the level of detail available for a \u003ccode\u003eLocation\u003c/code\u003e.\u003c/p\u003e\n"]]],["The content outlines various services within an ad management API, including AdRule, Adjustment, Forecast, LineItem, NativeStyle, ProposalLineItem, Proposal, PublisherQueryLanguage, TargetingPreset, and YieldGroup. It details `Location` as a geographical targeting entity, identified by an `id`, `type`, `canonicalParentId`, and `displayName`. The API namespace is `https://www.google.com/apis/ads/publisher/v202411`, and `Location` can be represented as a base class or sub-classed depending on the API version.\n"],null,["# type Location (v202411)\n\n**Service** \n[AdRuleService](/ad-manager/api/reference/v202411/AdRuleService.Location) [AdjustmentService](/ad-manager/api/reference/v202411/AdjustmentService.Location) [ForecastService](/ad-manager/api/reference/v202411/ForecastService.Location) [LineItemService](/ad-manager/api/reference/v202411/LineItemService.Location) [NativeStyleService](/ad-manager/api/reference/v202411/NativeStyleService.Location) **ProposalLineItemService** [ProposalService](/ad-manager/api/reference/v202411/ProposalService.Location) [PublisherQueryLanguageService](/ad-manager/api/reference/v202411/PublisherQueryLanguageService.Location) [TargetingPresetService](/ad-manager/api/reference/v202411/TargetingPresetService.Location) [YieldGroupService](/ad-manager/api/reference/v202411/YieldGroupService.Location) **Dependencies** \n[GeoTargeting](/ad-manager/api/reference/v202411/ProposalLineItemService.GeoTargeting) \n▼\n**Location**\n\nA [Location](/ad-manager/api/reference/v202411/ProposalLineItemService.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/v202411`\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. |"]]