GetAuctionInsightData Service Operation - Ad Insight
Gets auction insight data for an account, campaigns, ad groups, or keywords.
By showing you where you are succeeding and where you might be missing opportunities for improved performance, the auction insight data can help you make strategic optimization decisions.
If this is a new campaign or if you have too few impressions, the auction insight data will not be generated.
The data retention period is 180 days.
Request Elements
The GetAuctionInsightDataRequest object defines the body and header elements of the service operation request. The elements must be in the same order as shown in the Request SOAP.
Note
Unless otherwise noted below, all request elements are required.
Request Body Elements
Element | Description | Data Type |
---|---|---|
EntityIds | The Microsoft Advertising identifiers for up to 200 campaigns, ad groups, or keywords. This element is required for the campaign, ad group, and keyword entity types. If the EntityType is Account, this element is optional and will override the value set in the CustomerAccountId header. Regardless of the entity type, you must set the CustomerId and CustomerAccountId header elements. |
long array |
EntityType | The entity level that you want to request auction insight data. The supported values are Account, Campaign, AdGroup, and Keyword. This element is required. |
EntityType |
ReturnAdditionalFields | The list of additional properties that you want included within each returned auction insight KPI. The additional field values enable you to get the latest features using the current version of the Ad Insight API, and in the next version the corresponding elements will be included by default. This request element is optional. |
AuctionInsightKpiAdditionalField |
SearchParameters | The search parameters define your criteria and filters for the auction insight data. You must include exactly one DateRangeSearchParameter. In addition you can optionally include up to three different AuctionSegmentSearchParameter objects e.g., for Day, DayOfWeek, and Device. Other objects that derive from SearchParameter are not valid for this operation. |
SearchParameter array |
Request Header Elements
Element | Description | Data Type |
---|---|---|
AuthenticationToken | The OAuth access token that represents the credentials of a user who has permissions to Microsoft Advertising accounts. For more information see Authentication with OAuth. |
string |
CustomerAccountId | The identifier of the ad account that owns or is associated with the entities in the request. This header element must have the same value as the AccountId body element when both are required. This element is required for most service operations, and as a best practice you should always set it. For more information see Get Your Account and Customer IDs. |
string |
CustomerId | The identifier of the manager account (customer) the user is accessing or operating from. A user can have access to multiple manager accounts. This element is required for most service operations, and as a best practice you should always set it. For more information see Get Your Account and Customer IDs. |
string |
DeveloperToken | The developer token used to access the Bing Ads API. For more information see Get a Developer Token. |
string |
Password | This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. | string |
UserName | This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. | string |
Response Elements
The GetAuctionInsightDataResponse object defines the body and header elements of the service operation response. The elements are returned in the same order as shown in the Response SOAP.
Response Body Elements
Element | Description | Data Type |
---|---|---|
Result | Includes the auction insight entries for the requested entity, date range, and segment search parameters. | AuctionInsightResult |
Response Header Elements
Element | Description | Data Type |
---|---|---|
TrackingId | The identifier of the log entry that contains the details of the API call. | string |
Request SOAP
This template was generated by a tool to show the order of the body and header elements for the SOAP request. For supported types that you can use with this service operation, see the Request Body Elements reference above.
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/AdInsight/v13">
<Action mustUnderstand="1">GetAuctionInsightData</Action>
<AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
<CustomerAccountId i:nil="false">ValueHere</CustomerAccountId>
<CustomerId i:nil="false">ValueHere</CustomerId>
<DeveloperToken i:nil="false">ValueHere</DeveloperToken>
</s:Header>
<s:Body>
<GetAuctionInsightDataRequest xmlns="https://bingads.microsoft.com/AdInsight/v13">
<EntityType>ValueHere</EntityType>
<EntityIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>ValueHere</a1:long>
</EntityIds>
<SearchParameters i:nil="false">
<SearchParameter i:type="-- derived type specified here with the appropriate prefix --">
<!--These fields are applicable if the derived type attribute is set to DateRangeSearchParameter-->
<EndDate i:nil="false">
<Day>ValueHere</Day>
<Month>ValueHere</Month>
<Year>ValueHere</Year>
</EndDate>
<StartDate i:nil="false">
<Day>ValueHere</Day>
<Month>ValueHere</Month>
<Year>ValueHere</Year>
</StartDate>
<!--This field is applicable if the derived type attribute is set to AuctionSegmentSearchParameter-->
<Segment>ValueHere</Segment>
</SearchParameter>
</SearchParameters>
<ReturnAdditionalFields i:nil="false">ValueHere</ReturnAdditionalFields>
</GetAuctionInsightDataRequest>
</s:Body>
</s:Envelope>
Response SOAP
This template was generated by a tool to show the order of the body and header elements for the SOAP response.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/AdInsight/v13">
<TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
</s:Header>
<s:Body>
<GetAuctionInsightDataResponse xmlns="https://bingads.microsoft.com/AdInsight/v13">
<Result d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<Segments d4p1:nil="false">
<AuctionSegment>ValueHere</AuctionSegment>
</Segments>
<Entries d4p1:nil="false">
<AuctionInsightEntry>
<DisplayDomain d4p1:nil="false">ValueHere</DisplayDomain>
<AggregatedKpi d4p1:nil="false">
<Segments d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:string>ValueHere</a1:string>
</Segments>
<ImpressionShare>ValueHere</ImpressionShare>
<OverlapRate>ValueHere</OverlapRate>
<AveragePosition>ValueHere</AveragePosition>
<AboveRate>ValueHere</AboveRate>
<TopOfPageRate>ValueHere</TopOfPageRate>
<OutrankingShare>ValueHere</OutrankingShare>
<AbsoluteTopOfPageRate>ValueHere</AbsoluteTopOfPageRate>
</AggregatedKpi>
<SegmentedKpis d4p1:nil="false">
<AuctionInsightKpi>
<Segments d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:string>ValueHere</a1:string>
</Segments>
<ImpressionShare>ValueHere</ImpressionShare>
<OverlapRate>ValueHere</OverlapRate>
<AveragePosition>ValueHere</AveragePosition>
<AboveRate>ValueHere</AboveRate>
<TopOfPageRate>ValueHere</TopOfPageRate>
<OutrankingShare>ValueHere</OutrankingShare>
<AbsoluteTopOfPageRate>ValueHere</AbsoluteTopOfPageRate>
</AuctionInsightKpi>
</SegmentedKpis>
</AuctionInsightEntry>
</Entries>
<UsedImpressions>ValueHere</UsedImpressions>
<UsedKeywords>ValueHere</UsedKeywords>
</Result>
</GetAuctionInsightDataResponse>
</s:Body>
</s:Envelope>
Code Syntax
The example syntax can be used with Bing Ads SDKs. See Bing Ads API Code Examples for more examples.
public async Task<GetAuctionInsightDataResponse> GetAuctionInsightDataAsync(
EntityType entityType,
IList<long> entityIds,
IList<SearchParameter> searchParameters,
AuctionInsightKpiAdditionalField? returnAdditionalFields)
{
var request = new GetAuctionInsightDataRequest
{
EntityType = entityType,
EntityIds = entityIds,
SearchParameters = searchParameters,
ReturnAdditionalFields = returnAdditionalFields
};
return (await AdInsightService.CallAsync((s, r) => s.GetAuctionInsightDataAsync(r), request));
}
static GetAuctionInsightDataResponse getAuctionInsightData(
EntityType entityType,
ArrayOflong entityIds,
ArrayOfSearchParameter searchParameters,
ArrayList<AuctionInsightKpiAdditionalField> returnAdditionalFields) throws RemoteException, Exception
{
GetAuctionInsightDataRequest request = new GetAuctionInsightDataRequest();
request.setEntityType(entityType);
request.setEntityIds(entityIds);
request.setSearchParameters(searchParameters);
request.setReturnAdditionalFields(returnAdditionalFields);
return AdInsightService.getService().getAuctionInsightData(request);
}
static function GetAuctionInsightData(
$entityType,
$entityIds,
$searchParameters,
$returnAdditionalFields)
{
$GLOBALS['Proxy'] = $GLOBALS['AdInsightProxy'];
$request = new GetAuctionInsightDataRequest();
$request->EntityType = $entityType;
$request->EntityIds = $entityIds;
$request->SearchParameters = $searchParameters;
$request->ReturnAdditionalFields = $returnAdditionalFields;
return $GLOBALS['AdInsightProxy']->GetService()->GetAuctionInsightData($request);
}
response=adinsight_service.GetAuctionInsightData(
EntityType=EntityType,
EntityIds=EntityIds,
SearchParameters=SearchParameters,
ReturnAdditionalFields=ReturnAdditionalFields)
Requirements
Service: AdInsightService.svc v13
Namespace: https://bingads.microsoft.com/AdInsight/v13
Request Url
https://adinsight.api.bingads.microsoft.com/AdInsight/v13/AuctionInsightData/Query
Request Elements
The GetAuctionInsightDataRequest object defines the body and header elements of the service operation request.
Note
Unless otherwise noted below, all request elements are required.
Request Body Elements
Element | Description | Data Type |
---|---|---|
EntityIds | The Microsoft Advertising identifiers for up to 200 campaigns, ad groups, or keywords. This element is required for the campaign, ad group, and keyword entity types. If the EntityType is Account, this element is optional and will override the value set in the CustomerAccountId header. Regardless of the entity type, you must set the CustomerId and CustomerAccountId header elements. |
long array |
EntityType | The entity level that you want to request auction insight data. The supported values are Account, Campaign, AdGroup, and Keyword. This element is required. |
EntityType |
ReturnAdditionalFields | The list of additional properties that you want included within each returned auction insight KPI. The additional field values enable you to get the latest features using the current version of the Ad Insight API, and in the next version the corresponding elements will be included by default. This request element is optional. |
AuctionInsightKpiAdditionalField |
SearchParameters | The search parameters define your criteria and filters for the auction insight data. You must include exactly one DateRangeSearchParameter. In addition you can optionally include up to three different AuctionSegmentSearchParameter objects e.g., for Day, DayOfWeek, and Device. Other objects that derive from SearchParameter are not valid for this operation. |
SearchParameter array |
Request Header Elements
Element | Description | Data Type |
---|---|---|
Authorization | The OAuth access token that represents the credentials of a user who has permissions to Microsoft Advertising accounts. Please ensure that the token is prefixed with "Bearer ", this is necessary for proper authentication. For more information see Authentication with OAuth. |
string |
CustomerAccountId | The identifier of the ad account that owns or is associated with the entities in the request. This header element must have the same value as the AccountId body element when both are required. This element is required for most service operations, and as a best practice you should always set it. For more information see Get Your Account and Customer IDs. |
string |
CustomerId | The identifier of the manager account (customer) the user is accessing or operating from. A user can have access to multiple manager accounts. This element is required for most service operations, and as a best practice you should always set it. For more information see Get Your Account and Customer IDs. |
string |
DeveloperToken | The developer token used to access the Bing Ads API. For more information see Get a Developer Token. |
string |
Password | This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. | string |
UserName | This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. | string |
Response Elements
The GetAuctionInsightDataResponse object defines the body and header elements of the service operation response. The elements are returned in the same order as shown in the Response JSON.
Response Body Elements
Element | Description | Data Type |
---|---|---|
Result | Includes the auction insight entries for the requested entity, date range, and segment search parameters. | AuctionInsightResult |
Response Header Elements
Element | Description | Data Type |
---|---|---|
TrackingId | The identifier of the log entry that contains the details of the API call. | string |
Request JSON
This template was generated by a tool to show the body and header elements for the JSON request. For supported types that you can use with this service operation, see the Request Body Elements reference above.
{
"EntityType": "ValueHere",
"EntityIds": [
"LongValueHere"
],
"SearchParameters": [
{
"EndDate": {
"Day": "ValueHere",
"Month": "ValueHere",
"Year": "ValueHere"
},
"StartDate": {
"Day": "ValueHere",
"Month": "ValueHere",
"Year": "ValueHere"
},
"Segment": "ValueHere"
}
],
"ReturnAdditionalFields": "ValueHere"
}
Response JSON
This template was generated by a tool to show the body and header elements for the JSON response.
{
"Result": {
"Entries": [
{
"AggregatedKpi": {
"AboveRate": DoubleValueHere,
"AbsoluteTopOfPageRate": DoubleValueHere,
"AveragePosition": DoubleValueHere,
"ImpressionShare": DoubleValueHere,
"OutrankingShare": DoubleValueHere,
"OverlapRate": DoubleValueHere,
"Segments": [
"ValueHere"
],
"TopOfPageRate": DoubleValueHere
},
"DisplayDomain": "ValueHere",
"SegmentedKpis": [
{
"AboveRate": DoubleValueHere,
"AbsoluteTopOfPageRate": DoubleValueHere,
"AveragePosition": DoubleValueHere,
"ImpressionShare": DoubleValueHere,
"OutrankingShare": DoubleValueHere,
"OverlapRate": DoubleValueHere,
"Segments": [
"ValueHere"
],
"TopOfPageRate": DoubleValueHere
}
]
}
],
"Segments": [
"ValueHere"
],
"UsedImpressions": DoubleValueHere,
"UsedKeywords": DoubleValueHere
}
}
Code Syntax
To call REST API through SDKs, you need to upgrade SDK to a certain version and configure the system parameters.The example syntax can be used with Bing Ads SDKs. See Bing Ads API Code Examples for more examples.
public async Task<GetAuctionInsightDataResponse> GetAuctionInsightDataAsync(
EntityType entityType,
IList<long> entityIds,
IList<SearchParameter> searchParameters,
AuctionInsightKpiAdditionalField? returnAdditionalFields)
{
var request = new GetAuctionInsightDataRequest
{
EntityType = entityType,
EntityIds = entityIds,
SearchParameters = searchParameters,
ReturnAdditionalFields = returnAdditionalFields
};
return (await AdInsightService.CallAsync((s, r) => s.GetAuctionInsightDataAsync(r), request));
}
static GetAuctionInsightDataResponse getAuctionInsightData(
EntityType entityType,
ArrayOflong entityIds,
ArrayOfSearchParameter searchParameters,
ArrayList<AuctionInsightKpiAdditionalField> returnAdditionalFields) throws RemoteException, Exception
{
GetAuctionInsightDataRequest request = new GetAuctionInsightDataRequest();
request.setEntityType(entityType);
request.setEntityIds(entityIds);
request.setSearchParameters(searchParameters);
request.setReturnAdditionalFields(returnAdditionalFields);
return AdInsightService.getService().getAuctionInsightData(request);
}
static function GetAuctionInsightData(
$entityType,
$entityIds,
$searchParameters,
$returnAdditionalFields)
{
$GLOBALS['Proxy'] = $GLOBALS['AdInsightProxy'];
$request = new GetAuctionInsightDataRequest();
$request->EntityType = $entityType;
$request->EntityIds = $entityIds;
$request->SearchParameters = $searchParameters;
$request->ReturnAdditionalFields = $returnAdditionalFields;
return $GLOBALS['AdInsightProxy']->GetService()->GetAuctionInsightData($request);
}
response=adinsight_service.GetAuctionInsightData(
EntityType=EntityType,
EntityIds=EntityIds,
SearchParameters=SearchParameters,
ReturnAdditionalFields=ReturnAdditionalFields)