Endpoint
| Method | GET |
| URL | https://swiftcodecheck.com/api/swift/{code} |
| Auth | None, no API key required |
| Rate limit | 500 requests / day / IP (see X-RateLimit-Remaining header) |
| CORS | Access-Control-Allow-Origin: *, call it straight from the browser |
| Caching | Responses cacheable for 24h (Cache-Control: max-age=86400) |
Example Request
| curl | curl https://swiftcodecheck.com/api/swift/DEUTDEFF |
| JavaScript | const r = await fetch('https://swiftcodecheck.com/api/swift/DEUTDEFF').then(r => r.json()); |
| PHP | $r = json_decode(file_get_contents('https://swiftcodecheck.com/api/swift/DEUTDEFF'), true); |
| Python | r = requests.get('https://swiftcodecheck.com/api/swift/DEUTDEFF').json() |
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | true when the code was found |
data.swift_code | string | The matched code (canonical form) |
data.bank | string | Bank / institution name |
data.branch | string | Branch name (empty = head office) |
data.city / data.country / data.country_code | string | Location details |
data.bank_code / location_code / branch_code | string | Code structure breakdown |
data.head_office | boolean | Whether this is a head office code |
page | string | Human-readable page for this code |
Errors use standard status codes: 400 invalid format, 404 code not in the dataset (with valid_format: true so you can still treat it as structurally valid), 429 daily limit reached.
Fair Use & Attribution
- 500 requests per day per IP. Responses are cacheable for 24 hours, so cache on your side and the quota goes a long way.
- Data comes from an openly licensed (MIT) dataset of 112,000+ codes; a link back to swiftcodecheck.com is appreciated but not required.
- Always advise your users to verify codes with the receiving bank before transferring money.
Frequently Asked Questions
Is the API really free?
Yes. No key, no registration, up to 500 requests/day per IP, CORS enabled for direct browser use.
Can I validate codes that aren't in the dataset?
Yes. A 404 response with valid_format: true means the code is structurally valid ISO 9362 but not in our directory. Treat it as "format OK, existence unverified".
Can I test it right now?
Try /api/swift/DEUTDEFF in your browser, or check CHASUS33 and HBUKGB4B on the site.