IBANdb

API reference

Base URL https://iban.trekle.space. All responses are JSON encoded in UTF-8. Every lookup is answered from the full dataset held in memory, built from official publishers only.

Authentication

Send your API key as a bearer token on every paid endpoint:

Authorization: Bearer <your key>

You get a key right after checkout. It's shown once, so store it in a secret manager. If a key leaks, rotate it: the old key stops working immediately.

Keep keys server side. Don't ship them in browser or mobile code.

IBAN lookup

GET/v1/iban/{iban}API key

Validates the IBAN (country, length, BBAN structure from the SWIFT IBAN Registry, mod-97 check digits) and returns the bank behind it. Spaces and lowercase letters are accepted; URL-encode spaces or strip them.

curl -H "Authorization: Bearer $IBANDB_KEY" \
  https://iban.trekle.space/v1/iban/DE89370400440532013000
{"iban":"DE89370400440532013000","valid":true,"country":"DE","country_name":"Germany","sepa":true,"check_digits":"89","bban":"370400440532013000","bank_code":"37040044","bank":{"country":"DE","bank_code":"37040044","branch_code":null,"bic":"COBADEFFXXX","bic_source":"source","name":"Commerzbank","short_name":"Commerzbank Köln","city":"Köln","postal_code":"50447","address":null,"lei":"851WYGNLUQLFZBSYGB56","legal_name":"COMMERZBANK Aktiengesellschaft","sepa_schemes":["SCT","SCT_INST","SDD_B2B","SDD_CORE","VOP"],"sepa_schemes_match":"bic","sources":["de_bundesbank"]},"data_version":"2026-09-24T07:51:20+00:00"}

Status codes: 200 for a valid IBAN, whether or not the bank is known; 422 for an invalid IBAN, with the same body shape, "valid": false and an errors list.

Response fields

FieldTypeMeaning
ibanstringThe IBAN, normalised: uppercase, no spaces.
validbooleanCountry known, length and BBAN structure match the registry, and the mod-97 check passes.
errorsstring[]Only when invalid. For example "invalid checksum", "wrong length: got 21, want 22", "unknown IBAN country XX", "BBAN does not match …" (followed by the expected structure), "check digits must be numeric", "too short".
countrystringISO 3166-1 alpha-2 code from the IBAN.
country_namestringCountry name as listed in the SWIFT IBAN Registry.
sepabooleanWhether the country is in the SEPA area.
check_digitsstringThe two IBAN check digits.
bbanstringThe national part of the IBAN.
bank_codestringBank identifier extracted from the BBAN at the position the registry defines.
branch_codestringBranch identifier, for countries whose IBAN contains one.
bankobject | nullThe bank object, or null when the IBAN is invalid or no official register lists the bank code. A branch-level entry is returned when the branch is known, else the bank-level one.
matched_countrystringOnly when the bank was found in another country's code register. Monaco IBANs, for instance, use French bank codes and resolve against FR.
data_versionstringISO 8601 timestamp of the dataset build that answered.
stale_sourcesstring[]Only when set. Source ids behind this bank record that are older than twice their publisher's refresh cadence. The record is still the latest official data we have, but may be out of date.

Bank object

Returned in bank of an IBAN lookup, in banks of a BIC lookup, and as the body of a bank-code lookup. Fields the publisher doesn't provide are null; short_name, lei, legal_name and derived_from_branches are omitted when absent.

FieldTypeMeaning
countrystringCountry of the register the record comes from.
bank_codestringNational bank code.
branch_codestring | nullBranch code for a branch-level record; null for the bank-level record.
bicstring | nullBIC (8 or 11 characters) as published. See bic_source.
bic_sourcestring | nullWhere the BIC comes from. See provenance flags.
namestringInstitution name as the national publisher writes it.
short_namestringShort or branch name, when published.
address, postal_code, citystring | nullAddress as published. Not every register includes it.
leistringLegal Entity Identifier, from the national register or GLEIF.
legal_namestringRegistered legal name from GLEIF's LEI record.
sepa_schemesstring[]EPC schemes the institution has joined: SCT, SCT_INST, SDD_CORE, SDD_B2B, VOP (Verification of Payee), OCT_INST, SRTP. Empty when the institution isn't in the EPC register.
sepa_schemes_matchstring | nullHow the record was matched to the EPC register: "bic" or "lei". null when there are no schemes.
sourcesstring[]Ids of the sources this record was built from. Resolve them with GET /v1/sources.
derived_from_branchesbooleanOnly when true: the publisher lists branches only, and this bank-level record was derived from them.

Provenance flags

bic_source

sepa_schemes_match

An empty sepa_schemes in a SEPA country usually means the institution reaches SEPA through another payment service provider, not that payments to it will fail.

BIC lookup

GET/v1/bic/{bic}API key

Every bank record using a BIC. Accepts 8 or 11 characters, case-insensitive.

curl -H "Authorization: Bearer $IBANDB_KEY" \
  https://iban.trekle.space/v1/bic/COBADEFFXXX
{ "bic": "COBADEFFXXX", "banks": [ { …bank object… }, … ] }

400 if the BIC isn't 8 or 11 characters, 404 if no record uses it.

Bank-code lookup

GET/v1/banks/{country}/{code}?branch={branch}API key

Look up a national bank code directly, without an IBAN. branch is optional; when the branch isn't known you get the bank-level record. The body is a single bank object.

curl -H "Authorization: Bearer $IBANDB_KEY" \
  "https://iban.trekle.space/v1/banks/IT/05428?branch=11101"

404 with {"error": "unknown bank code"} when the code isn't in the register.

Public endpoints

No key needed.

GET/v1/sources

Every source in the current dataset: publisher, dataset name, homepage, countries, refresh cadence in days, published_at (the publisher's date, when it states one), fetched_at, record count and a stale flag.

{"data_version":"2026-09-24T08:04:43+00:00","sources":{"de_bundesbank":{"kind":"banks","publisher":"Deutsche Bundesbank","dataset":"Bankleitzahlendatei","homepage":"https://www.bundesbank.de/…","countries":["DE"],"refresh_days":92,"fetched_at":"2026-09-24T07:58:12+00:00","published_at":"2026-09-07","records":3505,"stale":false}}}
GET/v1/coverage

Per country: number of bank codes and branches, share of bank codes with a BIC (bic_pct), share with SEPA schemes (sepa_pct, null outside SEPA) and the source ids used.

GET/v1/plans

Current plans with price in cents, currency, billing interval and monthly quota.

GET/demo/iban/{iban}

Same response as /v1/iban, without a key, limited to 10 requests a minute per IP address. It exists for trying the API on the homepage; don't build on it.

Errors

Errors other than an invalid IBAN have a JSON body with an error message.

StatusWhenBody
400Malformed input, such as a BIC that isn't 8 or 11 characters.{"error": "BIC must be 8 or 11 characters"}
401Missing, malformed, rotated or revoked API key.{"error": "missing or invalid API key"}
402The subscription isn't active, for example after a failed payment.{"error": "…"}
404Unknown BIC or bank code. An IBAN lookup never returns 404: an unknown bank gives 200 with "bank": null.{"error": "unknown BIC"}
422Invalid IBAN.The full IBAN response with "valid": false and errors.
429Monthly quota used up, or demo rate limit reached.{"error": "monthly quota exceeded", "quota": 10000, "used": 10000}

Quotas and limits

Account

Manage your key and subscription with the key itself.

GET/v1/accountAPI key
{"plan":"pro","monthly_quota":100000,"used_this_month":18234,"status":"active"}
POST/v1/account/rotateAPI key

Issues a new key and disables the one used for the call. The new key is returned once.

{"api_key":"<new key>"}

Deploy the new key before your next request: the old key returns 401 as soon as this call succeeds.

POST/v1/account/portalAPI key

Returns a short-lived link to the Stripe billing portal, where you can download invoices, change plan, update your card or cancel.

curl -X POST -H "Authorization: Bearer $IBANDB_KEY" \
  https://iban.trekle.space/v1/account/portal
{"url": "https://billing.stripe.com/p/session/…"}

Data terms

Your subscription lets you use lookup results in your own products and processes. The underlying data comes from third-party publishers and stays under their terms. SEPA scheme data is reused from the European Payments Council (Source: European Payments Council); GLEIF data is CC0; the IBAN structure comes from the SWIFT IBAN Registry. Some national registers and the EPC restrict commercial redistribution of their datasets, so don't republish or resell the data in bulk. See the terms and the list of publishers in the footer.