Bing Webmaster API Client
A Rust client library for the Bing Webmaster API, providing access to all methods from Microsoft's Bing Webmaster Tools.
Features
- Complete API Coverage: Implements all methods from the IWebmasterApi interface
- Type-Safe: Strongly typed request and response structures using serde
- Async/Await: Built with async/await support using reqwest and tokio
- Middleware Support: Built on reqwest-middleware for extensibility (retry, logging, etc.)
- Tracing Support: Instrumented with tracing for observability
- Error Handling: Uses anyhow for comprehensive error handling
Installation
Add this to your Cargo.toml:
[]
= "0.2.0"
= { = "1.0", = ["full"] }
Quick Start
use ;
async
Using with Middleware
The client supports reqwest-middleware for adding custom middleware like retry policies, logging, etc:
use ;
use Client;
async
Authentication
You'll need an API key from Bing Webmaster Tools:
- Sign in to Bing Webmaster Tools
- Go to Settings > API Access
- Generate an API key
- Use the key with this client
Rate Limits
- URL Submission: Up to 10,000 URLs per day
- Content Submission: Up to 10MB payload per request
- Check your quota with
get_content_submission_quota()
Examples
See the examples/ directory for more usage examples.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under either of
- Apache License, Version 2.0
- MIT License
at your option.
TODOs
- method
GetReqlatedKeywords - method
GetKeyword(String, String, String, DateTime, DateTime) - method
AddPagePreviewBlock(String, String, BlockReason) - method
RemovePagePreviewBlock(String, String) - method
GetActivePagePreviewBlocks(String) - method
SubmitSiteMove(String, SiteMoveSettings) - method
GetSiteMoves(String) - method
AddBlockedUrl(String, BlockedUrl) - method
GetBlockedUrls(String) - method
RemoveBlockedUrl(String, BlockedUrl) - method
AddDeepLinkBlock(String, String, String, String) - method
GetDeepLinkBlocks(String) - method
RemoveDeepLinkBlock(String, String, String, String)