indian-bank-details
v1.0.4
Published
A Node.js package to search and retrieve Indian bank details by IFSC code, city, bank name, and more.
Downloads
333
Maintainers
Readme
Indian Bank Details Lookup
A Node.js library for accessing detailed information about Indian banks. You can easily search for bank details by IFSC code, city, bank name, or any other specific field.
This package is perfect for applications that need to validate bank details, provide a list of banks by location, or fetch bank information for various use cases.
Features
- Search by IFSC code: Retrieve details of a bank branch using its IFSC code.
- Search by city: Get all the banks operating in a specific city.
- Search by bank name: Find all branches of a specific bank.
- Flexible search: Search by any field such as state, district, MICR code, UPI status, etc.
- Optimized for performance: Fast lookups and searches.
Installation
To install the package in your Node.js project, run:
npm install indian-bank-details
Usage
Example
First, import the functions into your project:
const {
getBankDetailsByIFSC,
getBanksByCity,
getBanksByBankName,
getBanksByField
} = require('indian-bank-details');
Function Examples
1. Get Bank Details by IFSC Code
Fetch bank details using the IFSC code. If no match is found, an error message is returned.
const bankDetails = getBankDetailsByIFSC('ABHY0065001');
console.log(bankDetails);
// Output: { status: true, data: <bank_details> }
2. Get Banks by City
Find all the banks in a specific city.
const banksInCity = getBanksByCity('Mumbai');
console.log(banksInCity);
// Output: { status: true, data: [<bank_details>] }
3. Get Banks by Bank Name
Search for all branches of a particular bank.
const banksByName = getBanksByBankName('Abhyudaya Co-operative Bank');
console.log(banksByName);
// Output: { status: true, data: [<bank_details>] }
4. Search by Any Field (Flexible Search)
You can search by any field such as DISTRICT
, STATE
, CITY
, MICR
, RTGS
, IMPS
, UPI
, and more. Here are a few examples:
- Search by District:
const banksByDistrict = getBanksByField('DISTRICT', 'Mumbai');
console.log(banksByDistrict);
// Output: { status: true, data: [<bank_details>] }
- Search by State:
const banksByState = getBanksByField('STATE', 'Maharashtra');
console.log(banksByState);
// Output: { status: true, data: [<bank_details>] }
- Search by RTGS Availability:
const banksByRTGS = getBanksByField('RTGS', true);
console.log(banksByRTGS);
// Output: { status: true, data: [<bank_details>] }
- Search by UPI Availability:
const banksByUPI = getBanksByField('UPI', true);
console.log(banksByUPI);
// Output: { status: true, data: [<bank_details>] }
Available Fields for Flexible Search
The following fields are available for flexible searches:
IFSC
- IFSC code of the bankADDRESS
- Full address of the branchBANK
- Name of the bankBANKCODE
- Bank codeBRANCH
- Branch nameCENTRE
- Central locationCITY
- City where the branch is locatedCONTACT
- Branch contact numberDISTRICT
- District where the branch is locatedIMPS
- Availability of IMPS (Immediate Payment Service)ISO3166
- ISO 3166 country codeMICR
- Magnetic Ink Character Recognition codeNEFT
- Availability of NEFT (National Electronic Funds Transfer)RTGS
- Availability of RTGS (Real-Time Gross Settlement)STATE
- State where the branch is locatedSWIFT
- SWIFT codeUPI
- Availability of UPI (Unified Payments Interface)createdAt
- Timestamp when the record was createdupdatedAt
- Timestamp when the record was last updated
API
getBankDetailsByIFSC(IFSC: string)
Fetch the bank details for a given IFSC code.
- Parameters:
IFSC
: A string representing the IFSC code.
- Returns:
{ status: true, data: <bank_details> }
if the bank is found.{ status: false, error: "No bank found with IFSC code: <IFSC>" }
if no bank is found.
getBanksByCity(city: string)
Get all banks located in the specified city.
- Parameters:
city
: The name of the city (e.g., "Mumbai").
- Returns:
{ status: true, data: [<bank_details>] }
if banks are found.{ status: false, error: "No banks found in the city: <city>" }
if no banks are found.
getBanksByBankName(bankName: string)
Get all branches of the specified bank.
- Parameters:
bankName
: The name of the bank (e.g., "Abhyudaya Co-operative Bank").
- Returns:
{ status: true, data: [<bank_details>] }
if banks are found.{ status: false, error: "No banks found with the name: <bankName>" }
if no banks are found.
getBanksByField(field: string, value: any)
Search for banks by any given field (e.g., city, state, RTGS, UPI, etc.).
- Parameters:
field
: The field to search by (e.g., "DISTRICT", "STATE", "UPI").value
: The value to search for (e.g., "Mumbai",true
).
- Returns:
{ status: true, data: [<bank_details>] }
if banks are found.{ status: false, error: "No banks found for <field>: <value>" }
if no banks are found.
License
This project is licensed under the MIT License - see the LICENSE file for details.
### Key Points
1. Installation: Describes how to install your package using npm.
2. Usage: Provides clear, actionable examples for developers on how to use the functions.
3. API: Describes each function and its parameters, as well as the return values.
4. Fields: Lists all the available fields that users can use for flexible searches.
5. Contributing: Provides instructions on how others can contribute to the project.
6. Badges: Includes NPM version and license badges at the top of the README for better visibility on NPM.