# π shodan-rust
**An async-native Rust client for the [Shodan.io API](https://developer.shodan.io/).**
[](LICENSE)
[](https://www.rust-lang.org/)
[](https://github.com/gooseyinc/shodan-rust/actions)
`shodan-rust` is a lightweight and modern Rust crate for accessing Shodan's powerful search capabilities over the internet of things.
---
## β¨ Features
- β
Native async support using [`reqwest`](https://crates.io/crates/reqwest) and [`tokio`](https://tokio.rs/)
- π Easy API key integration
- π Search IP addresses, services, ports
- π§ Clean and extensible design for future Shodan endpoints
- π Includes examples in `/examples` directory
---
## π Usage
### Add to your `Cargo.toml`
```toml
[dependencies]
shodan-rust = { git = "https://github.com/gooseyinc/shodan-rust" }
tokio = { version = "1", features = ["full"] }
```
### Example
```rust
use shodan_rust::ShodanClient;
#[tokio::main]
async fn main() {
let client = ShodanClient::new("YOUR_SHODAN_API_KEY");
match client.host_info("8.8.8.8").await {
Ok(info) => println!("{:#?}", info),
Err(e) => eprintln!("Error: {}", e),
}
}
```
> π Check the [`examples/`](examples) folder for more real-world usage.
---
## π§ͺ Testing
```bash
export SHODAN_API_KEY=your_key_here
cargo test
```
---
## π Roadmap
- [x] IP Lookup
- [x] Honeyscore (Shodan Addon)
- [ ] Search Query
- [ ] Hostnames & DNS Resolve
- [ ] Error handling improvements
---
## π€ Contributing
PRs, ideas and bug reports are welcome.
Want to extend the library or implement more endpoints? Letβs build it together!
---
## π License
Licensed under the MIT License.
_Not affiliated with Shodan.io β this is a community-built Rust library._