Docs / Money and business

Card BIN lookup API

Which network, card type and bank a card's first six digits belong to: Visa, Mastercard, RuPay, debit or credit.

The first six to eight digits of a card (the BIN or IIN) name its network, whether it is debit, credit or prepaid, its product and the bank that issued it. About 374,000 prefixes worldwide, about 12,000 of them Indian, from an open BIN list (CC BY 4.0). Use it to show the right card logo or to route a payment; never send a whole card number.

Base URL https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as Markdown

Network, type and bank of a card prefix

GET/v1/bin/{prefix}

The longest known prefix of the digits given. More than eight digits is refused, so a card number is never looked up. Quality varies: the list is not the networks' own.

What you send here is never written to the log, and the answer is not cached.

ParameterDescription
prefixpath, required6 to 8 digits.

curl

curl "https://api.dharun.dev/v1/bin/605067?utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/bin/605067?utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/bin/605067?utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Data source

BIN List Data, 023a4f68ab1b. Retrieved 2026-11-12T17:29:28Z. Licence: CC BY 4.0. Card prefixes from BIN List Data by Venelin Kochev (binlookup.io), CC BY 4.0.

Using an AI assistant? Connect the MCP server and it can call this API by itself. Want every endpoint on one bench? Open the playground.