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.

  • bank  optional

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

  • swift  optional

    The SWIFT Code of the bank to look up.

  • 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.

Sample Request Live Demo!

bank
https://api.api-ninjas.com/v1/swiftcode?bank=Silicon Valley Bank

Sample Response

JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [ { "bank_name": "Spd Silicon Valley Bank Co. Ltd", "city": "Shanghai", "country": "China", "country_code": "CN", "swift_code": "SSVBCNSH" }, { "bank_name": "Silicon Valley Bank", "city": "Santa Clara,Ca", "country": "United States", "country_code": "US", "swift_code": "SVBKUS6A" }, { "bank_name": "Silicon Valley Bank", "city": "Santa Clara,Ca", "country": "United States", "country_code": "US", "swift_code": "SVBKUS6S" }, { "bank_name": "Silicon Valley Bank", "city": "Santa Clara,Ca", "country": "United States", "country_code": "US", "swift_code": "SVBKUS6SIBO" }, { "bank_name": "Silicon Valley Bank", "city": "Santa Clara,Ca", "country": "United States", "country_code": "US", "swift_code": "SVBKUS6SMCA" }, { "bank_name": "Silicon Valley Bank", "city": "London", "country": "United Kingdom", "country_code": "GB", "swift_code": "SVBKGB2L" } ]

Code Examples

1 2 3 4 5 6 7 8 9 10 import requests bank = 'Silicon Valley Bank' api_url = 'https://api.api-ninjas.com/v1/swiftcode?bank={}'.format(bank) 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.