{"id":26583,"date":"2022-04-08T23:31:41","date_gmt":"2022-04-08T18:01:41","guid":{"rendered":"https:\/\/python-programs.com\/?p=26583"},"modified":"2022-04-08T23:31:41","modified_gmt":"2022-04-08T18:01:41","slug":"how-to-find-bank-branch-name-from-ifsc-code-in-python","status":"publish","type":"post","link":"https:\/\/python-programs.com\/how-to-find-bank-branch-name-from-ifsc-code-in-python\/","title":{"rendered":"How to Find Bank Branch Name from IFSC Code in Python?"},"content":{"rendered":"
What is an IFSC Code?<\/strong><\/p>\n The IFSC is an abbreviation for Indian Financial System Code is an 11-digit alpha-numeric code that is used to uniquely classify bank branches within the National Electronic Fund Transfer (NEFT) network by the Central Bank.<\/p>\n Let us now see how to retrieve bank information from an IFSC code.<\/p>\n Python, as you are aware, has a variety of modules and libraries that may be used to execute a variety of tasks. Here, we use Python’s requests<\/strong> module. The details are asked from Razorpay.<\/p>\n In Python, we may send HTTP requests by utilizing the requests module. The HTTP request returns data according to it.<\/p>\n Before we work with this module we use should first install it on our system as shown below.<\/p>\n Installation:<\/strong><\/p>\n State\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0District\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Branch\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0IFSC Code<\/strong><\/p>\n KARNATAKA\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0BANGALORE\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 URBAN BANGALORE CITY\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0SIBL0000008<\/p>\n TAMIL NADU\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 VELLORE\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0ARKONAM\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0SIBL0000004<\/p>\n KERALA\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ERNAKULAM\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 MATTANCHERRY\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0SIBL0000018<\/p>\n MAHARASHTRA\u00a0 \u00a0 \u00a0 GREATER BOMBAY\u00a0 \u00a0 \u00a0MUMBAI BANDRA\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0SIBL0000157<\/p>\n TELANGANA\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ADILABAD\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0MANCHERIAL\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0SIBL0000867<\/p>\n Approach:<\/strong><\/p>\n Below is the implementation:<\/strong><\/p>\n Output:<\/strong><\/p>\n What is an IFSC Code? The IFSC is an abbreviation for Indian Financial System Code is an 11-digit alpha-numeric code that is used to uniquely classify bank branches within the National Electronic Fund Transfer (NEFT) network by the Central Bank. Let us now see how to retrieve bank information from an IFSC code. Python, as …<\/p>\npip install requests<\/pre>\n
The IFSC codes for some of the states<\/h3>\n
Finding Bank Branch Name from IFSC Code in Python<\/h2>\n
\n
# Import requests module using the import keyword\r\nimport requests \r\n\r\n# Give the URL of razorpay to send HTTP request and store it in a variable.\r\ngvn_url = \"https:\/\/ifsc.razorpay.com\/\"\r\n\r\n# Give the IFSC code as user input using the input() function and\r\n# store it in a variable.\r\ngvn_IFSCcocde = input(\"Enter some random IFSC code: \")\r\n\r\n# Add both the above given razorpay Url and IFSC code to request HTTP and \r\n# store it in another variable\r\nrslt_url = gvn_url + gvn_IFSCcocde\r\n\r\n# Pass the above result url to the get() function and apply json() function\r\n# for the result of the get() function\r\n# Here, the.json() function is used to transmit data in webpages to json format\r\n# allowing for well-structured output.\r\nretrivedata = requests.get(rslt_url).json()\r\n\r\n# Print the bank, branch names using the above json data by passing the keys as BANK and BRANCH.\r\n# Here, all the details are stored as key-value pairs.\r\nbank_name = retrivedata['BANK']\r\nbranch_name = retrivedata['BRANCH']\r\nprint(bank_name, branch_name)<\/pre>\n
Enter some random IFSC code: SIBL0000008\r\nSouth Indian Bank BANGALORE CITY<\/pre>\n","protected":false},"excerpt":{"rendered":"