| Crates.io | bing-webmaster-api |
| lib.rs | bing-webmaster-api |
| version | 1.0.1 |
| created_at | 2025-12-20 16:22:36.681262+00 |
| updated_at | 2025-12-20 16:29:50.66469+00 |
| description | Rust client for the Bing Webmaster API |
| homepage | https://github.com/seo-meow/bing-webmaster-api |
| repository | https://github.com/seo-meow/bing-webmaster-api |
| max_upload_size | |
| id | 1996682 |
| size | 177,871 |
A Rust client library for the Bing Webmaster API, providing access to all methods from Microsoft's Bing Webmaster Tools.
Add this to your Cargo.toml:
[dependencies]
bing-webmaster-api = "0.2.0"
tokio = { version = "1.0", features = ["full"] }
use bing_webmaster_api::{WebmasterApiClient, Result};
#[tokio::main]
async fn main() -> Result<()> {
let client = WebmasterApiClient::new(
"your-api-key".to_string(),
None // Use default Bing API URL
);
// Add a site
client.add_site("https://example.com").await?;
// Submit a URL
client.submit_url("https://example.com", "https://example.com/page1").await?;
// Get crawl issues
let issues = client.get_crawl_issues("https://example.com").await?;
println!("Found {} URLs with crawl issues", issues.len());
Ok(())
}
The client supports reqwest-middleware for adding custom middleware like retry policies, logging, etc:
use bing_webmaster_api::{WebmasterApiClient, ClientBuilder, Result};
use reqwest::Client;
#[tokio::main]
async fn main() -> Result<()> {
// Create a client builder with custom middleware
let client_builder = ClientBuilder::new(Client::new())
// Add middleware here
// .with(RetryTransientMiddleware::new_with_policy(retry_policy))
;
let client = WebmasterApiClient::with_middleware(
"your-api-key".to_string(),
None,
client_builder
);
// Use the client as normal
client.add_site("https://example.com").await?;
Ok(())
}
You'll need an API key from Bing Webmaster Tools:
get_content_submission_quota()See the examples/ directory for more usage examples.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under either of
at your option.
GetReqlatedKeywordsGetKeyword(String, String, String, DateTime, DateTime)AddPagePreviewBlock(String, String, BlockReason)RemovePagePreviewBlock(String, String)GetActivePagePreviewBlocks(String)SubmitSiteMove(String, SiteMoveSettings)GetSiteMoves(String)AddBlockedUrl(String, BlockedUrl)GetBlockedUrls(String)RemoveBlockedUrl(String, BlockedUrl)AddDeepLinkBlock(String, String, String, String)GetDeepLinkBlocks(String)RemoveDeepLinkBlock(String, String, String, String)