Consuming RESTful API to get Bank Details using IFSC code in C#

Consume Bank details using IFSC code -


Suppose If you assigned the task to write code to get bank details using IFSC code. Details may be Bank name, IFSC code, MICR(Magnetic Ink Character Recognition), Branch, Address, Contact, City, District, and State. What you’ll do ?

All bank IFSC codes are regularly updated on RBI website, you can download in Excel sheet and rearrange it. and the same can be used in your website but this is not an easy task to gather such a large data and integrate into your database to get details. So you just need only a RESTful API to accomplish this task but unfortunately, there is no such API which can provide updated details.  IFSC codes are obtained from different banks by RBI  every month, new banks branches are going to add every time. so technically its very hard to maintain the all bank IFSC list.

You can try Datayuge IFSC Code API. Their database is weekly updated and service is free without any restriction.

How to Consume API :

In order to consume the API, you need an API Key (get the API key here)
Once you register, you’ll get API there in the dashboard, containing the key.

API Root :
Example Request Route #1:{IFSC_CODE}
Request Type: GET
API Authentication Header : DY-X-Authorization: {API KEY}
Response Type: JSON
Sample Response:

get Bank Details using IFSC code
get Bank Details using IFSC code

Let test this API first using Fiddler. Follow steps described in below image.

Using the C# Code :

In this tip, I will show you the consumption of RESTful API in client applications.
I found RESTful API which is running online. I tried to consume that live service in the console application.
Code to consume JSON data of bank details after passing IFSC Code

It will print – {“bank”:”Abhyudaya Cooperative Bank Limited”,”ifsc”:”ABHY0065001″,”micr”:”400065001″,”branch”:”Rtgs-Ho”,”address”:”Abhyudaya Bank Bldg-, B-No-71, Nehru Nagar, Kurla (e), Mumbai-400024″,”contact”:”25260173E7″,”city”:”Greater Mumbai”,”district”:”Mumbai”,”state”:”Maharashtra”}

But this is JSON Data and you may want to convert it into object so you can print each record as per your need. To accomplish that you have to Deserialize JSON Data. Ok Fine! but how to do ?

Create a class and have all the required properties that you want to consume from API.

Now, Add Newtonsoft.Json package in your application and write code given below to parse JSON data to appropriate property of BankDet class.

Complete Code :

Output :

About Ravi Ranjan Kumar 32 Articles
An Indian who Living, Loving & Learning Technology with different tastes and willing to share knowledge and thoughts.


  1. Its really a good to know we have this api and it helped us a lot .
    Do we have the reverse formula for this getting the IFC code from the bank details .

  2. Thanks for letting me know about this service. I was looking for such service where I can get basic details using IFSC code.

Leave a Reply