Back

Bing Ads API Essential Guide

Aug 8, 20246 minute read

What type of API does Bing Ads provide?

SOAP API

  1. Bing Ads API uses Simple Object Access Protocol (SOAP) to exchange request and response messages with the service operations.

  2. SOAP is an XML-formatted, highly standardized web communication protocol.

  3. The API requires specific SOAP headers containing user credentials for authentication.

Key Considerations

  1. The API uses XML for data exchange.

  2. Authentication is done using OAuth access tokens, which are included in the SOAP headers.

  3. Developers need to obtain a Developer Token to use the Bing Ads API.

  4. The API provides access to various services, including Customer Management, Customer Billing, and Ad Insight.

Best Practices

  1. Always set the CustomerAccountId and CustomerId header elements for most service operations.

  2. Use the AuthenticationToken element to set user credentials instead of the deprecated Password and UserName elements.

  3. Utilize the provided SDKs (available in C#, Java, PHP, and Python) for easier integration.

  4. Consider using the Ad Insight service for optimizing campaign budgets and keyword bids.

  5. Use the Reporting API to monitor campaign performance and generate various types of reports.

Does the Bing Ads API have webhooks?

The official Bing Ads API does not have native webhook functionality. The Bing Ads API provides programmatic access to Microsoft Advertising for managing campaigns, reporting, and other advertising-related tasks, but does not offer event-based notifications through webhooks. While third-party integration platforms like RudderStack and ApiMonster offer ways to integrate Bing Ads data with webhook-enabled systems, these are not part of the official Bing Ads API.

The Bing Ads API offers various services for campaign management, reporting, and optimization, but these are based on API calls rather than webhook events. For real-time data or notifications, developers would likely need to implement polling mechanisms or use the reporting APIs provided by Bing Ads.

If webhook-like functionality is required, developers may need to consider third-party integration platforms or implement custom solutions using the available API endpoints and services provided by Bing Ads.

Rate Limits and other limitations

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

Query Limits

  • Queries per second (QPS): 40 HTTP requests per second [1]
  • Method calls per minute: 60,000 [1]
  • Method calls per day: 20,000,000 [1]

Batch Request Limits

  • A batch request can contain up to 300 method calls [1]
  • Each item in a batch request counts as one method call against the method call limits [1]
  • Using batch requests reduces the number of requests that count against the QPS limit, but not the number of method calls [1]

Error Handling

  • If you exceed the service call limit, you'll receive Error Code 117 (CallRateExceeded) [2]
  • When this error occurs, you should wait 60 seconds before resubmitting the request [2]

Key Points to Consider

  • Maximizing batch requests (300 method calls per request) may cause you to exceed the calls per minute and calls per day limits [1]
  • Be mindful of how maximizing for method calls or QPS affects the other limits and adjust accordingly [1]
  • The limits are designed to ensure maximum API efficiency [1]

Best Practices

  1. Monitor your API usage to stay within the limits.
  2. Implement proper error handling for rate limit errors.
  3. Use batch requests efficiently to optimize your API calls.
  4. Consider spreading out API calls evenly throughout the day to avoid hitting rate limits.

These limits are subject to change, so it's always a good idea to check the official Microsoft Advertising documentation for the most up-to-date information.

Latest API Version

Based on the search results provided, the most recent version of the Bing Ads API is Version 13. Here are the key points:

Current Version

  • The current version of the Bing Ads API is Version 13.

General Availability

  • Version 13 became generally available in April 2019.

SDK Updates

  • The Bing Ads SDKs for .NET, Java, PHP, and Python are regularly updated to support Version 13.

  • The most recent SDK update mentioned in the search results is version 13.0.21.

Key Considerations

  • With the availability of Version 13, Version 12 was deprecated and sunset by October 31, 2019.

  • Developers using older versions should migrate to Version 13 for continued support and access to new features.

Best Practices

  • Keep your SDK updated to the latest version to ensure compatibility with the latest API features and improvements.

  • Regularly check the Bing Ads API Release Notes for updates and new features.

It's important to note that while Version 13 is the current major version, there are regular updates and minor version releases within Version 13. Developers should stay informed about these updates to take advantage of new features and improvements.

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

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

  2. Go to the Microsoft Advertising Developer Portal and sign in with your Super Admin credentials.

  3. On the Account tab of the Developer Portal, you can get your developer token. This token enables programmatic access to the accounts you have permission for.

  4. Register your application in Azure Active Directory to get a client ID and client secret:

    • Go to the Azure portal - App registrations page
    • Click "New registration"
    • Enter an application name
    • For Supported account types, select "Accounts in any organizational directory and personal Microsoft accounts"
    • Complete the registration to get the client ID
  5. Set up authentication in your application using OAuth 2.0 to get access tokens. You'll need:

    • Your developer token
    • The client ID from app registration
    • User credentials (handled via OAuth flow)
  6. Use the Customer Management API to get the customer ID and account ID for the authenticated user.

What can you do with the Bing Ads API?

Here are the key data models you can interact with using the Bing Ads API, along with what is possible for each:

Campaign Management

  • Campaigns

    • Create, read, update, delete campaigns
    • Set campaign budgets, targeting, and settings
    • Manage campaign negative keywords
  • Ad Groups

    • Create, read, update, delete ad groups
    • Set ad group targeting and bid adjustments
    • Manage ad group level negative keywords
  • Ads

    • Create, read, update, delete ads (text ads, responsive search ads, etc.)
    • Set ad copy, final URLs, tracking templates
  • Keywords

    • Add, get, update, delete keywords
    • Set keyword bids and match types
  • Ad Extensions

    • Manage various ad extension types (sitelinks, callouts, structured snippets, etc.)
    • Associate extensions with campaigns/ad groups

Reporting

  • Generate and retrieve various performance reports
    • Account, campaign, ad group, ad, keyword level reports
    • Geographic, demographic, search query reports
    • Custom date ranges and columns

Customer Management

  • Manage customer accounts and users
  • View account hierarchies and client relationships

Bulk Management

  • Perform bulk operations on campaigns, ad groups, ads, keywords etc.
  • Upload and download bulk sheets

Ad Insight

  • Get keyword ideas and traffic estimates
  • View auction insights
  • Get bid landscapes and opportunities

Billing

  • View account billing information
  • Manage insertion orders

Audience Management

  • Create and manage remarketing lists
  • Associate audiences with ad groups

Experiment Management

  • Create and manage campaign experiments

Offline Conversion Import

  • Upload offline conversion data

This covers the major data models and capabilities, but the Bing Ads API offers extensive functionality across these areas. The API allows programmatic management of most aspects of Microsoft Advertising campaigns and accounts.