binlist_rs
binlist_rs is a lightweight and async Rust wrapper for the Binlist API (https://binlist.net/). It allows you to perform BIN lookups with full support for proxies, custom error types, and structured JSON responses.
โจ Features
- ๐ Query BINs for card metadata
- ๐ Optional proxy support (SOCKS & HTTPS)
- ๐ง Strongly typed response models
- ๐ซ Graceful handling of API rate limits
- ๐งช Designed for use in CLI tools or backend services
๐ฆ Installation
Add this to your Cargo.toml:
[]
= "0.1.1"
Replace version with the latest from https://crates.io/crates/binlist_rs
โก๏ธ Usage
use BinLookup;
async
๐ API Reference
BinLookup::new(): Initializes the client.lookup(bin: &str, proxy_url: Option<&str>): Performs the API request.- Returns a
Result<CardInfo, LookupError>.
Available Fields in Response:
scheme,brand,type,prepaidcountry: name, emoji, currency, coordinatesbank: name
๐ Error Handling
All errors implement std::error::Error:
LookupError::BINLookupErrorLookupError::ReqwestErrorLookupError::RateLimitExceeded
๐ Proxy Support
Supports:
http://,https://socks5://,socks5h://
Example:
let proxy = Some;
๐ License
MIT ยฉ 2025 Junaid Rahman (https://github.com/junaid433)
๐ง Acknowledgments
Powered by the awesome Binlist API (https://binlist.net).