Introducing our Bing Webmaster Tools API Python Client | MERJ

Join us & Akamai in NYC on November 17! More details

Introducing our Bing Webmaster Tools API Python Client

For organisations managing large-scale SEO operations, accessing and analysing Bing Webmaster Tools ("BWT") data programmatically has become increasingly crucial. Today, we're excited to introduce our open source Bing Webmaster Tools Client written in Python for the Bing Webmaster Tools API – a modern, type-safe, and production-ready solution for accessing Bing's webmaster data at scale.

➡️ Ready to start? Head straight to Github...

Bing Webmaster Tools Github

Why Another Bing Webmaster Tools Wrapper?

With the rise of new ways to search, our focus has been on expanding data pipelines outside the Google Search ecosystem. Bing's significance has grown substantially, particularly with its integration with Copilot.

Google provides an official Python SDK for their APIs which includes Search Console ( Github link). Bing has a Python SDK, but only for Bing Ads ( Github link).

What began as an internal tool for our data pipeline needs has evolved into something we believe can benefit the broader technical SEO community. By open-sourcing our client, we aim to provide a robust solution that matches the quality and reliability of official SDKs.

Key Features

What Are The Use Cases For the BWT API?

The BWT API serves three main purposes: collecting marketing data for warehousing, monitoring search engine behaviour, and automating website maintenance tasks:

  1. Bingbot Crawl Stats: This data is not accessible via the web interface. Obtaining server access logs for bot traffic can be time-consuming, so these stats provide some insight into potential issues.
  2. Extracting Search Query Data: Up to 16 months of historical data can be backfilled, with daily data collection possible moving forward.
  3. XML Sitemap Management: Some organisations have thousands of XML sitemaps. By running scripts alongside Google Search Console, both Google Search Console and Bing Webmaster Tools can stay synchronised. A single source of truth JSON file is typically built for this purpose.
  4. User Management: Teams often handle hundreds or thousands of website domains. Compliance is maintained with a risk register (aligned with ISO 27001 and SOC 2 Type II) and a review process for adding and removing users.
  5. Content Submission: While IndexNow is the preferred method for Bing and other search engines, it requires a static file on the site. Content Submission allows for pushing up to 10,000 new URLs per day to Bing, useful when development teams cannot prioritise the static file during a Sprint.
  6. Blocking Content: Handles legal and compliance requests effectively by blocking web pages or previews.
  7. Parameter Removal: Unlike Google, which no longer supports parameter management, Bing still allows it.
  8. Regional Settings: Subdirectory-level regional settings can be configured when hreflang implementation poses difficulties. This option is not available via the web interface.

Technical Overview

Getting Started

To begin using the wrapper:

  1. Install via pip:

  1. Add your BWT API Key to the environment variable using our authentication example.

  1. Look under the examples subdirectory to see boilerplate command line interface scripts which can help you get started. These assume you are using the environment variable BING_WEBMASTER_API_KEY as described in the Basic Setup.

Architecture and Approach

The client is built with modern Python practices using asynchronous functions. The following example creates the authentication from an environment variable, gets all the known sites, then loops through them to output the traffic stats.


The client handles all the complexity of API authentication, rate limiting, and data pagination, allowing you to focus on utilising the data rather than managing API interactions.

Current Limitations and Roadmap

As our public v1.X.X release, it's important to note current limitations:

Development roadmap for 2024/2025:

Community and Contribution

We're excited to see how marketing technology teams and the SEO community build upon this library. Please feel free to submit:

Next Steps

  1. Visit our GitHub repository to download the code and get started.

  2. Join in the conversation on:

  3. X using the hashtag #bingwebmastertools

  4. Linked using #bingwebmastertools