SWIFT code lookup API
Checks a BIC (SWIFT code) and finds the institution behind it: name, address, LEI and the national bank codes that use it.
Checks a BIC’s layout (ISO 9362) and looks it up in the published BIC lists: about 48,000 BICs in 222 countries, plus the official bank code lists of the countries IBAN to BIC covers. One BIC per call.
Endpoint
GET https://supertoolshq.com/api/v1/finance/swift-code-lookup/
POST https://supertoolshq.com/api/v1/finance/swift-code-lookup/ (form-encoded body)
Parameters
| Name | Values | Default | Meaning |
|---|---|---|---|
bic | Text | required | A BIC (SWIFT code) of 8 or 11 characters. Spaces, hyphens and a “BIC:” or “SWIFT code:” label are ignored; any case works. |
Response
| Field | Type | Meaning |
|---|---|---|
bic | string|null | The BIC as understood: capitals, no spaces. Null when an IBAN was sent instead. |
bic11 | string|null | The 11-character form (an 8-character BIC gets XXX, the head office). Null when the layout is wrong. |
status | string | found (in the lists as sent), bank (this branch isn’t listed, but the bank is), valid (well formed, but in no list: that doesn’t make it wrong, since SWIFT’s full directory isn’t public) or invalid. |
valid | boolean | Length, characters and country code are right. Anything but invalid. |
country | object|null | Characters 5–6: code and English name. |
parts | array | The BIC split into bank, country, location and branch: pos, value, label, meaning, ok. |
institution | object|null | Who the BIC belongs to, mostly from the global LEI system: bic (for status bank, the bank’s listed BIC rather than the one sent), name, localName, address (street, city, postcode), lei, inactive (merged, taken over or dissolved), successor and listedUntil: the date of the last list that had a BIC no current list has, else null. A BIC known only from the SEPA participant list has a name and nulls for the address and LEI. |
bankCodes | array | National bank codes that use the BIC (for status bank, the bank’s other BICs): bic, country, code, name, town, closed. |
problems | array | What is wrong, each as code and text. Codes: empty, chars, iban, length, country. Empty unless invalid. |
notes | array | Sentences worth reading: a test BIC, one not connected to SWIFT, an unlisted branch, an inactive institution, a BIC missing from the latest lists. |
suggestion | string|null | For a 0 typed for an O (or 1 for an I, and back): the corrected BIC, given only when it is in the lists. |
Example
curl 'https://supertoolshq.com/api/v1/finance/swift-code-lookup/?bic=ABNANL2AXXX'
{
"bic": "ABNANL2AXXX",
"bic11": "ABNANL2AXXX",
"status": "found",
"valid": true,
"country": {
"code": "NL",
"name": "Netherlands"
},
"parts": [
{
"pos": "1–4",
"value": "ABNA",
"label": "Bank",
"meaning": "ABN AMRO Bank N.V.",
"ok": true
},
{
"pos": "5–6",
"value": "NL",
"label": "Country",
"meaning": "Netherlands",
"ok": true
},
{
"pos": "7–8",
"value": "2A",
"label": "Location",
"meaning": "Where the institution is, in SWIFT’s own code",
"ok": true
},
{
"pos": "9–11",
"value": "XXX",
"label": "Branch",
"meaning": "XXX: the head office",
"ok": true
}
],
"institution": {
"bic": "ABNANL2AXXX",
"name": "ABN AMRO Bank N.V.",
"localName": null,
"address": {
"street": "Gustav Mahlerlaan 10",
"city": "Amsterdam",
"postcode": "1082PP"
},
"lei": "BFXS5XCH7N0Y05NIXW11",
"inactive": false,
"successor": null,
"listedUntil": null
},
"bankCodes": [
{
"bic": "ABNANL2AXXX",
"country": "NL",
"code": "ABNA",
"name": "ABN AMRO BANK N.V.",
"town": null,
"closed": false
}
],
"problems": [],
"notes": [],
"suggestion": null
}
A typo
A zero for the letter O: the layout is fine, so it comes back valid, not found, with the BIC it probably meant in suggestion.
{
"bic": "C0BADEFF",
"bic11": "C0BADEFFXXX",
"status": "valid",
"valid": true,
"country": {
"code": "DE",
"name": "Germany"
},
"parts": [
{
"pos": "1–4",
"value": "C0BA",
"label": "Bank",
"meaning": "The institution’s own code",
"ok": true
},
{
"pos": "5–6",
"value": "DE",
"label": "Country",
"meaning": "Germany",
"ok": true
},
{
"pos": "7–8",
"value": "FF",
"label": "Location",
"meaning": "Where the institution is, in SWIFT’s own code",
"ok": true
},
{
"pos": "9–11",
"value": "",
"label": "Branch",
"meaning": "None given: the same as XXX, the head office",
"ok": true
}
],
"institution": null,
"bankCodes": [],
"problems": [],
"notes": [
"The first four characters have a digit. The standard has allowed that since 2014, but no BIC issued so far has one: check for a 0 typed for an O, or a 1 for an I.",
"It isn’t in the published BIC lists. That doesn’t make it wrong: those lists hold about 48,000 of SWIFT’s BICs, mostly institutions with an LEI, and SWIFT’s full directory isn’t free. Compare it with where it came from, or ask the bank."
],
"suggestion": "COBADEFF"
}
Errors
A malformed BIC is not an error: it is a reply with status invalid and its problems. HTTP 400 is only for a missing or overlong bic:
{
"errors": {
"bic": "Required: a BIC (SWIFT code) of 8 or 11 characters, like COBADEFFXXX."
}
}
From code
// JavaScript
const res = await fetch('https://supertoolshq.com/api/v1/finance/swift-code-lookup/?' + new URLSearchParams({ bic: 'DEUTDEFF' }));
const data = await res.json();
console.log(data.status, data.institution?.name);
# Python
import json, urllib.parse, urllib.request
data = json.load(urllib.request.urlopen('https://supertoolshq.com/api/v1/finance/swift-code-lookup/?' + urllib.parse.urlencode({'bic': 'MIDLGB22'})))
print(data['status'], data['institution']['name'] if data['institution'] else None) The conventions every API here follows (methods, errors, versions) are in the API overview.