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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-06 UTC."],[[["\u003cp\u003ePublisherQueryLanguageService uses Location to represent a geographical entity for targeting.\u003c/p\u003e\n"],["\u003cp\u003eLocation can be sub-classed if the API version supports it, otherwise it's represented by the base class.\u003c/p\u003e\n"],["\u003cp\u003eEach Location is uniquely identified by an ID and categorized by type and name.\u003c/p\u003e\n"],["\u003cp\u003eLocations have a hierarchical relationship, indicated by the \u003ccode\u003ecanonicalParentId\u003c/code\u003e field.\u003c/p\u003e\n"]]],["The provided content details the structure and attributes of a `Location` within an ad management API, specifically version v202408. A `Location` is a geographical entity used for targeting, identified by a unique `id`. Key attributes include `type` (e.g., \"COUNTRY\", \"CITY\"), `canonicalParentId` for hierarchical relationships, and `displayName` for the localized name. The namespace for this service is `https://www.google.com/apis/ads/publisher/v202408`. Other services available in the API are listed.\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](/ad-manager/api/reference/v202408/NativeStyleService.Location) [ProposalLineItemService](/ad-manager/api/reference/v202408/ProposalLineItemService.Location) [ProposalService](/ad-manager/api/reference/v202408/ProposalService.Location) **PublisherQueryLanguageService** [TargetingPresetService](/ad-manager/api/reference/v202408/TargetingPresetService.Location) [YieldGroupService](/ad-manager/api/reference/v202408/YieldGroupService.Location) **Dependencies** \n[GeoTargeting](/ad-manager/api/reference/v202408/PublisherQueryLanguageService.GeoTargeting) \n▼\n**Location**\n\nA [Location](/ad-manager/api/reference/v202408/PublisherQueryLanguageService.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. |"]]