CLI for Bing Webmaster API
Project description
bing-webmaster-cli
CLI for Bing Webmaster API using API-key authentication.
Features
- API key auth from
BING_WEBMASTER_API_KEYor local stored credentials - List sites available to your Bing Webmaster account
- Site and URL traffic stats
- URL index check with crawl-issue reason hints when URL is not indexed
- Submit one URL or a batch of URLs for indexing
- Output formats:
table,json,csv
Install (Recommended)
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install bing-webmaster-cli
Verify:
bwm --version
Install From Source
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Authentication
The CLI reads API key from:
BING_WEBMASTER_API_KEYenvironment variable- local credentials file (
~/.config/bing-webmaster-cli/credentials.json)
Store key locally:
bwm auth login --api-key "<your-api-key>"
Or interactive prompt:
bwm auth login
Check auth source:
bwm auth whoami
Clear local key:
bwm auth clear
Optional Default Site
bwm config set default-site https://example.com
bwm config get default-site
Usage
Sites
bwm site list
bwm site list --output json
Stats
Site-level stats:
bwm stats site --site https://example.com --start-date 2026-02-01 --end-date 2026-02-26
URL-level stats:
bwm stats url --site https://example.com --url https://example.com/page --start-date 2026-02-01 --end-date 2026-02-26
Save as CSV:
bwm stats site --site https://example.com --output csv --csv-path ./site-stats.csv
URL Indexing
Check if a URL is indexed by Bing:
bwm url check-index --site https://example.com --url https://example.com/page
If not indexed, CLI attempts to map crawl issue flags from GetCrawlIssues and prints the likely reason.
URL Submission
Submit one URL:
bwm url submit --site https://example.com --url https://example.com/new-page
Submit many URLs:
bwm url submit --site https://example.com \
--url https://example.com/a \
--url https://example.com/b
Submit URLs from file (one URL per line):
bwm url submit --site https://example.com --file ./urls.txt
Config Paths
Defaults:
- credentials:
~/.config/bing-webmaster-cli/credentials.json - app config:
~/.config/bing-webmaster-cli/config.json
Overrides:
BWM_CONFIG_DIRBWM_CREDENTIALS_FILEBWM_APP_CONFIG_FILEBWM_API_BASE_URL
API References
This CLI is based on Microsoft Bing Webmaster API docs:
- Getting access:
https://learn.microsoft.com/en-us/bingwebmaster/getting-access - API interfaces:
https://learn.microsoft.com/en-us/dotnet/api/microsoft.bing.webmaster.api.interfaces?view=bing-webmaster-dotnet
Publishing
Trusted Publishing via GitHub Actions (Recommended)
This repo includes .github/workflows/publish.yml.
Release flow:
- Bump version in
pyproject.toml. - Commit and push.
- Tag and push:
git tag v0.1.0
git push origin v0.1.0
Manual publishing
python -m pip install --upgrade build twine
python -m build
python -m twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bing_webmaster_cli-0.1.0.tar.gz.
File metadata
- Download URL: bing_webmaster_cli-0.1.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75d8b4620124719e48f7740af70f9288a87ce660d837cac505374ad4740dfc18
|
|
| MD5 |
bf33689de9f39bc134959d7d0c4ea45d
|
|
| BLAKE2b-256 |
f6128376e2a3355035d9fe193383b93668f35b6c4ef31f893394fd950a689483
|
Provenance
The following attestation bundles were made for bing_webmaster_cli-0.1.0.tar.gz:
Publisher:
publish.yml on NmadeleiDev/bing_webmaster_cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bing_webmaster_cli-0.1.0.tar.gz -
Subject digest:
75d8b4620124719e48f7740af70f9288a87ce660d837cac505374ad4740dfc18 - Sigstore transparency entry: 995146606
- Sigstore integration time:
-
Permalink:
NmadeleiDev/bing_webmaster_cli@dcf939de6b6702935afc53492e6754d5b310ee7e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NmadeleiDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dcf939de6b6702935afc53492e6754d5b310ee7e -
Trigger Event:
push
-
Statement type:
File details
Details for the file bing_webmaster_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bing_webmaster_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c30d4ebdf5dfb2cf3fdf099fcbbd38598168499820ff528789caedef4aafbe50
|
|
| MD5 |
07dd817b730a93b667b3e2ce7304813a
|
|
| BLAKE2b-256 |
2c80de3f00845c3a6aa939738e89681b7e03d8fe9c320d5010518ceafcebc393
|
Provenance
The following attestation bundles were made for bing_webmaster_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on NmadeleiDev/bing_webmaster_cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bing_webmaster_cli-0.1.0-py3-none-any.whl -
Subject digest:
c30d4ebdf5dfb2cf3fdf099fcbbd38598168499820ff528789caedef4aafbe50 - Sigstore transparency entry: 995146609
- Sigstore integration time:
-
Permalink:
NmadeleiDev/bing_webmaster_cli@dcf939de6b6702935afc53492e6754d5b310ee7e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NmadeleiDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dcf939de6b6702935afc53492e6754d5b310ee7e -
Trigger Event:
push
-
Statement type: