SWIFT/BIC Code API - Look Up Bank Details or Find Codes by Country, Bank & City
The SWIFT/BIC Code API resolves any 8- or 11-character SWIFT/BIC code into a full bank record in a single call, and lets you search for codes by country, bank, and city when you don't have one yet. Lookups return the bank name, branch address, city, and country behind a code; the Finder walks the hierarchy of countries, banks, and branch cities so you can surface the exact code for a destination. It's built for payment engineers, fintech developers, and treasury teams validating beneficiary banks before money moves.
Features
Resolve a Code to Full Bank Details
Send any SWIFT/BIC code to the Lookup service and get a structured bank record back:swiftCode, bankName, bankCode, bankAddress, city, country, and countryCode. The bankCode isolates the institution's four-character prefix, so you can group branches under one bank without string-parsing the full code. Use it for confirming recipient bank details on a wire before you submit the payment instruction.Accepts 8- and 11-Character Codes
The Lookup service accepts both the 8-character institution code and the full 11-character code that includes a branch suffix, and returns the same structured record either way. You don't need to normalise input length before calling - pass the code exactly as a user entered it. Use it for checkout and onboarding forms where customers paste codes in whichever format their bank gave them.
Validate Before You Pay
Every Lookup verifies that the code exists against a maintained bank database and returns an error for codes that don't resolve, so an invalid or mistypedswiftCode is caught before it reaches your payment rail. Combine the result with your own checks to reject bad beneficiary data at entry. Use it for pre-submission validation in accounts-payable and remittance flows where a failed transfer is expensive to reverse.Hierarchical Bank Search (Finder)
The Finder service returns codes by drilling through four levels: all supported countries, then banks within acountry, then branch cities for a bank, then every SWIFT/BIC code for a city. Each step returns a clean array you can bind straight to a dropdown. Use it for building a bank-and-branch selector at checkout so users pick their bank instead of typing a code they may not have.List Every Supported Country
Call the Finder with no parameters to retrieve the full list of countries where SWIFT/BIC data is available - and this request costs 0 credits. Use the response to populate a country selector before the rest of the search runs, or to confirm coverage for a market during integration without spending against your balance.
Worldwide Bank Coverage
Both services draw on bank records spanning major financial institutions across countries and regions worldwide, returning the samebankName, bankAddress, and bankCode structure regardless of the destination country. Use it for payment products that route internationally and need consistent, parseable bank data for any corridor rather than per-country special cases.Built for These Use Cases
Beneficiary validation for wire transfers
Before a cross-border payment is submitted, resolve the recipient's code to a real bank record and confirm the name and location match what the customer entered. Catching a wrong or mistyped code at this stage prevents a payment from being returned days later with fees attached.
Bank-and-branch selectors at checkout
Instead of asking customers to type a code they rarely know, let them pick their country, then their bank, then their branch city, and resolve the code for them behind the scenes. The Finder's step-by-step responses map directly onto cascading dropdowns, which cuts input errors on payment and payout forms.
Pre-submission checks in accounts payable and treasury
Run incoming vendor bank details through a lookup as part of onboarding or invoice approval, so codes are verified once and stored clean. Pair this with the IBAN Validation API to validate the account number and its embedded bank code in the same workflow.Fintech onboarding and KYC
When a user adds an international bank account, confirm the bank behind the code and capture a consistent name and address for your records. For businesses, combine bank verification with the VAT Number Validation API to check a counterparty's tax registration in the same onboarding step.Treasury and reconciliation systems
Enrich payment files and statements with structured bank names and locations so reconciliation can match transactions to institutions without manual lookups.
API Endpoints
SWIFT/BIC Code Lookup
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v1.0/swift-code/lookup?swiftCode=WFBIUS6T"
payload = {}
headers = {
'X-apiKey': 'API-KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
SWIFT/BIC Code Finder
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v1.0/swift-code/finder?country=United+States"
payload = {}
headers = {
'X-apiKey': 'API-KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
How to Guides
Find SWIFT Code for a Specific Bank Branch
Navigate through the hierarchy of countries, banks, and cities to locate the exact SWIFT code for any bank branch worldwide.
Step 1: Get all available countries
# Response [ "Albania", "Andorra", "Argentina", "Armenia", "Australia", . . . ]curl -X 'GET' 'https://api.apifreaks.com/v1.0/swift-code/finder?apiKey=API-KEY'
Step 2: Select a country and get all banks
# Response [ "1ST CAPITAL LENDING FUND INC.", "1ST STATE BANK, INC.", "3M COMPANY", "3M HEALTH CARE COMPANY", "4086 ADVISORS, INC.", . . . ]curl -X 'GET' 'https://api.apifreaks.com/v1.0/swift-code/finder?apiKey=API-KEY&country=United%20States'
Step 3: Select a bank and get all branch cities
# Response [ "CHARLOTTE", "CHICAGO", "JERSEY CITY", "NEW YORK" ]curl -X 'GET' 'https://api.apifreaks.com/v1.0/swift-code/finder?apiKey=API-KEY&country=United%20States&bank=BANK%20OF%20AMERICA%20CORPORATION'
Step 4: Select a city and get all SWIFT codes
# Response [ "MLCOUS33GFX", "MLCOUS33MFM", "MLCOUS33PBG", "MLCOUS3BFUT", "MLCOUS3GATL", . . . ]curl -X 'GET' 'https://api.apifreaks.com/v1.0/swift-code/finder?apiKey=API-KEY&country=United%20States&bank=BANK%20OF%20AMERICA%20CORPORATION&city=NEW%20YORK'
Verify Bank Details Using SWIFT Code
Look up complete bank information using any SWIFT/BIC code to verify recipient details before processing international transfers.
# Response { "countryCode": "US", "swiftCode": "MLCOUS3GCA2", "bankAddress": "101 HUDSON STREET, FLOOR 18", "bankCode": "MLCO", "bankName": "BANK OF AMERICA CORPORATION", "city": "NEW YORK", "country": "United States" }curl -X 'GET' 'https://api.apifreaks.com/v1.0/swift-code/lookup?apiKey=API-KEY&swiftCode=MLCOUS3GCA2'
Handle Invalid Codes and Errors
A code that doesn't resolve returns a 4xx response instead of a bank record, and no credits are charged for it. Check the status before reading the body, and surface the message to the user so they can correct the code.
# Example error response { "message": "Bad request: SWIFT code input must be either 8 characters or 11 characters" }curl -X 'GET' 'https://api.apifreaks.com/v1.0/swift-code/lookup?apiKey=API-KEY&swiftCode=INVALID00'
Frequently Asked Questions
swiftCode, bankName, bankCode, bankAddress, city, country, and countryCode. The bankCode is the four-character institution prefix shared by all branches of that bank.Pricing
To use the SWIFT/BIC Code Lookup & Finder APIs, API credits are required. Charges apply only for successful queries, indicated by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits previously charged will be refunded.
- SWIFT/BIC Code Lookup: For each successful request, 20 credits will be charged.
- SWIFT/BIC Code Finder: Credit consumption varies based on parameters:
- No parameters (list all countries): 0 credits
- Country parameter only (list banks in country): 5 credits
- Country + Bank parameters (list cities for bank): 5 credits
- Country + Bank + City parameters (list SWIFT codes): 10 credits
Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.