Home BIN List Docs Pricing
Log in Get API Key

Introduction

The BinInfo API provides a simple way to look up Bank Identification Numbers (BINs) and retrieve detailed information about credit and debit cards. Use it to verify card details, prevent fraud, and enhance your payment flows.

The API returns JSON responses and uses API key authentication for secure access.

Authentication

All API requests require authentication using your API key. Include your key in the X-API-Key header with each request.

HTTP Header
X-API-Key: bin_your_api_key_here
Keep your API key secure Never expose your API key in client-side code or public repositories. Use environment variables or a backend proxy for web applications.

Don't have an API key? Create a free account to get started.

Base URL

All API requests should be made to:

https://bininfo.io/api/v1

BIN Lookup

GET /v1/lookup/{bin}

Look up information for a specific BIN (first 6-8 digits of a card number).

Path Parameters

Parameter Type Description
bin string 6-8 digit BIN to look up (required)

Example Request

cURL
curl -X GET "https://bininfo.io/api/v1/lookup/453987" \
  -H "X-API-Key: bin_your_api_key_here"

Example Response

JSON
{
  "success": true,
  "data": {
    "bin": "453987",
    "scheme": "visa",
    "type": "credit",
    "brand": "Platinum",
    "prepaid": false,
    "country": {
      "name": "United States",
      "code": "US",
      "code3": "USA",
      "emoji": "πŸ‡ΊπŸ‡Έ",
      "currency": "USD"
    },
    "bank": {
      "name": "JPMorgan Chase Bank",
      "url": "www.chase.com",
      "phone": "+18009359935"
    }
  }
}

Response Format

All responses are returned in JSON format with a consistent structure:

Success Response Fields

Field Type Description
success boolean Whether the request was successful
data.bin string The BIN that was looked up
data.scheme string Card network (visa, mastercard, amex, discover, etc.)
data.type string Card type (credit, debit)
data.brand string Card brand/tier (Platinum, Gold, Classic, etc.)
data.prepaid boolean Whether the card is prepaid
data.country object Issuing country information (name, code, emoji, currency)
data.bank object Issuing bank information (name, url, phone)

Error Codes

When an error occurs, the API returns an appropriate HTTP status code and error message:

Error Response
{
  "success": false,
  "error": "Error message here"
}
Status Error Description
400 Invalid BIN format BIN must be 6-8 numeric digits
401 Invalid API key Missing or invalid API key
404 BIN not found The requested BIN is not in our database
429 Rate limit exceeded Too many requests, please slow down
500 Internal server error An unexpected error occurred

Rate Limits

API requests are rate limited to ensure fair usage and service stability. Rate limit information is included in response headers:

Header Description
X-RateLimit-Limit Maximum requests per window
X-RateLimit-Remaining Remaining requests in current window
X-RateLimit-Reset Unix timestamp when the window resets

Plan Limits

Plan Rate Limit Monthly Requests
Free 100 requests/minute 10,000
Pro 1,000 requests/minute Unlimited

Code Examples

Quick start examples in popular languages:

JavaScript / Node.js
const response = await fetch('https://bininfo.io/api/v1/lookup/453987', {
  headers: {
    'X-API-Key': 'bin_your_api_key_here'
  }
});

const data = await response.json();

if (data.success) {
  console.log('Card Network:', data.data.scheme);
  console.log('Issuing Bank:', data.data.bank.name);
  console.log('Country:', data.data.country.name);
}
Python
import requests

response = requests.get(
    'https://bininfo.io/api/v1/lookup/453987',
    headers={'X-API-Key': 'bin_your_api_key_here'}
)

data = response.json()

if data['success']:
    print(f"Card Network: {data['data']['scheme']}")
    print(f"Issuing Bank: {data['data']['bank']['name']}")
    print(f"Country: {data['data']['country']['name']}")
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://bininfo.io/api/v1/lookup/453987');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'X-API-Key: bin_your_api_key_here'
]);

$response = curl_exec($ch);
$data = json_decode($response, true);

if ($data['success']) {
    echo "Card Network: " . $data['data']['scheme'];
    echo "Issuing Bank: " . $data['data']['bank']['name'];
}
?>
cURL
curl -X GET "https://bininfo.io/api/v1/lookup/453987" \
  -H "X-API-Key: bin_your_api_key_here"

Need Help?

If you have questions or need assistance integrating the API, we're here to help.

Contact Support Go to Dashboard