Provides methods for executing a PQL Statement to retrieve information from the system. In order to support the selection of columns of interest from various tables, Statement objects support a "select" clause.
An example query text might be "select
CountryCode, Name from Geo_Target"
, where
CountryCode
and Name
are columns of interest and
Geo_Target
is the table.
The following tables are supported:
Geo_Target
Column Name | Description |
---|---|
Id | Unique identifier for the Geo target |
Name | The name of the Geo target |
CanonicalParentId | The criteria ID of the direct parent that defines the canonical name of the geo target. For example, if the current geo target is "San Francisco", its canonical name would be "San Francisco, California, United States" thus the canonicalParentId would be the criteria ID of California and the canonicalParentId of California would be the criteria ID of United states |
ParentIds | A comma separated list of criteria IDs of all parents of the geo target ordered by ascending size |
CountryCode | Country code as defined by ISO 3166-1 alpha-2 |
Type | Allowable values:
|
Targetable | Indicates whether geographical targeting is allowed |
Bandwidth_Group
Column Name | Description |
---|---|
Id | Unique identifier for the bandwidth group |
BandwidthName | Name of the bandwidth group |
Browser
Note: this table only contains browsers that are available in the Ad Manager UI targeting picker.
Column Name | Description |
---|---|
Id | Unique identifier for the browser |
BrowserName | Name of the browser |
MajorVersion | Major version of the browser |
MinorVersion | Minor version of the browser |
Browser_Language
Column Name | Description |
---|---|
Id | Unique identifier for the browser language |
BrowserLanguageName | Browser's language |
Device_Capability
Column Name | Description |
---|---|
Id | Unique identifier for the device capability |
DeviceCapabilityName | Name of the device capability |
Device_Category
Column Name | Description |
---|---|
Id | Unique identifier for the device category |
DeviceCategoryName | Name of the device category |
Device_Manufacturer
Column Name | Description |
---|---|
Id | Unique identifier for the device manufacturer |
MobileDeviceManufacturerName | Name of the device manufacturer |
Mobile_Carrier
Column Name | Description |
---|---|
Id | Unique identifier for the mobile carrier |
CountryCode | The country code of the mobile carrier |
MobileCarrierName | Name of the mobile carrier |
Mobile_Device
Column Name | Description |
---|---|
Id | Unique identifier for the mobile device |
MobileDeviceManufacturerId | Id of the device manufacturer |
MobileDeviceName | Name of the mobile device |
Mobile_Device_Submodel
Column Name | Description |
---|---|
Id | Unique identifier for the mobile device submodel |
MobileDeviceId | Id of the mobile device |
MobileDeviceSubmodelName | Name of the mobile device submodel |
Operating_System
Column Name | Description |
---|---|
Id | Unique identifier for the operating system |
OperatingSystemName | Name of the operating system |
Operating_System_Version
Column Name | Description |
---|---|
Id | Unique identifier for the operating system version |
OperatingSystemId | Id of the operating system |
MajorVersion | The operating system major version |
MinorVersion | The operating system minor version |
MicroVersion | The operating system micro version |
Third_Party_Company
Column Name | Description |
---|---|
Id | Unique identifier for the third party company |
Name | The third party company name |
Type | The third party company type |
Status | The status of the third party company |
Line_Item
Column name | Type | Description |
---|---|---|
CostType |
Text
|
The method used for billing this LineItem . |
CreationDateTime |
Datetime
|
The date and time this LineItem was last created. This attribute may be
null for LineItem s created
before this feature was introduced. |
DeliveryRateType |
Text
|
The strategy for delivering ads over the course of the
LineItem 's duration. This
attribute is optional and defaults to DeliveryRateType.EVENLY. Starting in
v201306, it may default to DeliveryRateType.FRONTLOADED if specifically
configured to on the network. |
EndDateTime |
Datetime
|
The date and time on which the LineItem stops serving. |
ExternalId |
Text
|
An identifier for the LineItem that is meaningful to the
publisher. |
Id |
Number
|
Uniquely identifies the LineItem . This attribute is read-only and is
assigned by Google when a line item is created. |
IsMissingCreatives |
Boolean
|
Indicates if a LineItem is
missing any creatives for the creativePlaceholders specified. |
IsSetTopBoxEnabled |
Boolean
|
Whether or not this line item is set-top box enabled. |
LastModifiedDateTime |
Datetime
|
The date and time this LineItem was last modified. |
LatestNielsenInTargetRatioMilliPercent |
Number
|
The most recently computed in-target ratio measured from
Nielsen reporting data and the LineItem 's settings. It's provided in milli
percent, or null if not applicable. |
LineItemType |
Text
|
Indicates the line item type of a LineItem . |
Name |
Text
|
The name of the LineItem . |
OrderId |
Number
|
The ID of the Order to which the LineItem belongs. |
StartDateTime |
Datetime
|
The date and time on which the LineItem is enabled to begin serving. |
Status |
Text
|
The status of the LineItem . |
Targeting |
Targeting
|
The targeting criteria for the ad campaign. |
UnitsBought |
Number
|
The total number of impressions or clicks that will be reserved
for the LineItem . If the line
item is of type LineItemType.SPONSORSHIP, then it represents the
percentage of available impressions reserved. |
Ad_Unit
Column name | Type | Description |
---|---|---|
AdUnitCode |
Text
|
A string used to uniquely identify the ad unit for the purposes of serving the ad. This attribute is read-only and is assigned by Google when an ad unit is created. |
ExternalSetTopBoxChannelId |
Text
|
The channel ID for set-top box enabled ad units. |
Id |
Number
|
Uniquely identifies the ad unit. This value is read-only and is assigned by Google when an ad unit is created. |
LastModifiedDateTime |
Datetime
|
The date and time this ad unit was last modified. |
Name |
Text
|
The name of the ad unit. |
ParentId |
Number
|
The ID of the ad unit's parent. Every ad unit has a parent except for the root ad unit, which is created by Google. |
User
Column name | Type | Description |
---|---|---|
Text
|
The email or login of the user. | |
ExternalId |
Text
|
An identifier for the user that is meaningful to the publisher. |
Id |
Number
|
The unique ID of the user. |
IsServiceAccount |
Boolean
|
True if this user is an OAuth2 service account user, false otherwise. |
Name |
Text
|
The name of the user. |
RoleId |
Number
|
The unique role ID of the user. Role objects that are created by Google will have negative IDs. |
RoleName |
Text
|
The name of the Role assigned to the user. |
Programmatic_Buyer
Column name | Type | Description |
---|---|---|
BuyerAccountId |
Number
|
The ID used by Authorized Buyers to bill the appropriate buyer network for a programmatic order. |
EnabledForPreferredDeals |
Boolean
|
Whether the buyer is allowed to negotiate Preferred Deals. |
EnabledForProgrammaticGuaranteed |
Boolean
|
Whether the buyer is enabled for Programmatic Guaranteed deals. |
IsAgency |
Boolean
|
Whether the buyer is an advertising agency. |
Name |
Text
|
Display name that references the buyer. |
ParentId |
Number
|
The ID of the programmatic buyer's sponsor. If the programmatic buyer has no sponsor, this field will be -1. |
PartnerClientId |
Text
|
ID used to represent Display & Video 360 client buyer partner ID (if Display & Video 360) or Authorized Buyers client buyer account ID. |
Audience_Segment_Category
Column name | Type | Description |
---|---|---|
Id |
Number
|
The unique identifier for the audience segment category. |
Name |
Text
|
The name of the audience segment category. |
ParentId |
Number
|
The unique identifier of the audience segment category's parent. |
Audience_Segment
Column name | Type | Description |
---|---|---|
AdIdSize |
Number
|
The number of AdID users in the segment. |
CategoryIds |
Set of number
|
The ids of the categories that this audience segment belongs to. |
Id |
Number
|
The unique identifier for the audience segment. |
IdfaSize |
Number
|
The number of IDFA users in the segment. |
MobileWebSize |
Number
|
The number of mobile web users in the segment. |
Name |
Text
|
The name of the audience segment. |
OwnerAccountId |
Number
|
The owner account id of the audience segment. |
OwnerName |
Text
|
The owner name of the audience segment. |
PpidSize |
Number
|
The number of PPID users in the segment. |
SegmentType |
Text
|
The type of the audience segment. |
Time_Zone
Column name | Type | Description |
---|---|---|
Id |
Text
|
The id of time zone in the form of America/New_York . |
StandardGmtOffset |
Text
|
The standard GMT offset in current time in the form of
GMT-05:00 for America/New_York , excluding the Daylight Saving
Time. |
Proposal_Terms_And_Conditions
Column name | Type | Description |
---|
Change_History
Restrictions: Only ordering byChangeDateTime
descending is supported. The
IN
operator is only supported on
the entityType
column.
OFFSET
is not supported. To page
through results, filter on the earliest change Id
as a continuation token. For example
"WHERE Id < :id"
. On each
query, both an upper bound and a lower bound for the
ChangeDateTime
are required.
Column name | Type | Description |
---|---|---|
ChangeDateTime |
Datetime
|
The date and time this change happened. |
EntityId |
Number
|
The ID of the entity that was changed. |
EntityType |
Text
|
The type of the entity that was changed. |
Id |
Text
|
The ID of this change. IDs may only be used with
"<" operator for paging and
are subject to change. Do not store IDs. Note that the
"<" here does not compare the
value of the ID but the row in the change history table it
represents. |
Operation |
Text
|
The operation that was performed on this entity. |
UserId |
Number
|
The ID of the user that made this change. |
ad_category
Column name | Type | Description |
---|---|---|
ChildIds |
Set of number
|
Child IDs of an Ad category. Only general categories have children |
Id |
Number
|
ID of an Ad category |
Name |
Text
|
Localized name of an Ad category |
ParentId |
Number
|
Parent ID of an Ad category. Only general categories have parents |
Type |
Text
|
Type of an Ad category. Only general categories have children |
rich_media_ad_company
Column name | Type | Description |
---|---|---|
CompanyGvlId |
Number
|
IAB Global Vendor List ID of a Rich Media Ad Company |
GdprStatus |
Text
|
GDPR compliance status of a Rich Media Ad Company. Indicates whether the company has been registered with Google as a compliant company for GDPR. |
Id |
Number
|
ID of a Rich Media Ad Company |
Name |
Text
|
Name of a Rich Media Ad Company |
PolicyUrl |
Text
|
Policy URL of a Rich Media Ad Company |
mcm_earnings
Restriction: On each query, an expression scoping the MCM earnings to a single month is required (e.x. "WHERE month = '2020-01'" or "WHERE month IN ('2020-01')"). Bydefault, child publishers are ordered by their network code.Column name | Type | Description |
---|---|---|
ChildName |
Text
|
The name of the child publisher. |
ChildNetworkCode |
Text
|
The network code of the child publisher. |
ChildPaymentCurrencyCode |
Text
|
The child payment currency code as defined by ISO 4217. |
ChildPaymentMicros |
Number
|
The portion of the total earnings paid to the child publisher
in micro units of the ChildPaymentCurrencyCode
|
DeductionsCurrencyCode |
Text
|
The deductions currency code as defined by ISO 4217. Null for earnings prior to August 2020. |
DeductionsMicros |
Number
|
The deductions for the month due to spam in micro units of the
DeductionsCurrencyCode . Null for
earnings prior to August 2020. |
DelegationType |
Text
|
The current type of MCM delegation between the parent and child publisher. |
Month |
Date
|
The year and month that the MCM earnings data applies to. The date will be specified as the first of the month. |
ParentName |
Text
|
The name of the parent publisher. |
ParentNetworkCode |
Text
|
The network code of the parent publisher. |
ParentPaymentCurrencyCode |
Text
|
The parent payment currency code as defined by ISO 4217. |
ParentPaymentMicros |
Number
|
The portion of the total earnings paid to the parent publisher
in micro units of the ParentPaymentCurrencyCode . |
TotalEarningsCurrencyCode |
Text
|
The total earnings currency code as defined by ISO 4217. |
TotalEarningsMicros |
Number
|
The total earnings for the month in micro units of the
TotalEarningsCurrencyCode . |
Linked_Device
Column name | Type | Description |
---|---|---|
Id |
Number
|
The ID of the LinkedDevice |
Name |
Text
|
The name of the LinkedDevice |
UserId |
Number
|
The ID of the user that this device belongs to. |
Visibility |
Text
|
The visibility of the LinkedDevice. |
child_publisher
By default, child publishers are ordered by their ID.Column name | Type | Description |
---|---|---|
AccountStatus |
Text
|
The account status of the child publisher's Ad Manager network. Deprecated and replaced by the AccountStatus column. Possible values are {$code INVITED}, {$code DECLINED}, {$code APPROVED}, {$code CLOSED_BY_PUBLISHER}, {$code CLOSED_INVALID_ACTIVITY}, {$code CLOSED_POLICY_VIOLATION}, {$code DEACTIVATED_BY_AD_MANAGER}, {$code DISAPPROVED_DUPLICATE_ACCOUNT}, {$code DISAPPROVED_INELIGIBLE}, {$code PENDING_GOOGLE_APPROVAL}, {$code EXPIRED}, and {$code INACTIVE}. |
AddressVerificationExpirationTime |
Datetime
|
Date when the child publisher's address verification (mail PIN) will expire. |
AddressVerificationLastModifiedTime |
Datetime
|
The time of the last change in the child publisher's address verification (mail PIN) process. |
AddressVerificationStatus |
Text
|
The address verification (mail PIN) status of the child publisher's Ad Manager network. Possible values are {$code EXEMPT}, {$code EXPIRED}, {$code FAILED}, {$code PENDING}, {$code NOT_ELIGIBLE}, and {$code VERIFIED}. |
AgreementStatus |
Text
|
Status of the delegation relationship between parent and child. Deprecated and replaced by the InvitationStatus column. Possible values are {$code APPROVED}, {$code PENDING}, {$code REJECTED}, {$code WITHDRAWN}. |
ApprovalStatus |
Text
|
The approval status of the child publisher's Ad Manager network. Possible values are {$code APPROVED}, {$code CLOSED_BY_PUBLISHER}, {$code CLOSED_INVALID_ACTIVITY}, {$code CLOSED_POLICY_VIOLATION}, {$code DEACTIVATED_BY_AD_MANAGER}, {$code DISAPPROVED_DUPLICATE_ACCOUNT}, {$code DISAPPROVED_INELIGIBLE}, and {$code PENDING_GOOGLE_APPROVAL}. |
ApprovedManageAccountRevshareMillipercent |
Number
|
The approved revshare with the MCM child publisher |
ChildNetworkAdExchangeEnabled |
Boolean
|
Whether the child publisher's Ad Manager network has Ad Exchange enabled |
ChildNetworkCode |
Text
|
The network code of the MCM child publisher |
DelegationType |
Text
|
The delegation type of the MCM child publisher. This will be the approved type if the child has accepted the relationship, and the proposed type otherwise. |
Text
|
The email of the MCM child publisher | |
Id |
Number
|
The ID of the MCM child publisher. |
IdentityVerificationLastModifiedTime |
Datetime
|
The time of the last change in the child publisher's identity verification process. |
IdentityVerificationStatus |
Text
|
Status of the child publisher's identity verification process. Possible values are {$code EXEMPT}, {$code EXPIRED}, {$code FAILED}, {$code PENDING}, {$code NOT_ELIGIBLE}, and {$code VERIFIED}. |
InvitationStatus |
Text
|
Status of the parent's invitation request to a child publisher. Possible values are {$code ACCEPTED}, {$code EXPIRED}, {$code PENDING}, {$code REJECTED}, and {$code WITHDRAWN}. |
Name |
Text
|
The name of the MCM child publisher |
OnboardingTasks |
Set of text
|
The child publisher's pending onboarding tasks. This will only
be populated if the child publisher's AccountStatus is PENDING_GOOGLE_APPROVAL . |
ReadinessStatus |
Text
|
Overall onboarding readiness of the child publisher. Correlates with serving behavior, but does not include site-level approval information. Possible values are {$code READY}, {$code NOT_READY}, and {$code INACTIVE}. |
SellerId |
Text
|
The child publisher's seller ID, as specified in the parent publisher's sellers.json file. This field is only relevant for Manage Inventory child publishers. |
- Production WSDL
-
https://ads.google.com/apis/ads/publisher/v202402/PublisherQueryLanguageService?wsdl
- Namespace
-
https://www.google.com/apis/ads/publisher/v202402
- Operations
- Errors
-
- AdUnitCodeError
- AdUnitHierarchyError
- ApiVersionError
- AudienceSegmentError
- AuthenticationError
- CollectionSizeError
- CommonError
- CreativeError
- DealError
- ExchangeRateError
- FeatureError
- FileError
- InternalApiError
- InvalidEmailError
- InvalidUrlError
- InventoryTargetingError
- InventoryUnitError
- LineItemFlightDateError
- LineItemOperationError
- NotNullError
- NullError
- OrderActionError
- OrderError
- ParseError
- PermissionError
- PublisherQueryLanguageContextError
- PublisherQueryLanguageSyntaxError
- QuotaError
- RangeError
- RegExError
- RequiredCollectionError
- RequiredError
- RequiredNumberError
- RequiredSizeError
- ReservationDetailsError
- ServerError
- StatementError
- StringFormatError
- StringLengthError
- TypeError
- UniqueError
select
Retrieves rows of data that satisfy the given Statement.query from the system.
Parameters
Field | Type | Description |
---|---|---|
selectStatement
|
|
Response
Field | Type | Description |
---|---|---|
rval
|
|
Errors
Error | Reasons |
---|---|
AdUnitCodeError
|
Lists the generic errors associated with AdUnit.adUnitCode.
Enumerations
|
AdUnitHierarchyError
|
Caused by creating an AdUnit object with an invalid hierarchy.
Enumerations
|
ApiVersionError
|
Errors related to the usage of API versions.
Enumerations
|
AudienceSegmentError
|
Errors that could occur on audience segment related requests.
Enumerations
|
AuthenticationError
|
An error for an exception that occurred when authenticating.
Enumerations
|
CollectionSizeError
|
Error for the size of the collection being too large
Enumerations
|
CommonError
|
A place for common errors that can be used across services.
Enumerations
|
CreativeError
|
Lists all errors associated with creatives.
Enumerations
|
DealError
|
Errors associated with creating or updating programmatic proposals.
Enumerations
|
ExchangeRateError
|
Lists all errors associated with ExchangeRate objects.
Enumerations
|
FeatureError
|
Errors related to feature management. If you attempt using a feature that is not available to
the current network you'll receive a FeatureError with the missing feature as the trigger.
Enumerations
|
FileError
|
A list of all errors to be used for problems related to files.
Enumerations
|
InternalApiError
|
Indicates that a server-side error has occured. InternalApiError s
are generally not the result of an invalid request or message sent by the
client.
Enumerations
|
InvalidEmailError
|
Caused by supplying a value for an email attribute that is not a valid
email address.
Enumerations
|
InvalidUrlError
|
Lists all errors associated with URLs.
Enumerations
|
InventoryTargetingError
|
Lists all inventory errors caused by associating a line item with a targeting
expression.
Enumerations
|
InventoryUnitError
|
Lists the generic errors associated with AdUnit objects.
Enumerations
|
LineItemFlightDateError
|
Lists all errors associated with LineItem start and end dates.
Enumerations
|
LineItemOperationError
|
Lists all errors for executing operations on line items
Enumerations
|
NotNullError
|
Caused by supplying a null value for an attribute that cannot be null.
Enumerations
|
NullError
|
Caused by supplying a non-null value for an attribute that should be null.
Enumerations
|
OrderActionError
|
Lists all errors associated with performing actions on Order objects.
Enumerations
|
OrderError
|
Lists all errors associated with orders.
Enumerations
|
ParseError
|
Lists errors related to parsing.
Enumerations
|
PermissionError
|
Errors related to incorrect permission.
Enumerations
|
PublisherQueryLanguageContextError
|
An error that occurs while executing a PQL query contained in
a Statement object.
Enumerations
|
PublisherQueryLanguageSyntaxError
|
An error that occurs while parsing a PQL query contained in a
Statement object.
Enumerations
|
QuotaError
|
Describes a client-side error on which a user is attempting
to perform an action to which they have no quota remaining.
Enumerations
|
RangeError
|
A list of all errors associated with the Range constraint.
Enumerations
|
RegExError
|
Caused by supplying a value for an object attribute that does not conform
to a documented valid regular expression.
Enumerations
|
RequiredCollectionError
|
A list of all errors to be used for validating sizes of collections.
Enumerations
|
RequiredError
|
Errors due to missing required field.
Enumerations
|
RequiredNumberError
|
A list of all errors to be used in conjunction with required number
validators.
Enumerations
|
RequiredSizeError
|
A list of all errors to be used for validating Size.
Enumerations
|
ReservationDetailsError
|
Lists all errors associated with LineItem's reservation details.
Enumerations
|
ServerError
|
Errors related to the server.
Enumerations
|
StatementError
|
An error that occurs while parsing Statement objects.
Enumerations
|
StringFormatError
|
A list of error code for reporting invalid content of input strings.
Enumerations
|
StringLengthError
|
Errors for Strings which do not meet given length constraints.
Enumerations
|
TypeError
|
An error for a field which is an invalid type. |
UniqueError
|
An error for a field which must satisfy a uniqueness constraint |