Edit

Bagikan melalui


GetEstimatedBidByKeywords Service Operation - Ad Insight

Gets the estimated bid value of one or more keywords that could result in an ad appearing in the targeted position in the search results.

The estimates are not a prediction or guarantee of future performance.

Note

This operation is for search campaigns using the enhanced CPC bid strategy.

Request Elements

The GetEstimatedBidByKeywordsRequest 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
AdGroupId The identifier of the ad group whose performance data is used to help determine how well the keyword might perform in the context of the ad group. Specifying an ad group helps improve the accuracy of the suggested bid.

If you specify an ad group, you must specify the campaign that it belongs to.
long
CampaignId The identifier of the campaign that owns the ad group specified in AdGroupId. If you do not specify an ad group, the campaign's performance data is used to help determine how well the keyword might perform in the context of the campaign.

Specifying a campaign and ad group helps improve the accuracy of the suggested bid. If neither AdGroupId or CampaignId are specified, the operation uses the specified CustomerAccountId header element to help determine how well the keyword might perform in the context of the account.
long
CurrencyCode The ISO code for the monetary unit to use to calculate the cost estimates and suggested bid value.

If not set, the service determines the currency from the account specified in the CustomerAccountId header element. If neither Currency or CustomerAccountId is set, the service uses USD.
CurrencyCode
EntityLevelBid Determines whether to return estimates for keyword level bids, ad group level bids, or both.

- Set EntityLevelBid to Keyword to get an array of KeywordEstimatedBid corresponding to the specified keywords.

- Set EntityLevelBid to AdGroup to get one EstimatedBidAndTraffic for the specified ad group.

- Set EntityLevelBid to AllEntities to get an array of KeywordEstimatedBid for keywords and one EstimatedBidAndTraffic for an ad group.

If you do not set EntityLevelBid, the default is to return only an array of KeywordEstimatedBid, or the equivalent of setting EntityLevelBid to Keyword.

If you set EntityLevelBid to any value other thanKeyword, AdGroup, or AllEntities, the service will return Code 3501 with ErrorCode CampaignServiceBidLevelInvalid.
string
Keywords A list of KeywordAndMatchType data objects for which you want to get suggested bid values. You may specify a maximum of 1,000 keywords, and each keyword can contain a maximum of 100 characters. KeywordAndMatchType array
Language The language used in parallel with location identifiers for estimating the bids.

The language must be supported in each of the locations that you specify in LocationIds.

For possible language values, see Ad Languages.

If you do not specify the language, the service operation uses the language of the specified AdGroupId or CampaignId. If none of these properties are set, then EN (English) is used by default.
string
LocationIds The identifier or identifiers of the geographical locations to use for estimating the bids.

All of the locations must support the language specified in the Language element. Although you can specify multiple location identifiers, as a best practice for the most accurate bid estimates per location, you should specify only one location per service call.

For possible location identifiers, see Geographical Location Codes.

If you do not specify any locations, the service operation uses the location criterions of the specified AdGroupId or CampaignId. If none of these properties are set, then 190 (United States) is used by default.
long array
TargetPositionForAds The position where you want your ads to appear in the search results.

The default value is MainLine1.
TargetAdPosition

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 GetEstimatedBidByKeywordsResponse 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
AdGroupEstimatedBid Contains estimates of clicks, average cost per click (CPC), impressions, click-through rate (CTR), and total cost for the specified ad group if you would use the suggested bid.

The MatchType value within the EstimatedBidAndTraffic will always be Aggregate. In this context, it represents the default search bid for an ad group.
EstimatedBidAndTraffic
KeywordEstimatedBids An array of KeywordEstimatedBid data objects. The array contains an item for each keyword specified in the request. If the keyword is not valid, the corresponding item in the array will be null.

Each KeywordEstimatedBid contains a keyword and EstimatedPositions element. If data is available for the keyword, the EstimatedPositionAndTraffic will provide the suggested bid value that could have resulted in an ad appearing in the targeted position of the search results. Otherwise, the EstimatedPositions element will be set to null.
KeywordEstimatedBid 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

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">GetEstimatedBidByKeywords</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>
    <GetEstimatedBidByKeywordsRequest xmlns="https://bingads.microsoft.com/AdInsight/v13">
      <Keywords i:nil="false">
        <KeywordAndMatchType>
          <KeywordText i:nil="false">ValueHere</KeywordText>
          <MatchTypes i:nil="false">
            <MatchType>ValueHere</MatchType>
          </MatchTypes>
        </KeywordAndMatchType>
      </Keywords>
      <TargetPositionForAds>ValueHere</TargetPositionForAds>
      <Language i:nil="false">ValueHere</Language>
      <LocationIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <a1:long>ValueHere</a1:long>
      </LocationIds>
      <CurrencyCode i:nil="false">ValueHere</CurrencyCode>
      <CampaignId i:nil="false">ValueHere</CampaignId>
      <AdGroupId i:nil="false">ValueHere</AdGroupId>
      <EntityLevelBid i:nil="false">ValueHere</EntityLevelBid>
    </GetEstimatedBidByKeywordsRequest>
  </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>
    <GetEstimatedBidByKeywordsResponse xmlns="https://bingads.microsoft.com/AdInsight/v13">
      <KeywordEstimatedBids d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <KeywordEstimatedBid>
          <Keyword d4p1:nil="false">ValueHere</Keyword>
          <EstimatedBids d4p1:nil="false">
            <EstimatedBidAndTraffic>
              <MinClicksPerWeek d4p1:nil="false">ValueHere</MinClicksPerWeek>
              <MaxClicksPerWeek d4p1:nil="false">ValueHere</MaxClicksPerWeek>
              <AverageCPC d4p1:nil="false">ValueHere</AverageCPC>
              <MinImpressionsPerWeek d4p1:nil="false">ValueHere</MinImpressionsPerWeek>
              <MaxImpressionsPerWeek d4p1:nil="false">ValueHere</MaxImpressionsPerWeek>
              <CTR d4p1:nil="false">ValueHere</CTR>
              <MinTotalCostPerWeek d4p1:nil="false">ValueHere</MinTotalCostPerWeek>
              <MaxTotalCostPerWeek d4p1:nil="false">ValueHere</MaxTotalCostPerWeek>
              <CurrencyCode>ValueHere</CurrencyCode>
              <MatchType>ValueHere</MatchType>
              <EstimatedMinBid>ValueHere</EstimatedMinBid>
            </EstimatedBidAndTraffic>
          </EstimatedBids>
        </KeywordEstimatedBid>
      </KeywordEstimatedBids>
      <AdGroupEstimatedBid d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <MinClicksPerWeek d4p1:nil="false">ValueHere</MinClicksPerWeek>
        <MaxClicksPerWeek d4p1:nil="false">ValueHere</MaxClicksPerWeek>
        <AverageCPC d4p1:nil="false">ValueHere</AverageCPC>
        <MinImpressionsPerWeek d4p1:nil="false">ValueHere</MinImpressionsPerWeek>
        <MaxImpressionsPerWeek d4p1:nil="false">ValueHere</MaxImpressionsPerWeek>
        <CTR d4p1:nil="false">ValueHere</CTR>
        <MinTotalCostPerWeek d4p1:nil="false">ValueHere</MinTotalCostPerWeek>
        <MaxTotalCostPerWeek d4p1:nil="false">ValueHere</MaxTotalCostPerWeek>
        <CurrencyCode>ValueHere</CurrencyCode>
        <MatchType>ValueHere</MatchType>
        <EstimatedMinBid>ValueHere</EstimatedMinBid>
      </AdGroupEstimatedBid>
    </GetEstimatedBidByKeywordsResponse>
  </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<GetEstimatedBidByKeywordsResponse> GetEstimatedBidByKeywordsAsync(
	IList<KeywordAndMatchType> keywords,
	TargetAdPosition targetPositionForAds,
	string language,
	IList<long> locationIds,
	CurrencyCode? currencyCode,
	long? campaignId,
	long? adGroupId,
	string entityLevelBid)
{
	var request = new GetEstimatedBidByKeywordsRequest
	{
		Keywords = keywords,
		TargetPositionForAds = targetPositionForAds,
		Language = language,
		LocationIds = locationIds,
		CurrencyCode = currencyCode,
		CampaignId = campaignId,
		AdGroupId = adGroupId,
		EntityLevelBid = entityLevelBid
	};

	return (await AdInsightService.CallAsync((s, r) => s.GetEstimatedBidByKeywordsAsync(r), request));
}
static GetEstimatedBidByKeywordsResponse getEstimatedBidByKeywords(
	ArrayOfKeywordAndMatchType keywords,
	TargetAdPosition targetPositionForAds,
	java.lang.String language,
	ArrayOflong locationIds,
	CurrencyCode currencyCode,
	java.lang.Long campaignId,
	java.lang.Long adGroupId,
	java.lang.String entityLevelBid) throws RemoteException, Exception
{
	GetEstimatedBidByKeywordsRequest request = new GetEstimatedBidByKeywordsRequest();

	request.setKeywords(keywords);
	request.setTargetPositionForAds(targetPositionForAds);
	request.setLanguage(language);
	request.setLocationIds(locationIds);
	request.setCurrencyCode(currencyCode);
	request.setCampaignId(campaignId);
	request.setAdGroupId(adGroupId);
	request.setEntityLevelBid(entityLevelBid);

	return AdInsightService.getService().getEstimatedBidByKeywords(request);
}
static function GetEstimatedBidByKeywords(
	$keywords,
	$targetPositionForAds,
	$language,
	$locationIds,
	$currencyCode,
	$campaignId,
	$adGroupId,
	$entityLevelBid)
{

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

	$request = new GetEstimatedBidByKeywordsRequest();

	$request->Keywords = $keywords;
	$request->TargetPositionForAds = $targetPositionForAds;
	$request->Language = $language;
	$request->LocationIds = $locationIds;
	$request->CurrencyCode = $currencyCode;
	$request->CampaignId = $campaignId;
	$request->AdGroupId = $adGroupId;
	$request->EntityLevelBid = $entityLevelBid;

	return $GLOBALS['AdInsightProxy']->GetService()->GetEstimatedBidByKeywords($request);
}
response=adinsight_service.GetEstimatedBidByKeywords(
	Keywords=Keywords,
	TargetPositionForAds=TargetPositionForAds,
	Language=Language,
	LocationIds=LocationIds,
	CurrencyCode=CurrencyCode,
	CampaignId=CampaignId,
	AdGroupId=AdGroupId,
	EntityLevelBid=EntityLevelBid)

Requirements

Service: AdInsightService.svc v13
Namespace: https://bingads.microsoft.com/AdInsight/v13