BankPAI is a FastAPI-powered REST API for retrieving branch details of Indian banks using IFSC codes and search queries. It is backed by a SQLite database (indian_banks.db) and provides endpoints for getting branch information, searching by city, and more.
🔗 https://bankbranchapi.onrender.com
- Get branch details using IFSC code
- Search branches by city or with pagination
- Filter results by city with limit and offset
- Clean and minimal JSON responses
- Fully tested using Pytest
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Welcome homepage |
| GET | /branches/ |
Get branch List |
| GET | /branches/{ifsc_code} |
Get branch details by IFSC |
| GET | /branches?city=MUMBAI |
Search branches by city |
| GET | /branches?limit=10&offset=0 |
Paginated branches list |
| GET | /branches?city=MUMBAI&limit=10 |
Combined filters |
git clone https://github.com/yourusername/bankbranchapi.git
cd bankbranchapipip install -r requirements.txtPlace indian_banks.db inside the root or app directory (where the code looks for it).
uvicorn app.main:app --reloadSwagger UI:
http://127.0.0.1:8000/docsRoot Page:
http://127.0.0.1:8000/ Tests are located in the bankbranchapi/tests/test_api.py
cd bankbranchapipython -m pytest tests/test_api.pyThe API is hosted on Render using Gunicorn + Uvicorn workers.
Home Page - https://bankbranchapi.onrender.com
Branch List - https://bankbranchapi.onrender.com/branches
Branch by IFSC Code - https://bankbranchapi.onrender.com/branches/ABHY0065001
Branches by city - https://bankbranchapi.onrender.com/branches?city=MUMBAI
Paginated Branches list - https://bankbranchapi.onrender.com/branches?limit=10&offset=0
Combined filters - https://bankbranchapi.onrender.com/branches?city=MUMBAI&limit=10
For queries or contributions, feel free to open an issue or a pull request.