편집

다음을 통해 공유


GetEstimatedPositionByKeywords Service Operation - Ad Insight

Gets the estimated position in the search results if the specified bid value would be used for the specified keywords. In addition, the operation provides estimates of clicks, average cost per click (CPC), and impressions that the keywords could be generated with the estimated bid.

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 GetEstimatedPositionByKeywordsRequest 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 position.

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 position. 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
Keywords An array of keywords for which you want to get the estimated position in the search results, based on the specified bid value. You may specify a maximum of 1,000 keywords and each keyword can contains a maximum of 100 characters. string array
Language The language used in parallel with location identifiers for estimating the position.

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 position.

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 position 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
MatchTypes An array of unique match types for which you want to get estimates.

You may not specify the Content match type.
MatchType array
MaxBid The maximum bid value to use to determine the estimated position in the search results. double

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 GetEstimatedPositionByKeywordsResponse 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
KeywordEstimatedPositions An array of KeywordEstimatedPosition 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.

If data is available for the keyword, the EstimatedPositionAndTraffic will provide the estimated position in the search results where your ads could appear, based on the specified bid value. Otherwise, the EstimatedPositions element will be set to null.
KeywordEstimatedPosition 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">GetEstimatedPositionByKeywords</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>
    <GetEstimatedPositionByKeywordsRequest xmlns="https://bingads.microsoft.com/AdInsight/v13">
      <Keywords i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <a1:string>ValueHere</a1:string>
      </Keywords>
      <MaxBid>ValueHere</MaxBid>
      <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>
      <MatchTypes i:nil="false">
        <MatchType>ValueHere</MatchType>
      </MatchTypes>
      <CampaignId i:nil="false">ValueHere</CampaignId>
      <AdGroupId i:nil="false">ValueHere</AdGroupId>
    </GetEstimatedPositionByKeywordsRequest>
  </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>
    <GetEstimatedPositionByKeywordsResponse xmlns="https://bingads.microsoft.com/AdInsight/v13">
      <KeywordEstimatedPositions d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <KeywordEstimatedPosition>
          <Keyword d4p1:nil="false">ValueHere</Keyword>
          <EstimatedPositions d4p1:nil="false">
            <EstimatedPositionAndTraffic>
              <MatchType>ValueHere</MatchType>
              <MinClicksPerWeek>ValueHere</MinClicksPerWeek>
              <MaxClicksPerWeek>ValueHere</MaxClicksPerWeek>
              <AverageCPC>ValueHere</AverageCPC>
              <MinImpressionsPerWeek>ValueHere</MinImpressionsPerWeek>
              <MaxImpressionsPerWeek>ValueHere</MaxImpressionsPerWeek>
              <CTR>ValueHere</CTR>
              <MinTotalCostPerWeek>ValueHere</MinTotalCostPerWeek>
              <MaxTotalCostPerWeek>ValueHere</MaxTotalCostPerWeek>
              <CurrencyCode>ValueHere</CurrencyCode>
              <EstimatedAdPosition>ValueHere</EstimatedAdPosition>
            </EstimatedPositionAndTraffic>
          </EstimatedPositions>
        </KeywordEstimatedPosition>
      </KeywordEstimatedPositions>
    </GetEstimatedPositionByKeywordsResponse>
  </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<GetEstimatedPositionByKeywordsResponse> GetEstimatedPositionByKeywordsAsync(
	IList<string> keywords,
	double maxBid,
	string language,
	IList<long> locationIds,
	CurrencyCode? currencyCode,
	IList<MatchType> matchTypes,
	long? campaignId,
	long? adGroupId)
{
	var request = new GetEstimatedPositionByKeywordsRequest
	{
		Keywords = keywords,
		MaxBid = maxBid,
		Language = language,
		LocationIds = locationIds,
		CurrencyCode = currencyCode,
		MatchTypes = matchTypes,
		CampaignId = campaignId,
		AdGroupId = adGroupId
	};

	return (await AdInsightService.CallAsync((s, r) => s.GetEstimatedPositionByKeywordsAsync(r), request));
}
static GetEstimatedPositionByKeywordsResponse getEstimatedPositionByKeywords(
	ArrayOfstring keywords,
	double maxBid,
	java.lang.String language,
	ArrayOflong locationIds,
	CurrencyCode currencyCode,
	ArrayOfMatchType matchTypes,
	java.lang.Long campaignId,
	java.lang.Long adGroupId) throws RemoteException, Exception
{
	GetEstimatedPositionByKeywordsRequest request = new GetEstimatedPositionByKeywordsRequest();

	request.setKeywords(keywords);
	request.setMaxBid(maxBid);
	request.setLanguage(language);
	request.setLocationIds(locationIds);
	request.setCurrencyCode(currencyCode);
	request.setMatchTypes(matchTypes);
	request.setCampaignId(campaignId);
	request.setAdGroupId(adGroupId);

	return AdInsightService.getService().getEstimatedPositionByKeywords(request);
}
static function GetEstimatedPositionByKeywords(
	$keywords,
	$maxBid,
	$language,
	$locationIds,
	$currencyCode,
	$matchTypes,
	$campaignId,
	$adGroupId)
{

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

	$request = new GetEstimatedPositionByKeywordsRequest();

	$request->Keywords = $keywords;
	$request->MaxBid = $maxBid;
	$request->Language = $language;
	$request->LocationIds = $locationIds;
	$request->CurrencyCode = $currencyCode;
	$request->MatchTypes = $matchTypes;
	$request->CampaignId = $campaignId;
	$request->AdGroupId = $adGroupId;

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

Requirements

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

Request Url

https://adinsight.api.bingads.microsoft.com/AdInsight/v13/EstimatedPosition/QueryByKeywords

Request Elements

The GetEstimatedPositionByKeywordsRequest 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
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 position.

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 position. 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
Keywords An array of keywords for which you want to get the estimated position in the search results, based on the specified bid value. You may specify a maximum of 1,000 keywords and each keyword can contains a maximum of 100 characters. string array
Language The language used in parallel with location identifiers for estimating the position.

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 position.

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 position 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
MatchTypes An array of unique match types for which you want to get estimates.

You may not specify the Content match type.
MatchType array
MaxBid The maximum bid value to use to determine the estimated position in the search results. double

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 GetEstimatedPositionByKeywordsResponse 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
KeywordEstimatedPositions An array of KeywordEstimatedPosition 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.

If data is available for the keyword, the EstimatedPositionAndTraffic will provide the estimated position in the search results where your ads could appear, based on the specified bid value. Otherwise, the EstimatedPositions element will be set to null.
KeywordEstimatedPosition 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 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.

{
  "Keywords": [
    "ValueHere"
  ],
  "MaxBid": DoubleValueHere,
  "Language": "ValueHere",
  "LocationIds": [
    "LongValueHere"
  ],
  "CurrencyCode": "ValueHere",
  "MatchTypes": [
    "ValueHere"
  ],
  "CampaignId": "LongValueHere",
  "AdGroupId": "LongValueHere"
}

Response JSON

This template was generated by a tool to show the body and header elements for the JSON response.

{
  "KeywordEstimatedPositions": [
    {
      "EstimatedPositions": [
        {
          "AverageCPC": DoubleValueHere,
          "CTR": DoubleValueHere,
          "CurrencyCode": "ValueHere",
          "EstimatedAdPosition": DoubleValueHere,
          "MatchType": "ValueHere",
          "MaxClicksPerWeek": DoubleValueHere,
          "MaxImpressionsPerWeek": "LongValueHere",
          "MaxTotalCostPerWeek": DoubleValueHere,
          "MinClicksPerWeek": DoubleValueHere,
          "MinImpressionsPerWeek": "LongValueHere",
          "MinTotalCostPerWeek": DoubleValueHere
        }
      ],
      "Keyword": "ValueHere"
    }
  ]
}

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<GetEstimatedPositionByKeywordsResponse> GetEstimatedPositionByKeywordsAsync(
	IList<string> keywords,
	double maxBid,
	string language,
	IList<long> locationIds,
	CurrencyCode? currencyCode,
	IList<MatchType> matchTypes,
	long? campaignId,
	long? adGroupId)
{
	var request = new GetEstimatedPositionByKeywordsRequest
	{
		Keywords = keywords,
		MaxBid = maxBid,
		Language = language,
		LocationIds = locationIds,
		CurrencyCode = currencyCode,
		MatchTypes = matchTypes,
		CampaignId = campaignId,
		AdGroupId = adGroupId
	};

	return (await AdInsightService.CallAsync((s, r) => s.GetEstimatedPositionByKeywordsAsync(r), request));
}
static GetEstimatedPositionByKeywordsResponse getEstimatedPositionByKeywords(
	ArrayOfstring keywords,
	double maxBid,
	java.lang.String language,
	ArrayOflong locationIds,
	CurrencyCode currencyCode,
	ArrayOfMatchType matchTypes,
	java.lang.Long campaignId,
	java.lang.Long adGroupId) throws RemoteException, Exception
{
	GetEstimatedPositionByKeywordsRequest request = new GetEstimatedPositionByKeywordsRequest();

	request.setKeywords(keywords);
	request.setMaxBid(maxBid);
	request.setLanguage(language);
	request.setLocationIds(locationIds);
	request.setCurrencyCode(currencyCode);
	request.setMatchTypes(matchTypes);
	request.setCampaignId(campaignId);
	request.setAdGroupId(adGroupId);

	return AdInsightService.getService().getEstimatedPositionByKeywords(request);
}
static function GetEstimatedPositionByKeywords(
	$keywords,
	$maxBid,
	$language,
	$locationIds,
	$currencyCode,
	$matchTypes,
	$campaignId,
	$adGroupId)
{

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

	$request = new GetEstimatedPositionByKeywordsRequest();

	$request->Keywords = $keywords;
	$request->MaxBid = $maxBid;
	$request->Language = $language;
	$request->LocationIds = $locationIds;
	$request->CurrencyCode = $currencyCode;
	$request->MatchTypes = $matchTypes;
	$request->CampaignId = $campaignId;
	$request->AdGroupId = $adGroupId;

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