PUBLIC API
IFSC Lookup API Documentation
A free, self-hosted REST API for Indian bank IFSC codes — exact-code lookup, filtered search, and directory reference lists. No API key required. Currently serving 21 branches across 12 banks.
Base URL & Ground Rules
BASE URL: https://weetu.in/api/v1
- All responses share one JSON envelope: {status, message, data, code, error_code?}. status is true exactly for 2xx codes.
- Rate limit: 60 requests per minute per IP shared across the lookup endpoints. POST /auth has its own stricter bucket — 10 attempts per minute per IP (env API_AUTH_RATE_LIMIT). Exceeding either returns 429 with a Retry-After header — back off and retry after that many seconds.
- Security headers on every response: nosniff, X-Frame-Options: DENY, no-referrer, no-store. CORS: open * by default (configurable allow-list on the server).
- Dataset: the official Razorpay IFSC dataset, imported and refreshed by the platform. No fabricated records; unknown codes return a clean "not found", never a guess.
- Honest capacity wording: this is a self-hosted service — there is no third-party per-request quota, but real capacity depends on server resources and the documented rate limits.
Endpoints
| Method | Path | Parameters | Description |
|---|---|---|---|
| GET | /ifsc/{code} | code (path) or ?code= | Exact IFSC lookup. 200 with the record, or 200 with data:null when the code is well-formed but unknown; 400 INVALID_IFSC when malformed. |
| GET | /search | bank, state, city, district, branch, ifsc, q — plus page, limit (max 100) | Filtered prefix search across the directory. All filters optional and combinable. |
| GET | /banks | page, limit | Paged list of banks with branch counts. |
| GET | /states | bank?, page, limit | Paged list of states, optionally scoped to one bank. |
| GET | /cities | bank?, state?, page, limit | Paged list of cities, optionally scoped to bank and/or state. |
| GET | /branches | bank (required), city?, state?, page, limit | Full branch records for a bank, optionally narrowed by city and/or state. |
| GET | /health | — | Service + database connectivity probe. No secrets in the response. |
| GET | / | — | Service metadata: app name, API version and server time. Unauthenticated. |
| POST | /auth | userid, password (JSON or form body) | Member credential verification. 200 with the member record on success, 401 for an unknown member, a wrong password or a blocked account (the same answer for all three, so member IDs cannot be enumerated). No session token is issued — no authenticated API resources exist yet, so a token would authenticate nothing. Limited to 10 attempts/minute per IP. |
Status Codes
| Code | Meaning |
|---|---|
| 200 | Success (including a well-formed but unknown IFSC: data is null) |
| 400 | Malformed input (invalid IFSC format, missing required filter, or a missing userid/password on /auth) |
| 401 | Invalid credentials on /auth (unknown member, wrong password, or blocked account — identical answer) |
| 405 | Wrong HTTP method (only POST is accepted on /auth) |
| 429 | Rate limit exceeded — honor Retry-After |
| 503 | API disabled by the operator, or the directory is temporarily unavailable |
error_code Values
| error_code | When |
|---|---|
| INVALID_IFSC | Code fails the RBI format check |
| MISSING_CREDENTIALS | /auth called without both userid and password (400) |
| INVALID_CREDENTIALS | /auth rejected the member ID or password (401) |
| METHOD_NOT_ALLOWED | Non-POST request to /auth (405) |
| BANK_REQUIRED | /branches called without the bank parameter |
| RATE_LIMITED | Per-IP window exhausted (429) |
| API_DISABLED | Public API switched off by the operator (503) |
| DIRECTORY_UNAVAILABLE | Database unreachable (503) |
Examples
Exact lookup (clean URL)
curl "https://weetu.in/api/v1/ifsc/SBIN0005943"
Success response
{
"status": true,
"message": "IFSC found",
"data": {
"ifsc": "SBIN0005943",
"bank": "STATE BANK OF INDIA",
"branch": "TEST TOWN",
"city": "TEST CITY",
"district": "TEST DISTRICT",
"state": "TEST STATE"
},
"code": 200
}
Filtered search
curl "https://weetu.in/api/v1/search?bank=STATE+BANK&state=JHARKHAND&limit=5"
JavaScript (fetch)
const res = await fetch('https://weetu.in/api/v1/ifsc/SBIN0005943');
const { status, data } = await res.json();
if (status && data) console.log(data.bank, data.branch);
Android (Kotlin, OkHttp)
val req = Request.Builder()
.url("https://weetu.in/api/v1/ifsc/SBIN0005943")
.build()
client.newCall(req).enqueue { resp ->
val json = resp.body?.string() // parse with org.json / Moshi / kotlinx.serialization
}
Questions? Contact support — dataset last refreshed by the platform operations team.