A simple and powerful tool to collect, store, and look up Bank Identification Number (BIN) data. Perfect for developers who need to work with BIN information or just want to explore the world of payment card systems.
The project consists of three main parts that work together:
Gets BIN data from online sources in two easy steps:
- First, it finds all the bank pages across different countries
- Then, go through each bank's page to get their BIN information (resumable) Don't worry about timeouts or failures - the tool is built to handle interruptions gracefully.
Uses a simple SQLite database to keep everything organized:
- Keeps track of bank webpages and their processing status
- Stores all the BIN details like issuer, brand, type, and level You can stop and resume the collection process anytime - no data will be lost!
A friendly command-line tool that lets you:
./bin-cli -h
usage: ./bin-cli [-h] [--bin BIN] [--bank BANK] [--country COUNTRY] [--country-bank COUNTRY BANK] [--stats] [--check BIN] [--collect-urls] [--scrape]
BIN Database Query Tool
options:
-h, --help show this help message and exit
--bin BIN Find information for a specific BIN
--bank BANK List all BINs for a specific bank
--country COUNTRY List all banks in a specific country
--country-bank COUNTRY BANK List all BINs for a specific bank in a specific country
--stats Show database statistics
--check BIN Check if a bin is correct using bin-ip-checker
--collect-urls Collect bank URLs for scraping
--scrape Scrape BIN data from bank URLs
--export-to-csv FILEPATH Export bins db to csv file
- Set up your environment:
python -m venv .venv
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
- Install what you need:
pip install -r requirements.txt
- Run the app
python -m bin_manager.app.main
./bin-cli --collect-urls
This creates your database and finds all the bank pages we'll need to check.
./bin-cli --scrape
This gets the actual BIN information from each bank. If something interrupts it, just run it again - it'll pick up where it left off.
Here's how you can find what you need:
./bin-cli --bin 123456
./bin-cli --bank "HSBC"
./bin-cli --country "France"
./bin-cli --country-bank "France" "BNP Paribas"
./bin-cli --stats
Feel free to jump in! Whether you've found a bug or have an idea to make it better, we'd love to hear from you.
This project is open source under the MIT License.
Database Statistics:
Total BINs: 161,660
Unique Banks: 16,573
Countries: 215
Card Brand Distribution:
VISA: 74,340
MASTERCARD: 44,867
DISCOVER: 12,449
MAESTRO: 6,444
UATP: 4,099
PRIVATE LABEL: 4,071
DINERS CLUB INTERNATIONAL: 3,489
CHINA UNION PAY: 3,216
LOCAL BRAND: 2,676
AMERICAN EXPRESS: 1,828
EBT: 1,046
JCB: 558
ELO: 541
RUPAY: 261
PHH FUEL CARD: 198
CABAL: 192
WEXCARD: 187
CARNET: 181
NSPK MIR: 147
VERVE: 119
CIRRUS: 116
SBERCARD: 98
VISA/DANKORT: 96
TROY: 72
MAESTRO/BANCONTACT: 53
CMI: 38
UZCARD: 27
HUMOCARD: 26
UK FUEL CARD: 24
EFTPOS: 20
JCB/RUPAY: 19
CHJONES FUEL CARD: 15
NEWDAY: 12
DINACARD: 12
CHINA UNION PAY/UZCARD: 12
BELKART: 11
VPAY: 10
DUET: 10
GE CAPITAL: 9
TARJETA NARANJA: 8
RED FUEL CARD: 8
HIPERCARD: 8
PAYPAK: 7
FUEL CARD: 7
PROSTIR: 5
ATM CARD: 4
MEEZA: 3
VISA/BANCONTACT: 2
SODEXO: 2
MASTERCARD/BANCONTACT: 2
LOYALTY CARD: 2
CODENSA: 2
ARGENCARD: 2
TARJETA CENCOSUD: 1
RED LIQUID FUEL CARD: 1
PAYPAL: 1
OUROCARD: 1
JCB/MIR: 1
JCB/LANKAPAY: 1
JCB/CHINA UNION PAY: 1
GLOBAL BC: 1
AURA: 1