SWIFT Code API

The SWIFT Code API allows you to find the SWIFT Code(s) for any bank in the world. Our database contains hundreds of thousands of different bank branches and on file.

/v1/swiftcode GET

https://api.api-ninjas.com/v1/swiftcode

Returns a list of bank information (including SWIFT Code) that match the input parameter. Returns at most 100 results.


Parameters

At least one of the parameters below must be set.

  • swift  optional

    The SWIFT Code of the bank to look up.

  • bank  optional premium only

    The name of the bank to look up. This parameter supports partial matching (e.g., Silicon Valley will match Silicon Valley Bank).

  • city  optional

    Name of the city in which the bank is located.

  • country  optional

    ISO 3166 2-letter country code of the bank's country.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

  • bank_name premium only

    The full official name of the bank.

  • city

    The city where the bank branch is located.

  • region

    The region where the bank branch is located.

  • country

    The full name of the country where the bank is located.

  • country_code

    The ISO 3166 2-letter country code.

  • swift_code

    The SWIFT/BIC code for the bank branch.

Sample Request Live Demo!

swift
https://api.api-ninjas.com/v1/swiftcode?swift=BOFAUS3N

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
1 2 3 4 5 6 7 8 9 10 [ { "bank_name": "Bank of America, N.A.", "city": "New York", "region": "NY", "country": "United States", "country_code": "US", "swift_code": "BOFAUS3N" } ]

Code Examples

1 2 3 4 5 6 7 8 9 10 import requests swift = 'BOFAUS3N' api_url = 'https://api.api-ninjas.com/v1/swiftcode?swift={}'.format(swift) response = requests.get(api_url, headers={'X-Api-Key': 'YOUR_API_KEY'}) if response.status_code == requests.codes.ok: print(response.text) else: print("Error:", response.status_code, response.text)

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.