GetEstimatedBidByKeywordIds Service Operation - Ad Insight

Gets the estimated bid value of one or more keywords - specified by keyword identifier - that could have resulted in an ad appearing in the targeted position in the search results in the last 7 days. In addition, the operation provides estimates of clicks, average cost per click (CPC), and impressions that the keywords could have generated with the estimated bid.


The estimates are based on the last 7 days of performance data, and not a prediction or guarantee of future performance.

Request Elements

The GetEstimatedBidByKeywordIdsRequest 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.

Request Body Elements

Element Description Data Type
KeywordIds An array of identifiers of the keywords for which you want to get the suggested bid values that could have resulted in your ad appearing in the targeted position in the search results. You may specify a maximum of 1,000 keywords. long array
TargetPositionForAds The position in which you want your ads to appear in the search results.

The default value is MainLine1.

Request Header Elements

Element Description Data Type
AuthenticationToken The OAuth access token that represents a Microsoft Account user who has permissions to Bing Ads accounts. string
CustomerAccountId The identifier of the account that owns the entities in the request. This header element must have the same value as the AccountId body element when both are required. string
CustomerId The identifier of the customer that contains and owns the account. If you manage an account of another customer, you should use that customer ID instead of your own customer ID. string
DeveloperToken The developer token used to access the Bing Ads API. string
Password The Bing Ads managed user's sign-in password. string
UserName The Bing Ads managed user's sign-in name. You must not set this element to a Microsoft account or email address. string


The UserName and Password header elements are deprecated. In future versions of the API, Bing Ads will transition exclusively to Microsoft Account (email address) authentication. For more information, see Authentication with OAuth. UserName and Password are still required for Bing Ads managed credentials, but they are not applicable for Microsoft account authentication. To authenticate a Microsoft account, use the AuthenticationToken] header instead of UserName and Password.


The CustomerAccountId and CustomerId are required for most service operations, and as a best practice you should always specify them in the request.

Response Elements

The GetEstimatedBidByKeywordIdsResponse 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
KeywordEstimatedBids An array of KeywordIdEstimatedBid data objects. The array contains a corresponding item for each keyword specified in the request. If the keyword ID is not valid, the corresponding item in the array will be null.

Each KeywordIdEstimatedBid contains a keyword identifier and a KeywordEstimatedBid. If there is data available for the keyword, the KeywordEstimatedBid will provide a suggested bid value that could have resulted in an ad appearing in the targeted position of the search results. Otherwise, the KeywordEstimatedBid element will be set to null.
KeywordIdEstimatedBid array

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

The following template shows the order of the body and header elements for the SOAP request.

<s:Envelope xmlns:i="" xmlns:s="">
  <s:Header xmlns="Microsoft.Advertiser.AdInsight.Api.Service.V11">
    <Action mustUnderstand="1">GetEstimatedBidByKeywordIds</Action>
    <ApplicationToken i:nil="false">ValueHere</ApplicationToken>
    <AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
    <CustomerAccountId i:nil="false">ValueHere</CustomerAccountId>
    <CustomerId i:nil="false">ValueHere</CustomerId>
    <DeveloperToken i:nil="false">ValueHere</DeveloperToken>
    <Password i:nil="false">ValueHere</Password>
    <UserName i:nil="false">ValueHere</UserName>
    <GetEstimatedBidByKeywordIdsRequest xmlns="Microsoft.Advertiser.AdInsight.Api.Service.V11">
      <KeywordIds i:nil="false" xmlns:a1="">

Response SOAP

The following template shows the order of the body and header elements for the SOAP response.

<s:Envelope xmlns:s="">
  <s:Header xmlns="Microsoft.Advertiser.AdInsight.Api.Service.V11">
    <TrackingId d3p1:nil="false" xmlns:d3p1="">ValueHere</TrackingId>
    <GetEstimatedBidByKeywordIdsResponse xmlns="Microsoft.Advertiser.AdInsight.Api.Service.V11">
      <KeywordEstimatedBids xmlns:e372="" d4p1:nil="false" xmlns:d4p1="">
          <e372:KeywordEstimatedBid d4p1:nil="false">
            <e372:Keyword d4p1:nil="false">ValueHere</e372:Keyword>
            <e372:EstimatedBids d4p1:nil="false">
                <e372:MinClicksPerWeek d4p1:nil="false">ValueHere</e372:MinClicksPerWeek>
                <e372:MaxClicksPerWeek d4p1:nil="false">ValueHere</e372:MaxClicksPerWeek>
                <e372:AverageCPC d4p1:nil="false">ValueHere</e372:AverageCPC>
                <e372:MinImpressionsPerWeek d4p1:nil="false">ValueHere</e372:MinImpressionsPerWeek>
                <e372:MaxImpressionsPerWeek d4p1:nil="false">ValueHere</e372:MaxImpressionsPerWeek>
                <e372:CTR d4p1:nil="false">ValueHere</e372:CTR>
                <e372:MinTotalCostPerWeek d4p1:nil="false">ValueHere</e372:MinTotalCostPerWeek>
                <e372:MaxTotalCostPerWeek d4p1:nil="false">ValueHere</e372:MaxTotalCostPerWeek>

Code Syntax

The example syntax can be used with Bing Ads SDKs. See Bing Ads Code Examples for more examples.

public async Task<GetEstimatedBidByKeywordIdsResponse> GetEstimatedBidByKeywordIdsAsync(
    IList<long> keywordIds,
    TargetAdPosition targetPositionForAds)
    var request = new GetEstimatedBidByKeywordIdsRequest
        KeywordIds = keywordIds,
        TargetPositionForAds = targetPositionForAds

    return (await AdInsightService.CallAsync((s, r) => s.GetEstimatedBidByKeywordIdsAsync(r), request));
static GetEstimatedBidByKeywordIdsResponse getEstimatedBidByKeywordIds(
    ArrayOflong keywordIds,
    TargetAdPosition targetPositionForAds) throws RemoteException, Exception
    GetEstimatedBidByKeywordIdsRequest request = new GetEstimatedBidByKeywordIdsRequest();


    return AdInsightService.getService().getEstimatedBidByKeywordIds(request);
static function GetEstimatedBidByKeywordIds(

    $GLOBALS['Proxy'] = $GLOBALS['AdInsightProxy'];

    $request = new GetEstimatedBidByKeywordIdsRequest();

    $request->KeywordIds = $keywordIds;
    $request->TargetPositionForAds = $targetPositionForAds;

    return $GLOBALS['AdInsightProxy']->GetService()->GetEstimatedBidByKeywordIds($request);


Service: AdInsightService.svc v11
Namespace: Microsoft.Advertiser.AdInsight.Api.Service.V11