Back

Microsoft Bing Ads API Essential Guide

Aug 8, 20246 minute read

What type of API does Microsoft Bing Ads provide?

Microsoft Bing Ads uses a SOAP (Simple Object Access Protocol) API.

Type of API

Microsoft Bing Ads uses a SOAP API.

Key Characteristics

  1. SOAP-based protocol: The Bing Ads API services use SOAP to exchange request and response messages with the service operations.

  2. Header elements: Each SOAP request must include specific SOAP headers containing the user's credentials.

  3. Authentication: The API requires an OAuth access token (AuthenticationToken) that represents a Microsoft Account user with permissions to Microsoft Advertising accounts.

API Usage

  1. Developer token: To use the Bing Ads API, developers need a developer token and valid user credentials.

  2. SDKs available: Microsoft provides SDKs for C#, Java, PHP, and Python to facilitate development.

  3. User consent: Developers need to request user consent for their application to manage Microsoft Advertising accounts.

Comparison with Other API Types

  1. REST APIs are more flexible and use standard HTTP methods for data manipulation.

  2. GraphQL offers more flexibility in querying data structures.

  3. SOAP, which Bing Ads uses, has a more rigid structure but offers built-in support for security features like encryption and digital signatures.

Does the Microsoft Bing Ads API have webhooks?

Based on the search results provided, it appears that the official Microsoft Bing Ads API does not have webhooks. The search results do not contain any specific information about webhooks for the Bing Ads API. Instead, the results focus on other Microsoft services and general information about webhooks.

The key points to consider are:

  1. The search results primarily discuss webhooks in the context of Microsoft Graph and Azure Event Grid, not Bing Ads API.

  2. The Bing Ads API overview provided in the search results does not mention webhooks as a feature.

  3. The information about the Bing Ads API focuses on programmatic access for managing campaigns, reporting, and optimization, but does not include webhooks.

  4. While webhooks are a common feature in many APIs, their absence from the Bing Ads API documentation suggests that they are not currently supported.

If you need real-time updates or notifications from the Bing Ads platform, you may need to explore alternative methods such as:

  1. Periodic API polling to check for changes.
  2. Using the Reporting API to generate reports on a schedule.
  3. Integrating with other Microsoft services that do offer webhooks, if applicable to your use case.

For the most up-to-date and accurate information, it would be best to consult the official Microsoft Advertising documentation or contact their support directly.

Rate Limits and other limitations

Here are the key API rate limits for the Microsoft Bing Ads API:

Queries per Second (QPS)

  • Limit the number of HTTP requests to 40 per second [1].

Method Calls per Minute

  • Limit the number of method calls to 60,000 per minute [1].

Method Calls per Day

  • Limit the number of method calls to 20,000,000 per day [1].

Throttling

The API uses throttling to limit the number of calls any one user can make in a minute's time. This applies to services like Ad Insight and Campaign Management [4].

If you exceed the service call limit, you'll receive the following error:

  • Error Code: 117
  • Error Message: "You have exceeded the number of calls that you are allowed to make in a minute. Please reduce the number of calls that you make per minute."

When you get this error, you should wait 60 seconds before resubmitting the request [4].

Key Points to Consider

  • These limits are in place to maintain fair usage for all Microsoft Advertising clients [4].

  • The throttling uses a sliding protocol with a 60-second window at the customer level [4].

  • If you hit the limit, you'll need to wait 60 seconds before making more calls [4].

  • Different services (like Ad Insight and Campaign Management) may have their own specific throttling limits [4].

Best Practices

  1. Implement retry logic in your code to handle throttling errors gracefully.

  2. Space out your API calls to stay within the limits.

  3. Consider batching operations where possible to reduce the number of individual API calls.

  4. Monitor your API usage to ensure you're not consistently approaching the limits.

  5. If you regularly hit these limits, you may need to optimize your code or consider discussing your needs with Microsoft Advertising support.

By adhering to these rate limits and implementing best practices, you can ensure smooth integration with the Microsoft Bing Ads API while maintaining fair usage for all users.

Latest API Version

The most recent version of the Microsoft Bing Ads API is Version 13. Here are the key points about this version:

  1. Version 13 is currently the latest generally available version of the Bing Ads API [1].

  2. Version 13 was initially released for preview, and then became generally available in April 2019 [1][15].

  3. With the release of Version 13, Version 12 was deprecated and sunset by October 31, 2019 [15].

Key points to consider:

  • The Bing Ads API is regularly updated with new features and improvements. The release notes document these changes on a monthly basis [1].

  • Microsoft provides SDKs for .NET, Java, PHP, and Python to work with the Bing Ads API. These SDKs are frequently updated to support the latest API features [1].

  • When migrating from Version 12 to Version 13, there were several changes and new features introduced. Developers should refer to the migration guide for detailed information on these changes [5].

Best practices:

  • Stay up-to-date with the latest API version to access new features and improvements.

  • Regularly check the release notes for updates and changes to the API.

  • Use the provided SDKs when possible, as they are maintained by Microsoft and updated to support the latest API features.

  • When planning to upgrade to a new API version, review the migration guide to understand the changes and plan accordingly.

How to get a Microsoft Bing Ads developer account and API Keys?

Here are the key steps to get a developer account for Microsoft Bing Ads API integration:

  1. Sign up for a Microsoft Advertising account if you don't already have one.

  2. Request API access by submitting a form to Microsoft Advertising support.

  3. Once approved, sign in to the Microsoft Advertising Developer Portal with your Super Admin credentials.

  4. Go to the Account tab in the Developer Portal to get your developer token.

  5. The developer token enables programmatic access to the accounts permitted for your user.

  6. You'll also need to get a user access token to authenticate API requests. This involves setting up OAuth authentication for your application.

  7. To make API calls, you'll need your account ID and customer ID in addition to the developer token and access token. These can be retrieved via the Customer Management API or found in the URL when signed into the Microsoft Advertising web interface.

Key points to consider:

  • There are separate credentials for sandbox and production environments.
  • The universal developer token can be used for multiple users/accounts.
  • You need both the developer token and user access token to authenticate API requests.
  • Make sure to enable multi-factor authentication, as it's now required.

Best practices:

  • Use the SDKs provided by Microsoft for easier integration in languages like .NET, Java, PHP, and Python.
  • Join the developer community forums for support.
  • Sign up for the monthly newsletter to stay updated on API changes.

What can you do with the Microsoft Bing Ads API?

Based on the provided search results, here is a list of data models that can be interacted with using the Microsoft Bing Ads API, along with what is possible for each:

Campaign Management Data Models

  • Campaigns:

    • Create, update, and delete campaigns
    • Manage campaign settings, budgets, and targeting options
    • Retrieve campaign performance data
  • Ad Groups:

    • Create, update, and delete ad groups within campaigns
    • Manage ad group settings and targeting
    • Retrieve ad group performance data
  • Ads:

    • Create, update, and delete various ad types (text ads, responsive search ads, etc.)
    • Manage ad copy, headlines, and display URLs
    • Retrieve ad performance data
  • Keywords:

    • Add, update, and remove keywords
    • Manage keyword bids and match types
    • Retrieve keyword performance data

Reporting Data Models

  • Account Performance Reports:

    • Generate reports on account-level metrics
    • Monitor overall account performance and budget utilization
  • Campaign Performance Reports:

    • Generate reports on campaign-level metrics
    • Track campaign performance, click-through rates, and conversions
  • Ad Performance Reports:

    • Generate reports on ad-level metrics
    • Analyze individual ad performance and effectiveness
  • Keyword Performance Reports:

    • Generate reports on keyword-level metrics
    • Evaluate keyword performance and bid optimization

Ad Insight Data Models

  • Keyword Opportunities:

    • Retrieve keyword suggestions and opportunities
    • Get estimated bids and performance data for keywords
  • Budget Opportunities:

    • Retrieve budget optimization suggestions
    • Get estimated performance impact of budget changes

Custom Parameter Data Models

  • Keyword Custom Parameters:

    • Manage and track custom parameters for keywords
  • Ad Custom Parameters:

    • Manage and track custom parameters for ads
  • Campaign Custom Parameters:

    • Manage and track custom parameters for campaigns
  • Ad Group Custom Parameters:

    • Manage and track custom parameters for ad groups

Additional Data Models

  • Audience Data:

    • Manage remarketing lists and custom audiences
    • Apply audience targeting to campaigns and ad groups
  • Location Targeting:

    • Manage geographic targeting options for campaigns and ad groups
  • Ad Extensions:

    • Create and manage various ad extensions (sitelinks, callouts, etc.)
    • Associate extensions with campaigns and ad groups

For each of these data models, the Bing Ads API typically allows for CRUD operations (Create, Read, Update, Delete) where applicable, as well as retrieving performance data and generating reports. The API also supports partial success for bulk operations, allowing for efficient management of large datasets.