GetEstimatedBidByKeywordIds has been failing last 2 days

Eric Nagel 55 Reputation points
2025-09-25T15:11:10.16+00:00

No changes to my code nor the version of the PHP SDK ("13.0.25.2") but the last two nights, GetEstimatedBidByKeywordIds has been failing. All other API calls are working fine.

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. MS Advertising - John Mark 150 Reputation points Microsoft External Staff Moderator
    2025-09-25T18:24:25.4766667+00:00

    Hi Eric,

    Thank you for reaching out to the Microsoft Advertising Learn Q&A Platform! My name is John, and I will be assisting you with this query.

    It was shared that there are no changes on your coding, but when you call the

    GetEstimatedBidByKeywordIds Service Operation - Ad Insight, it's not pushing through for the past 2 days

    Description/Functionality:

    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.

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

    I tried to check the Ad Insight API service operation status for any temporary service disruption via platform health blog but it's currently showing no issue. Microsoft Advertising platform health blog

    adinsightAPI

    Possible Causes to Investigate:

    -Authentication token issues: Ensure your OAuth token is valid and correctly formatted with the Bearer prefix.

    -Request formatting: Double-check that your SOAP request elements match the expected order and structure as outlined in the official documentation.

    -Keyword ID limits: The API supports up to 1,000 keyword IDs per request. Exceeding this may cause failures.

    -Target position mismatch: Ensure TargetPositionForAds is set to a valid value like MainLine1

    I'll be confirming several information regarding this API call, for us to make sure that we are able to address the issue, I'll be sending a private message on your inbox, please check your private message for further assistance.

    Our support teams are happy to discuss your account in more detail via phone, chat or email to provide review assistance, please see our support page to reach out! 

    Kind regards,

    John | Microsoft Advertising Support Specialist | 1-800-518-5689


  2. Eric Nagel 55 Reputation points
    2025-10-09T13:26:43.0433333+00:00

    [reposted]

    0 comments No comments

  3. Eric Nagel 55 Reputation points
    2025-10-09T13:28:17.8833333+00:00

    According to https://free.blessedness.top/en-us/advertising/ad-insight-service/getkeywordtrafficestimates?view=bingads-13&tabs=prod&pivots=rest the Ad Insight v13 host is adinsight.api.bingads.microsoft.com (the *.trafficmanager.net name is a DNS load balancer alias) but the SOAP client is trying to use adinsight-api.trafficmanager.net and since the certificate does not include that hostname (no SAN match), TLS verification fails.

    I fixed this by explicitly setting the service location on calls to GetEstimatedBidByKeywordIds.

    Again, this was not something that changed on my end, but a change by Microsoft Ads.

    0 comments No comments

  4. MS Advertising - John Mark 150 Reputation points Microsoft External Staff Moderator
    2025-10-09T14:37:57.16+00:00

    Hi Eric

    Thank you for sharing your diagnosis,

    You're absolutely right: the documented Ad Insight v13 endpoint is adinsight.api.bingads.microsoft.com, and the *.trafficmanager.net domain is a DNS load balancer alias. If the SOAP client defaults to adinsight-api.trafficmanager.net, and the SSL certificate lacks a SAN match for that hostname, TLS verification will fail — resulting in connection errors like "Could not connect to host."

    This behavior suggests a backend configuration change on Microsoft's side, possibly involving DNS routing or endpoint resolution. Your fix — explicitly setting the service location to the correct hostname — is the correct and recommended approach in this scenario.

    Hostnames in APIs like Microsoft Advertising can change for several reasons — often driven by infrastructure, security, or performance needs

    Thanks again for documenting this — it’s a valuable insight for the developer community.

    Kind regards,

    John | Microsoft Advertising Support Specialist | 1-800-518-5689

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.