Public Apple Search Ads API Reference
The public API procedures may call the internal procedures which should not be used directly as they can be changed without any explicit notification in the newer versions of the connector. Internal procedures can be recognized by the prefix internal_
in their names. Public API procedures do not have such prefix in their names.
ACLs
User Access Control List (ACL)
Parameter
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
orgId | long | The authorization organization. API calls are used to manage campaigns and create reports within the context of an org. An orgId is set according to context when a campaign is created. In all API calls, the orgId must be included in the header.You can obtain your orgId via your account details through the Search Ads UI or by calling Get User ACL which returns roles and orgs that the API certificate has access to |
currency | string | The org currency set up in the Search Ads UI. Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
orgName | string | The name of your organization |
parentOrgId | long | The account parent organization identifier |
paymentModel | string | The payment model set up through the Search Ads UI. Possible values: PAYG, LOC |
roleNames | string | The roles and orgs that the API certificate has access to |
timeZone | string | The time zone that was set during account creation through the Search Ads UI. ORTZ (Org time zone) is the default timezone |
Example
CREATE VIEW apple_search_ads_examples.example_ACLs AS
SELECT *
FROM (
CALL apple_search_ads.ACLs ()
) AS x
AdGroups
Ad groups by using a campaign identifier
Parameter
<campaignId> (optional): The identifier for the campaign. When you create a campaign, the system sets the Id
<adgroupId> (optional): The identifier for the ad group. When you create an ad group, the system sets the Id based on the campaignId in the URI
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<orgId> (optional): Organization ID
<campaign_table> (optional): Table with campaign info. Campign id must be named as id
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
id | long | The unique identifier which can be used in endpoint resources such as adGroupid |
name | string | The name of the ad group |
orgId | long | The identifier of the organization that owns the campaign |
startTime | timestamp | The date and time the ad group is scheduled to start |
endTime | timestamp | The date and time the ad group is scheduled to end |
automatedKeywordsOptIn | boolean | The parameter to enable or disable Search Match |
campaignId | long | The unique identifier for the campaign |
cpaGoal_amount | bigdecimal | The monetary value in the specified currency |
cpaGoal_currency | string | The currency must match what is set as the default currency of the org |
defaultCpcBid_amount | bigdecimal | The monetary value in the specified currency |
defaultCpcBid_currency | string | The currency must match what is set as the default currency of the org |
deleted | boolean | The indication whether the ad group has been soft-deleted or not |
displayStatus | string | The status of the ad group |
pricingModel | string | CPC - the average cost for each ad tap/impression in a campaign, CPM - the cost per 1000 impressions in a campaign |
servingStateReasons | string | A list of reasons displayed if an ad group is not running |
servingStatus | string | The status of the ad group |
status | string | The user-controlled status to enable or pause the ad group |
targetingDimensions_adminArea_included | string | The parameter used to include targeted users by admin area |
targetingDimensions_age_included | string | |
targetingDimensions_appDownloaders_excluded | string | The excluded list |
targetingDimensions_appDownloaders_included | string | The included list |
targetingDimensions_country_included | string | The parameter used to include targeted users by country |
targetingDimensions_daypart_userTime_included | string | The parameter used to include targeting criteria for a specific time of day |
targetingDimensions_deviceClass_included | string | The parameter used to include the targeting criteria values for device class targeting |
targetingDimensions_gender_included | string | The parameter used to include targeting criteria values for gender |
targetingDimensions_locality_included | string | The parameter used to include targeted users by locality |
modificationTime | timestamp | The date and time of the last modification of the object |
Example
CREATE VIEW apple_search_ads_examples.example_AdGroups AS
SELECT *
FROM (
CALL apple_search_ads.AdGroups (
campaignId => 489025549
)
) AS x
AdGroupsCreativeSets
Creative Sets assigned to ad groups
Parameter
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<campaignId> (optional): The unique identifier for the campaign. When you create a campaign, the system sets the Id
<orgId> (optional): Organization ID
<campaign_table> (optional): Table with campaign info. Campign id must be named as id
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
id | long | A unique identifier for the adgroupcreativeset |
orgId | long | The identifier of the organization that owns a campaign |
adGroupId | long | The unique identifier for the ad group |
campaignId | long | The unique identifier for the campaign |
creativeSetId | long | The unique identifier for the Creative Set |
deleted | boolean | An indicator of whether the adgroupcreativeset assignment has been soft deleted or not |
servingStatus | string | The indicator of the status of an adgroupcreativeset assignment with an ad group |
servingStatusReasons | string | A list of reasons displayed when an adgroupcreativeset is not running |
status | string | The user-controlled status to enable or pause the adgroupcreativeset |
modificationTime | timestamp | The date and time of the last modification of the object |
Example
CREATE VIEW apple_search_ads_examples.example_AdGroupsCreativeSets AS
SELECT *
FROM (
CALL apple_search_ads.AdGroupsCreativeSets (
campaignId => 474938929,
conditions => NULL
)
) AS x
AdGroupsNegativeKeywords
Negative keywords used in a campaign
Parameter
<campaignId> (optional): The unique identifier for the campaign. When you create a campaign, the system sets the Id
<adgroupId> (optional): The unique identifier for the ad group. When you create an ad group, the system sets the Id based on the campaignId in the URI
<keywordId> (optional): The unique identifier for the keyword. When you create campaign negative keywords, the system sets the Id based on the campaignId in the URI
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<orgId> (optional): Organization ID
<campaign_adgroup_table> (optional): Table with campaigns and adgroups info. Campaign id must be named as campaignId and adgroup id must be named as adgroupId
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
id | long | A unique identifier for the negative keyword |
orgId | long | The identifier of the organization that owns a campaign |
campaignId | long | The unique identifier of the campaign to which the negative keywords belong |
adGroupId | long | The unique identifier of the ad group to which the negative keywords belong |
deleted | boolean | An indicator of whether the negative keywords belonging to a campaign or ad group have been soft deleted or not |
matchType | string | An automated keyword and bidding strategy |
status | string | The user-controlled status to enable or pause the campaign |
text | string | The word or phrase to block in user searches from showing your ad |
modificationTime | timestamp | The date and time of the last modification of the object |
Example
CREATE VIEW apple_search_ads_examples.example_AdGroupsNegativeKeywords AS
SELECT *
FROM (
CALL apple_search_ads.AdGroupsNegativeKeywords (
adgroupId => 474985334,
campaignId => 474938929
)
) AS x
AdGroupsTargetingKeywords
Targeting keywords used in ad groups
Parameter
<campaignId> (optional): The unique identifier for the campaign. When you create a campaign, the system sets the Id
<adgroupId> (optional): The unique identifier for the ad group. When you create an ad group, the system sets the Id based on the campaignId in the URI
<keywordId> (optional): The unique identifier for the keyword. When you create ad group targeting keywords, the system sets the Id based on the campaignId and adgroupId in the URI
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<orgId> (optional): Organization ID
<campaign_adgroup_table> (optional): Table with campaigns and adgroups info. Campaign id must be named as campaignId and adgroup id must be named as adgroupId
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
id | long | A unique identifier for the targeting keyword |
orgId | long | The identifier of the organization that owns a campaign |
campaignId | long | The unique identifier for the campaign. When you create a campaign, the system sets the Id |
adGroupId | long | The unique identifier of the ad group to which the negative keywords belong |
bidAmount_amount | bigdecimal | The monetary value in the specified currency |
bidAmount_currency | string | The currency must match what is set as the default currency of the org |
deleted | boolean | An indicator of whether the keyword has been soft deleted or not |
matchType | string | An automated keyword and bidding strategy |
status | string | The user-controlled status to enable or pause the keyword |
text | string | The word or phrase to match in user searches to show your ad |
modificationTime | timestamp | The date and time of the last modification of the object |
Example
CREATE VIEW apple_search_ads_examples.example_AdGroupsTargetingKeywords AS
SELECT *
FROM (
CALL apple_search_ads.AdGroupsTargetingKeywords (
campaignId => 193716434,
adgroupId => 193778218
)
) AS x
BudgetOrders
Budget orders assigned to an org
Parameter
<orgId> (optional): Organization ID
<boId> (optional): The unique identifier for the budget order. When creating a budget order through the Apple Search Ads UI, a budget order Id (boId) is set
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
id | long | A unique identifier for the budget order |
orgId | long | The identifier of the organization that owns a campaign |
name | string | The name of the budget order, unique within an org |
billingEmail | string | The billing email |
budget_amount | bigdecimal | The monetary value in the specified currency |
budget_currency | string | The currency must match what is set as the default currency of the org |
clientName | string | The advertiser or product |
endDate | timestamp | The date and time the budget order is scheduled to end in format yyyy-MM-dd'T'HH:mm:ss |
orderNumber | string | A purchase order number |
parentOrgId | long | The identifier of the org that owns the budget order |
primaryBuyerEmail | string | The primary buyer's email address |
primaryBuyerName | string | The primary buyer's name |
startDate | timestamp | The date and time the budget order is scheduled to start in format yyyy-MM-dd'T'HH:mm:ss |
status | string | The status indicator for the budget order |
Example
CREATE VIEW apple_search_ads_examples.example_BudgetOrders AS
SELECT *
FROM (
CALL apple_search_ads.BudgetOrders ()
) AS x
Campaigns
Campaigns assigned to an org
Parameter
<campaignId> (optional): The unique identifier for the campaign. When you create a campaign, the system sets the Id
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<orgId> (optional): Organization ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
id | long | A unique identifier for the campaign which can be used as a campaignid in endpoint resources |
orgId | long | The identifier of the organization that owns a campaign |
adamId | long | Your unique App Store application identifier |
startTime | timestamp | The date and time the campaign is scheduled to start |
endTime | timestamp | The date and time the campaign is scheduled to end |
adChannelType | string | The channel type of ads used in a campaign |
billingEvent | string | The type of billing event for a campaign |
budgetAmount_amount | bigdecimal | The monetary value in the specified currency |
budgetAmount_currency | string | The currency must match what is set as the default currency of the org |
countriesOrRegions | string | The App Store territories in which you are promoting your app |
countryOrRegionServingStateReasons | string | A map of reasons returned when a campaign cannot run on a given country or region |
dailyBudgetAmount_amount | bigdecimal | The monetary value in the specified currency |
dailyBudgetAmount_currency | string | The currency must match what is set as the default currency of the org |
deleted | boolean | The indicator of whether the campaign has been soft deleted or not |
displayStatus | string | The status of the campaign |
locInvoiceDetails_billingContactEmail | string | A valid email address for the LOC billing contact |
locInvoiceDetails_buyerEmail | string | A valid email address for the LOC buyer |
locInvoiceDetails_buyerName | string | A valid LOC buyer name |
locInvoiceDetails_clientName | string | An advertiser or product |
locInvoiceDetails_orderNumber | string | A purchase order number |
name | string | The name of the campaign, unique within an org |
paymentModel | string | The payment model set up for your org |
sapinLawResponse | string | |
servingStateReasons | string | A list of reasons displayed when a campaign cannot run |
servingStatus | string | The status of the campaign |
status | string | The user-controlled status to enable or pause the campaign |
supplySources | string | The supply source of ads used in a campaign |
modificationTime | timestamp | The date and time of the last modification of the object |
Example
CREATE VIEW apple_search_ads_examples.example_Campaigns AS
SELECT *
FROM (
CALL apple_search_ads.Campaigns ()
) AS x
CampaignsNegativeKeywords
Negative keywords used in a campaign
Parameter
<campaignId> (optional): The unique identifier for the campaign. When you create a campaign, the system sets the Id
<keywordId> (optional): The unique identifier for the keyword. When you create campaign negative keywords, the system sets the Id based on the campaignId in the URI
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<orgId> (optional): Organization ID
<campaign_table> (optional): Table with campaign info. Campign id must be named as id
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
id | long | A unique identifier for the negative keyword |
orgId | long | The identifier of the organization that owns a campaign |
campaignId | long | The unique identifier of the campaign to which the negative keywords belong |
deleted | boolean | An indicator of whether the negative keywords belonging to a campaign or ad group have been soft deleted or not |
matchType | string | An automated keyword and bidding strategy |
status | string | The user-controlled status to enable or pause the campaign |
text | string | The word or phrase to block in user searches from showing your ad |
modificationTime | timestamp | The date and time of the last modification of the object |
Example
CREATE VIEW apple_search_ads_examples.example_CampaignsNegativeKeywords AS
SELECT *
FROM (
CALL apple_search_ads.CampaignsNegativeKeywords (
campaignId => 491869233
)
) AS x
CreativeAppAssets
Assets used with Creative Sets
Parameter
<adamId> (optional): Use your adamId in the URI.Your unique iTunes application identifier. Each time you use an adamId in the API, it must match the adamId used in your campaign
<assetsGenIds> (optional): The relationship between a Creative Set and an asset
<countryOrRegions> (required): The App Store territory you are promoting your app. The default is US
<adamId_table> (optional): Table with campaign info. Adam id must be named as adamId
<orgId> (optional): Organization ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
orgId | long | The identifier of the organization that owns a campaign |
adamId | long | Use your adamId in the URI.Your unique iTunes application identifier. Each time you use an adamId in the API, it must match the adamId used in your campaign |
languageCode | string | |
languageDisplayName | string | |
appPreviewDeviceWithAssets | string | |
deviceDisplayName | string | The display name of the device previewing the app |
fallBackDevicesDisplayNames | string | Device display name mapping of app preview classes |
type | string | |
assetGenId | string | The identifier for app preview or screenshot |
assetType | string | The type of asset |
assetURL | string | The resolved URL for the screenshot or a screenshot of the video asset |
orientation | string | The orientation of the asset uploaded to |
sortPosition | long | The position of the asset |
sourceHeight | integer | The height of the asset |
sourceWidth | integer | The width of the asset |
Example
CREATE VIEW apple_search_ads_examples.example_CreativeAppAssets AS
SELECT *
FROM (
CALL apple_search_ads.CreativeAppAssets (
adamId => 602283488,
countryOrRegions => 'US,DE',
assetsGenIds => NULL
)
) AS x
CreativeSets
Creative Sets assigned to an organization
Parameter
<creativeSetId> (optional): The unique identifier for the Creative Set. When you create a Creative Set, the system sets the Id
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<orgId> (optional): Organization ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
id | long | A unique identifier for the Creative Set |
orgId | long | The authorization organization |
adamId | long | Your App Store Connect application identifier |
languageCode | string | The language code that comes from the media response; for example, en-US |
name | string | The name of the Creative Set |
status | string | The user-controlled status to enable or pause the Creative Set |
statusReasons | string | The reason for the Creative Set status |
creativeSetAssets_id | integer | A unique identifier for a Creative Set asset assigned to an ad group |
creativeSetAssets_asset_assetGenId | string | The identifier for app preview or screenshot |
creativeSetAssets_asset_type | string | The type of asset |
creativeSetAssets_asset_appPreviewDevice | string | The device for which the asset is available, corresponding to the display size |
creativeSetAssets_asset_orientation | string | The orientation of the asset uploaded to |
creativeSetAssets_asset_deleted | boolean | The deleted assets of the Creative Set from iTunes |
Devices
Supported app preview device size mappings
Parameter
<orgId> (optional): Organization ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
orgId | long | The identifier of the organization that owns a campaign |
key | string | Key defined by iTunes that correspond to a device size |
value | string | Value defined by iTunes that correspond to a device size |
Example
CREATE VIEW apple_search_ads_examples.example_Devices AS
SELECT *
FROM (
CALL apple_search_ads.Devices ()
) AS x
GeoLocations
Geo locations used for audience refinement
Parameter
<countrycode> (optional): The country in which to serve ads. Note, geo targeting is not supported for campaigns served to multiple countries or regions. The query uses a countrycode value in ISO-ALPHA2-COUNTRYCODE format. Use Search for iOS Apps to retrieve countryOrRegionCodes
<entity> (optional): The country, adminArea, or Locality locations available for targeting. A countrycode is a mandatory parameter. AdminArea is the state or the equivalent according to its associated Country. Locality is the city or the equivalent according to its associated AdminArea
<query> (optional): The query search pattern uses a prefix-matching algorithm. Spaces are allowed in search patterns. Prefixes require a minimum of three characters
<orgId> (optional): Organization ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description | ||
---|---|---|---|---|
id | string | The parameter used to specify the geographic location formatted as CountryCode | AdminArea | Locality |
orgId | long | The identifier of the organization that owns a campaign | ||
displayName | string | The parameter used to specify the geographic targeting location | ||
entity | string | The parameter used to define the type of geography of targeting locations |
Example
CREATE VIEW apple_search_ads_examples.example_GeoLocations AS
SELECT *
FROM (
CALL apple_search_ads.GeoLocations (
countrycode => 'DE',
entity => NULL,
query => NULL
)
) AS x
IOSApps
Searches for iOS apps to promote in a campaign
Parameter
<query> (required): The query for a list of iOS apps using a matching prefix.The query search pattern uses a prefix-matching algorithm
<orgId> (optional): Organization ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
orgId | long | The identifier of the organization that owns a campaign |
adamId | long | Your unique App Store Connect application identifier |
appName | string | The name of the app |
countryOrRegionCodes | string | A list of ISO-ALPHA2-COUNTRYCODE strings |
developerName | string | The developer name for the app |
Example
CREATE VIEW apple_search_ads_examples.example_IOSApps AS
SELECT *
FROM (
CALL apple_search_ads.IOSApps (
query => 'Run K'
)
) AS x
ReportsAdGroups
Reports on ad groups within a campaign
Parameter
<startTime> (required): The date the report coverage starts
<endTime> (optional): The date the report coverage ends
<granularity> (required): The report data organized by hour, day, week, and month. Possible values: MONTHLY, WEEKLY, DAILY, HOURLY
<campaignId> (optional): The identifier for the campaign. The Id is set when a campaign is created
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<returnRecordsWithNoMetrics> (optional): The parameter used to specify whether records with no stats should also be returned. The default is false
<timeZone> (optional): The default timeZone is set during account creation through the Search Ads UI. ORTZ (Org time zone) is the default timezone. Possible values: UTC, ORTZ
<orgId> (optional): Organization ID
<campaign_table> (optional): Table with campaign info. Campign id must be named as id
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
date | timestamp | The date range of the report |
adGroupDisplayStatus | string | The state of the operation., Possible values: RUNNING, CAMPAIGN_ON_HOLD, ON_HOLD, PAUSED, DELETED |
adGroupId | long | The identifier for the ad group.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Ad Group Level Reports |
adGroupName | string | The name of the ad group. This is unique within the campaign.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Ad Group Level Reports |
adGroupServingStateReasons | string | The list of reasons returned when an ad group is not running., Possible values: AD_GROUP_PAUSED_BY_USER, DELETED_BY_USER, ADGROUP_END_DATE_REACHED, AUDIENCE_BELOW_THRESHOLD, CAMPAIGN_NOT_RUNNING, START_DATE_IN_THE_FUTURE, APP_NOT_SUPPORT, PENDING_AUDIENCE_VERIFICATION |
adGroupServingStatus | string | The status whether the ad group is serving or not., Possible values: RUNNING, NOT_RUNNING |
adGroupStatus | string | The status of the ad group.The EQUALS selector Condition operator can be used with Get Ad Group Level Reports., Possible values: ENABLED, PAUSED |
automatedKeywordsOptIn | boolean | The parameter used to enable or disable Search Match. If set to true, the system will automatically add optimized keywords, in addition to those explicitly added to the ad group.The EQUALS selector Condition operator can be used with Get Ad Group Level Reports |
campaignId | long | The identifier for the campaign.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Ad Group Level Reports |
cpaGoal_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
cpaGoal_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
defaultCpcBid_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
defaultCpcBid_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
deleted | boolean | An indicator of whether the ad group has been soft deleted or not.The EQUALS, IN selector Condition operators can be used with the Get Ad Group Level Reports |
startTime | timestamp | The date and time the campaign is scheduled to start |
endTime | timestamp | The date and time the campaign is scheduled to end |
orgId | long | The Id associated with an account in the Search Ads UI. |
other | boolean | The parameter used if impressions returned are less than 100 and less than 10 for search terms reports. If other is set to true, the corresponding dimensions are null |
avgCPA_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPA_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
avgCPT_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPT_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
conversionRate | bigdecimal | The total number of conversions received within a period divided by total number of taps within the same period |
impressions | long | The number of times your ad appeared in App Store search results within the reporting time period |
installs | long | The total number of newDownloads or redownloads resulting from an ad within the reporting period. Search Ads installs are attributed within a 30-day tap-through window. In API 1.0, this field was named conversions |
latOffInstalls | long | The installs from users who have not enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field name was conversionsLATOff |
latOnInstalls | long | The installs from users who have enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field was named conversionsLATOn |
localSpend_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
localSpend_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
newDownloads | long | The enumerated app downloads from new users who have never before installed your app. In API 1.0, this field name was conversionsNewDownloads |
redownloads | long | The enumerated re-installs from users who have previously installed your app. In API 1.0, this field name was conversionsRedownloads |
taps | long | The number of times your ad was tapped by users within the reporting time period |
ttr | bigdecimal | The tap-through rate (TTR) is the number of times your ad was tapped by customers divided by the total impressions your ad received |
modificationTime | timestamp | The date and time when the object was last modified |
Example
CREATE VIEW apple_search_ads_examples.example_ReportsAdGroups AS
SELECT *
FROM (
CALL apple_search_ads.ReportsAdGroups (
campaignId => 220668802,
startTime => TIMESTAMPADD (SQL_TSI_DAY, -30, CURDATE ()),
endTime => CURDATE (),
timeZone => 'ORTZ',
granularity => 'DAILY',
returnRecordsWithNoMetrics => NULL,
conditions => NULL
)
) AS x
ReportsCampaigns
Reports on campaigns
Parameter
<startTime> (required): The date the report coverage starts
<endTime> (optional): The date the report coverage ends
<granularity> (required): The report data organized by hour, day, week, and month. Possible values: MONTHLY, WEEKLY, DAILY, HOURLY
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<returnRecordsWithNoMetrics> (optional): The parameter used to specify whether records with no stats should also be returned. The default is false
<timeZone> (optional): The default timeZone is set during account creation through the Search Ads UI. ORTZ (Org time zone) is the default timezone. Possible values: UTC, ORTZ
<orgId> (optional): Organization ID
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
date | timestamp | The date range of the report |
app | string | The name of the app and adamId |
adamId | long | The adamId of the app |
campaignId | long | The identifier for the campaign.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Campaign Level Reports |
campaignName | string | The unique name of the campaign.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Campaign Level Reports |
campaignStatus | string | The status of the campaign.The EQUALS selector Condition operator can be used with Get Campaign Level Reports., Possible values: ENABLED, PAUSED |
countriesOrRegions | string | The App Store territory in which you want to promote your app and have impressions served. The default is US. The EQUALS, CONTAINS_ANY selector Condition operators can be used with Get Campaign Level Reports |
countryOrRegionServingStateReasons | string | The map of reasons returned when a campaign is not running |
dailyBudget_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
dailyBudget_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
deleted | boolean | An indicator of whether the campaign has been soft deleted or not.The EQUALS, IN selector Condition operators can be used with Get Campaign Level Reports |
displayStatus | string | The status of the campaign. This status is resolved based on servingStatus and additional criteria., Possible values: RUNNING, ON_HOLD, PAUSED, DELETED |
orgId | long | The Id associated with your account in the Search Ads UI |
servingStateReasons | string | A map of reasons returned when a campaign cannot run., Possible values: NO_PAYMENT_METHOD_ON_FILE, MISSING_BO_OR_INVOICING_FIELDS, PAUSED_BY_USER, DELETED_BY_USER, CAMPAIGN_END_DATE_REACHED, CAMPAIGN_START_DATE_IN_FUTURE, DAILY_CAP_EXHAUSTED, TOTAL_BUDGET_EXHAUSTED, CREDIT_CARD_DECLINED, APP_NOT_ELIGIBLE, APP_NOT_ELIGIBLE_SEARCHADS, APP_NOT_PUBLISHED_YET, BO_START_DATE_IN_FUTURE, BO_END_DATE_REACHED, BO_EXHAUSTED, ORG_PAYMENT_TYPE_CHANGED, ORG_SUSPENDED_POLICY_VIOLATION, ORG_SUSPENDED_FRAUD, ORG_CHARGE_BACK_DISPUTED, PAUSED_BY_SYSTEM, LOC_EXHAUSTED, TAX_VERIFICATION_PENDING, SAPIN_LAW_AGENT_UNKNOWN, SAPIN_LAW_FRENCH_BIZ_UNKNOWN, SAPIN_LAW_FRENCH_BIZ, NO_ELIGIBLE_COUNTRIES, AD_GROUP_MISSING |
servingStatus | string | The status of the campaign.The EQUALS selector Condition operator can be used with Get Campaign Level Reports., Possible values: RUNNING, NOT_RUNNING |
totalBudget_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
totalBudget_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
other | boolean | The parameter used if impressions returned are less than 100 and less than 10 for search terms reports. If other is set to true, the corresponding dimensions are null |
avgCPA_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPA_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
avgCPT_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPT_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
conversionRate | bigdecimal | The total number of conversions received within a period divided by total number of taps within the same period |
impressions | long | The number of times your ad appeared in App Store search results within the reporting time period |
installs | long | The total number of newDownloads or redownloads resulting from an ad within the reporting period. Search Ads installs are attributed within a 30-day tap-through window. In API 1.0, this field was named conversions |
latOffInstalls | long | The installs from users who have not enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field name was conversionsLATOff |
latOnInstalls | long | The installs from users who have enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field was named conversionsLATOn |
localSpend_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
localSpend_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
newDownloads | long | The enumerated app downloads from new users who have never before installed your app. In API 1.0, this field name was conversionsNewDownloads |
redownloads | long | The enumerated re-installs from users who have previously installed your app. In API 1.0, this field name was conversionsRedownloads |
taps | long | The number of times your ad was tapped by users within the reporting time period |
ttr | bigdecimal | The tap-through rate (TTR) is the number of times your ad was tapped by customers divided by the total impressions your ad received |
modificationTime | timestamp | The date and time the object was last modified |
Example
CREATE VIEW apple_search_ads_examples.example_ReportsCampaigns AS
SELECT *
FROM (
CALL apple_search_ads.ReportsCampaigns (
startTime => TIMESTAMPADD (SQL_TSI_DAY, -30, CURDATE ()),
endTime => CURDATE (),
timeZone => 'ORTZ',
granularity => 'DAILY',
returnRecordsWithNoMetrics => NULL,
conditions => NULL
)
) AS x
ReportsCreativeSets
Reports on Creative Sets used within a campaign
Parameter
<startTime> (required): The date the report coverage starts
<endTime> (optional): The date the report coverage ends
<granularity> (required): The report data organized by hour, day, week, and month. Possible values: MONTHLY, WEEKLY, DAILY
<campaignId> (optional): The identifier for the campaign. The Id is set when a campaign is created
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<returnRecordsWithNoMetrics> (optional): The parameter used to specify whether records with no stats should also be returned. The default is false
<timeZone> (optional): The default timeZone is set during account creation through the Search Ads UI. ORTZ (Org time zone) is the default timezone. Possible values: UTC, ORTZ
<orgId> (optional): Organization ID
<campaign_table> (optional): Table with campaign info. Campign id must be named as id
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
date | timestamp | The date range of the report |
adGroupCreativeSetId | long | The identifier for the ad group creative set |
adGroupId | long | The identifier for the ad group.The EQUALS, IN selector Condition operators can be used with Get Creative Set Level Reports and Find AdGroupCreativeSets |
campaignId | long | The identifier for the campaign |
creationTime | timestamp | The date and time the creative set was created |
creativeSetId | long | The identifier for the creative set that is assigned to an ad group.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Creative Set Level Reports |
creativeSetLanguage | string | The language of the creative set |
creativeSetLanguageDisplayName | string | The language displayed for the creative set |
creativeSetName | string | The name of the creative set.The EQUALS, IN, STARTSWITH, CONTAINS, ENDSWITH selector Condition operators can be used with Get Creative Set Level Reports |
deleted | boolean | An indicator of whether the creative set has been soft deleted or not.The EQUALS, IN selector Condition operators can be used with Get Creative Set Level Reports |
displayStatus | string | An indicator of the status of the campaign. The status is resolved based on servingStatus and additional criteria.This field has been deprecated.The EQUALS, IN selector Condition operators can be used with Get Creative Set Level Reports., Possible values: ELIGIBLE, INVALID, PAUSED, DELETED |
orgId | long | The Id associated with your account in the Search Ads UI |
status | string | The state of the operation., Possible values: VALID, INVALID |
other | boolean | The parameter used if impressions returned are less than 100 and less than 10 for search terms reports. If other is set to true, the corresponding dimensions are null |
avgCPA_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPA_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
avgCPT_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPT_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
conversionRate | bigdecimal | The total number of conversions received within a period divided by total number of taps within the same period |
impressions | long | The number of times your ad appeared in App Store search results within the reporting time period |
installs | long | The total number of newDownloads or redownloads resulting from an ad within the reporting period. Search Ads installs are attributed within a 30-day tap-through window. In API 1.0, this field was named conversions |
latOffInstalls | long | The installs from users who have not enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field name was conversionsLATOff |
latOnInstalls | long | The installs from users who have enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field was named conversionsLATOn |
localSpend_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
localSpend_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
newDownloads | long | The enumerated app downloads from new users who have never before installed your app. In API 1.0, this field name was conversionsNewDownloads |
redownloads | long | The enumerated re-installs from users who have previously installed your app. In API 1.0, this field name was conversionsRedownloads |
taps | long | The number of times your ad was tapped by users within the reporting time period |
ttr | bigdecimal | The tap-through rate (TTR) is the number of times your ad was tapped by customers divided by the total impressions your ad received |
modificationTime | timestamp | The date and time the object was last modified |
Example
CREATE VIEW apple_search_ads_examples.example_ReportsCreativeSets AS
SELECT *
FROM (
CALL apple_search_ads.ReportsCreativeSets (
campaignId => 491869233,
startTime => TIMESTAMPADD (SQL_TSI_DAY, -30, CURDATE ()),
endTime => CURDATE (),
timeZone => 'ORTZ',
granularity => 'DAILY',
returnRecordsWithNoMetrics => NULL,
conditions => NULL
)
) AS x
ReportsKeywords
Reports on targeting keywords within a campaign
Parameter
<startTime> (required): The date the report coverage starts
<endTime> (optional): The date the report coverage ends
<granularity> (required): The report data organized by hour, day, week, and month. Possible values: MONTHLY, WEEKLY, DAILY, HOURLY
<campaignId> (optional): The identifier for the campaign. The Id is set when a campaign is created
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<returnRecordsWithNoMetrics> (optional): The parameter used to specify whether records with no stats should also be returned. The default is false
<timeZone> (optional): The default timeZone is set during account creation through the Search Ads UI. ORTZ (Org time zone) is the default timezone. Possible values: UTC, ORTZ
<orgId> (optional): Organization ID
<campaign_table> (optional): Table with campaign info. Campign id must be named as id
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
date | timestamp | The date range of the report |
orgId | long | The identifier of the organization that owns a campaign |
campaignId | long | The unique identifier for the campaign |
adGroupDeleted | boolean | An indicator of whether the ad group has been soft deleted or not.The EQUALS, IN selector Condition operators can be used with Get Keyword Level Reports |
adGroupId | long | The identifier for the ad group.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Keyword Level Reports |
adGroupName | string | The name of the ad group. This is unique within the campaign |
bidAmount_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
bidAmount_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
deleted | boolean | An indicator of whether the keyword has been soft deleted or not.The EQUALS, IN selector Condition operators can be used with Get Keyword Level Reports |
keyword | string | The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Keyword Level Reports |
keywordDisplayStatus | string | The state of the keyword display operation.The EQUALS, IN selector Condition operators can be used with Get Keyword Level Reports., Possible values: RUNNING, CAMPAIGN_ON_HOLD, AD_GROUP_ON_HOLD, PAUSED, DELETED |
keywordId | long | The identifier for a keyword belonging to an ad group. When creating a keyword, the Id is set based on the campaignId and adgroupId in the URI |
keywordStatus | string | The status of the keyword., Possible values: ACTIVE, PAUSED |
matchType | string | The parameter used to set an automated keyword and bidding strategy. See Ad Groups Management for Search Match use cases.The EQUALS selector Condition operator can be used with Get Keyword Level Reports., Possible values: AUTO, EXACT, BROAD |
other | boolean | The parameter used if impressions returned are less than 100 and less than 10 for search terms reports. If other is set to true, the corresponding dimensions are null |
avgCPA_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPA_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
avgCPT_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPT_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
conversionRate | bigdecimal | The total number of conversions received within a period divided by total number of taps within the same period |
impressions | long | The number of times your ad appeared in App Store search results within the reporting time period |
installs | long | The total number of newDownloads or redownloads resulting from an ad within the reporting period. Search Ads installs are attributed within a 30-day tap-through window. In API 1.0, this field was named conversions |
latOffInstalls | long | The installs from users who have not enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field name was conversionsLATOff |
latOnInstalls | long | The installs from users who have enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field was named conversionsLATOn |
localSpend_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
localSpend_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
newDownloads | long | The enumerated app downloads from new users who have never before installed your app. In API 1.0, this field name was conversionsNewDownloads |
redownloads | long | The enumerated re-installs from users who have previously installed your app. In API 1.0, this field name was conversionsRedownloads |
taps | long | The number of times your ad was tapped by users within the reporting time period |
ttr | bigdecimal | The tap-through rate (TTR) is the number of times your ad was tapped by customers divided by the total impressions your ad received |
modificationTime | timestamp | The date and when the object was last modified |
Example
CREATE VIEW apple_search_ads_examples.example_ReportsKeywords AS
SELECT *
FROM (
CALL apple_search_ads.ReportsKeywords (
campaignId => 491869233,
startTime => TIMESTAMPADD (SQL_TSI_DAY, -30, CURDATE ()),
endTime => CURDATE (),
timeZone => 'ORTZ',
granularity => 'DAILY',
returnRecordsWithNoMetrics => NULL,
conditions => NULL
)
) AS x
ReportsSearchTerms
Reports on search terms used in a campaign
Parameter
<startTime> (required): The date the report coverage starts
<endTime> (optional): The date the report coverage ends
<granularity> (required): The report data organized by hour, day, week, and month. Possible values: MONTHLY, WEEKLY, DAILY
<campaignId> (optional): The identifier for the campaign. The Id is set when a campaign is created
<conditions> (optional): A list of condition objects which allows users to filter a list of records
<returnRecordsWithNoMetrics> (optional): The parameter used to specify whether records with no stats should also be returned. The default is false
<timeZone> (optional): The default timeZone is set during account creation through the Search Ads UI. ORTZ (Org time zone) is the default timezone. Possible values: UTC, ORTZ
<orgId> (optional): Organization ID
<campaign_table> (optional): Table with campaign info. Campign id must be named as id
<preview> (optional): Preview only, don't write into table
<target_table> (optional): Table name to save the data to
<label> (optional): Multi-tenancy label
Attribute | Type | Description |
---|---|---|
date | timestamp | The date range of the report |
orgId | long | The identifier of the organization that owns a campaign |
campaignId | long | The unique identifier for the campaign |
adGroupDeleted | boolean | The EQUALS, IN selector Condition operators can be used with Get Search Terms Level Reports |
adGroupId | long | The identifier for the ad group the search term belongs to.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Search Terms Level Reports |
adGroupName | string | The name of the ad group. This is unique within the campaign. Deleted ad groups are not included.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Search Terms Level Reports |
bidAmount_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
bidAmount_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
deleted | boolean | An indicator of whether the search term has been deleted or not.The EQUALS, IN selector Condition operators can be used with Get Search Terms Level Reports |
keyword | string | The targeting or negative keywords.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Search Terms Level Reports |
keywordDisplayStatus | string | The state of the keyword display operation.The EQUALS, IN selector Condition operators can be used with Get Search Terms Level Reports., Possible values: RUNNING, CAMPAIGN_ON_HOLD, AD_GROUP_ON_HOLD, PAUSED, DELETED |
keywordId | long | The identifier for a keyword belonging to an ad group |
keywordStatus | string | The condition of the keyword.The EQUALS selector Condition operator can be used with Get Search Terms Level Reports. Possible values: ACTIVE, PAUSED |
matchType | string | An automated keyword and bidding strategy. See Ad Groups Management for Search Match use cases.The EQUALS selector Condition operator can be used with Get Search Terms Level Reports., Possible values: AUTO, EXACT, BROAD |
searchTermSource | string | The source of the keyword used as search terms.The EQUALS, IN selector Condition operators can be used with Get Search Terms Level Reports., Possible values: AUTO, TARGETED |
searchTermText | string | The search terms that have been used for app searches.The EQUALS, IN, STARTSWITH selector Condition operators can be used with Get Search Terms Level Reports |
other | boolean | The parameter used if impressions returned are less than 100 and less than 10 for search terms reports. If other is set to true, the corresponding dimensions are null |
avgCPA_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPA_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
avgCPT_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
avgCPT_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
conversionRate | bigdecimal | The total number of conversions received within a period divided by total number of taps within the same period |
impressions | long | The number of times your ad appeared in App Store search results within the reporting time period |
installs | long | The total number of newDownloads or redownloads resulting from an ad within the reporting period. Search Ads installs are attributed within a 30-day tap-through window. In API 1.0, this field was named conversions |
latOffInstalls | long | The installs from users who have not enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field name was conversionsLATOff |
latOnInstalls | long | The installs from users who have enabled Limit Ad Tracking (LAT) on their device. In API 1.0, this field was named conversionsLATOn |
localSpend_amount | bigdecimal | The monetary value in the specified currency. Amount is used whenever a currency value is needed. The string can contain up to two decimal digits |
localSpend_currency | string | The currency must match what is set as the default currency of the org., Possible values: AUD, CAD, EUR, GBP, JPY, MXN, NZD, USD |
newDownloads | long | The enumerated app downloads from new users who have never before installed your app. In API 1.0, this field name was conversionsNewDownloads |
redownloads | long | The enumerated re-installs from users who have previously installed your app. In API 1.0, this field name was conversionsRedownloads |
taps | long | The number of times your ad was tapped by users within the reporting time period |
ttr | bigdecimal | The tap-through rate (TTR) is the number of times your ad was tapped by customers divided by the total impressions your ad received |
modificationTime | timestamp | The date and time the object was last modified |
Example
CREATE VIEW apple_search_ads_examples.example_ReportsSearchTerms AS
SELECT *
FROM (
CALL apple_search_ads.ReportsSearchTerms (
campaignId => 491869233,
startTime => TIMESTAMPADD (SQL_TSI_DAY, -30, CURDATE ()),
endTime => CURDATE (),
timeZone => 'ORTZ',
granularity => 'DAILY',
returnRecordsWithNoMetrics => false,
conditions => NULL
)
) AS x