# snm-brightdata-client
A modern, async Rust client for interacting with the Bright Data (formerly Luminati) API, including search, scraping, and browser automation capabilities. Built for flexibility and reliability in production environments.
## π Features
- β
Easy-to-use async client
- π Secure API token-based authentication
- π Supports Bright Dataβs SERP & Web Unlocker APIs
- βοΈ Configurable request options (timeouts, retries, engines)
- π‘οΈ Robust error handling with `anyhow` and typed errors
- π¦ Lightweight dependencies and fully async with `reqwest`
## π¦ Installation
Add this to your `Cargo.toml`:
```toml
snm-brightdata-client = "0.1.0"
```
Or use:
```bash
cargo add snm-brightdata-client
```
## β‘ Usage Example
```rust
use snm_brightdata_client::{BrightDataClient, ClientConfig, SearchRequest};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = ClientConfig::builder()
.api_token("your-api-token")
.build()?;
let client = BrightDataClient::new(config).await?;
let search = SearchRequest {
query: "Rust async client".into(),
engine: Some("google".into()),
..Default::default()
};
let result = client.search(search).await?;
println!("{:#?}", result);
Ok(())
}
```
## π Documentation
- [Bright Data API Docs](https://brightdata.com/)
- Full crate docs coming soon.
## π Development
```bash
cargo build
cargo test
```
## π License
MIT Β© 2025 SNM Maurya