Skip to main content

ibanchecker

Official Python client for the ibanchecker.cash IBAN validation API.

Validate IBANs across 92 countries, validate up to 100 IBANs per request, extract IBANs from free text, look up country format specifications, and resolve SWIFT/BIC codes. No IBAN data is stored or logged; all validation runs in memory at the edge.

Install

pip install ibanchecker

Quick start

Validation, bulk validation and extraction need an API key. A free key covers 100 requests a month; request one at ibanchecker.cash/api-docs and it arrives by email in seconds.

import os

from ibanchecker import IbanChecker

client = IbanChecker(os.environ["IBANCHECKER_API_KEY"])

result = client.validate("DE89 3704 0044 0532 0130 00")
if result:                      # ValidationResult is truthy when valid
    print(result.country_name)  # "Germany"
    print(result.bank_name)     # "Commerzbank AG Cologne"
    print(result.bic)           # "COBADEFFXXX"
else:
    print(result.error)         # human-readable reason
    print(result.error_code)    # e.g. "INVALID_LENGTH"

Authentication

validate(), validate_bulk() and extract() require an API key. Without one the API answers HTTP 401 and the client raises AuthenticationError. The key is sent as Authorization: Bearer <key>.

  • A free key covers 100 requests a month. Get one at ibanchecker.cash/api-docs. Paid plans with higher quotas are at ibanchecker.cash/pricing.
  • Once the monthly quota is used up, requests fail with HTTP 429 and error_code "QUOTA_EXCEEDED" until the 1st of the next month (UTC).
  • get_format() and lookup_bic() also work without a key, limited to 100 requests an hour per IP (HTTP 429, error_code "RATE_LIMIT_EXCEEDED", beyond that).
client = IbanChecker("iban_your_api_key")

The client can also be used as a context manager so the underlying HTTP session is closed cleanly:

with IbanChecker("iban_your_api_key") as client:
    result = client.validate("GB29 NWBK 6016 1331 9268 19")

Methods

Method Description API key
validate(iban) Validate a single IBAN. Returns a ValidationResult. Required
validate_bulk(ibans) Validate up to 100 IBANs. Returns a BatchResult. Required
extract(text) Find and validate IBANs in free text (up to 50,000 chars). Returns a BatchResult. Required
get_format(country) IBAN format spec for an ISO country code. Returns a FormatSpec. Optional
lookup_bic(bic) Resolve an 8 or 11 character BIC. Returns a BankRecord. Optional

Bulk validation

batch = client.validate_bulk([
    "DE89370400440532013000",
    "GB29NWBK60161331926819",
    "XX00",
])
print(batch.valid_count, "of", batch.count, "valid")
for r in batch:                 # iterate results in input order
    print(r.iban, r.valid)

Extract from text

batch = client.extract("Please wire to DE89 3704 0044 0532 0130 00 by Friday.")
for r in batch:
    print(r.iban, r.bank_name)

Country format and BIC lookup

These two calls also work without a key (100 requests an hour per IP):

client = IbanChecker()

fmt = client.get_format("DE")
print(fmt.length, fmt.example)          # 22 'DE89370400440532013000'

bank = client.lookup_bic("DEUTDEFF")
print(bank.bank_name, bank.city)        # 'Deutsche Bank AG Frankfurt' 'FRANKFURT AM MAIN'

Error handling

A malformed IBAN is not an exception: validate() returns a ValidationResult with valid=False. Exceptions are raised only for transport, authentication (including a missing key on validate, validate_bulk and extract), and rate-limit or quota problems:

from ibanchecker import IbanChecker, AuthenticationError, RateLimitError, NotFoundError

client = IbanChecker("iban_your_api_key")
try:
    bank = client.lookup_bic("ZZZZZZZZ")
except NotFoundError:
    print("No bank for that BIC")
except RateLimitError as e:
    print("Limit reached:", e.message)  # e.error_code: "QUOTA_EXCEEDED" or "RATE_LIMIT_EXCEEDED"
except AuthenticationError:
    print("Missing or invalid API key")

All exceptions derive from IbanCheckerError and carry .status, .error_code, and .response.

License

MIT

Metadata

Release files for ibanchecker 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ibanchecker 0.1.1
File Size Uploaded
ibanchecker-0.1.1.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ibanchecker 0.1.1
File Interpreter ABI Platform
ibanchecker-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / ibanchecker-0.1.1.tar.gz

Download URL ibanchecker-0.1.1.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ccd5e89b780c0c381bf3064f6dd894c7bd20a009cfd4948d0775e18a160d38c5
BLAKE2b-256 checksum
How to use checksums
b6ec0c5cf615490b90657882d3b19c1ad87c131f098b08898f5ab672dbf0e32b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / ibanchecker-0.1.1-py3-none-any.whl

Download URL ibanchecker-0.1.1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d226b0e96293ed0cf733692c90a18bb777ba150a4c33aa9023cab9d8d782b79
BLAKE2b-256 checksum
How to use checksums
63bffbad8f0989573cd863f1e142c797da259e0a9e1fc10e7c816f53da3f6411
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page