@abdurrahmanbd/bd-institution-list
v1.1.0
Published
Comprehensive, fast, TypeScript-native NPM package for all Bangladeshi educational institutions (Schools, Colleges, Universities, Madrashas). Support O(1) EIIN lookup, search, and category filters.
Maintainers
Readme
@abdurrahmanbd/bd-institution-list
I built this package because I needed a quick way to look up Bangladeshi educational institutions by their EIIN number in a project I was working on, and I couldn't find anything good on npm. So I put together a clean, typed dataset of 32,000+ schools, colleges, universities, and madrashas and wrapped it in a simple API.
The EIIN lookup is O(1) because the data is pre-indexed into a Map at build time. No network calls, no database — everything runs in memory on the client side.
What's in the box
- O(1) EIIN lookup — pass an EIIN number, get the institution back instantly. It uses a pre-built Map under the hood so there's no iteration.
- Bilingual & Location Search — search by institution name, short name (
BUET), district, division, upazila, or EIIN. Case-insensitive, handles partial matches. - 32,000+ institutions — schools (bangla & english medium), colleges, public & private universities, national universities, aliya & qawmi madrashas.
- ESM + CJS — works with both
importandrequire. Ships with.d.tsfiles so you get full autocomplete in your editor. - No dependencies — just install and use. Nothing else to set up.
Install
npm install @abdurrahmanbd/bd-institution-listor if you prefer pnpm/yarn:
pnpm add @abdurrahmanbd/bd-institution-list
# or
yarn add @abdurrahmanbd/bd-institution-listUsage
With ES Modules
import {
searchInstitutes,
getInstituteByEiin,
getUniversities,
getSchools,
getColleges,
getMadrashas,
} from "@abdurrahmanbd/bd-institution-list";
// search by name
const results = searchInstitutes("BUET");
// O(1) lookup by EIIN
const school = getInstituteByEiin(100003);
// => { eiin: 100003, name: "DAKSHIN KATHALIA TAZEM ALI SECONDARY SCHOOL", institutionType: "school", version: "bangla" }
// grab all public universities
const publicUnis = getUniversities({ category: "public" });
// english medium schools only
const englishSchools = getSchools({ version: "english" });
// all madrashas (aliya + qawmi)
const madrashas = getMadrashas();With CommonJS
const {
searchInstitutes,
getInstituteByEiin,
getUniversities,
} = require("@abdurrahmanbd/bd-institution-list");
const results = searchInstitutes("Dhaka College");Subpath Exports (Optimized Import Size)
For smaller bundle sizes, import only the specific datasets you need:
// Import only universities (~0.13 kB entry, shared data chunk)
import { getUniversities, publicUniData, privateUniData, nuUniData }
from "@abdurrahmanbd/bd-institution-list/universities";
// Import only schools
import { getSchools, schoolData, englishMediumData }
from "@abdurrahmanbd/bd-institution-list/schools";
// Import only colleges
import { getColleges, collegeData }
from "@abdurrahmanbd/bd-institution-list/colleges";
// Import only madrashas (aliya + qawmi data, getMadrashas function)
import { getMadrashas, madrashaData, qawmiMadrashaData }
from "@abdurrahmanbd/bd-institution-list/madrashas";API
searchInstitutes(query, options?)
Search institutions by name (English/Bengali), location (district, division, upazila), short name, or EIIN. Results are ranked: exact matches first, then startsWith, then contains.
searchInstitutes("ঢাকা", { type: "college", limit: 10 });
searchInstitutes("Sylhet", { type: "university" });
searchInstitutes(100003); // search by EIIN as a numbergetInstituteByEiin(eiin)
Look up a single institution by its EIIN number. Returns the institution or undefined. This is O(1) — direct Map lookup, not a scan.
const inst = getInstituteByEiin(100015);getInstitutesByEiins(eiins)
Bulk lookup by a list of EIIN numbers. Each lookup is O(1). Returns only found institutions (missing EIINs are silently skipped).
const list = getInstitutesByEiins([100003, 100015, 100027]);getAllInstitutes(options?)
Get all institutions. Pass filter options to narrow down, and paginate with page and limit.
const firstPage = getAllInstitutes({ page: 1, limit: 50 });
const dhakaColeges = getAllInstitutes({ type: "college", district: "Dhaka" });getSchools(options?)
Get all schools (bangla medium, english medium). Supports filtering by version.
const banglaSchools = getSchools({ version: "bangla" });
const englishSchools = getSchools({ version: "english" });getColleges(options?)
Get all colleges in Bangladesh.
const colleges = getColleges({ limit: 20 });getUniversities(options?)
Get all universities — public, private, national. Filter by category or department.
const medicalUnis = getUniversities({ category: "public", department: "medical" });
const privateUnis = getUniversities({ category: "private" });getMadrashas(options?)
Get all madrashas — both Aliya and Qawmi. Supports all standard filter options.
const allMadrashas = getMadrashas();
const dhakaM = getMadrashas({ district: "Dhaka", limit: 20 });getInstitutesByDistrict(district, type?)
Shorthand for filtering by district name. Optionally restrict to a specific institution type.
const sylhetSchools = getInstitutesByDistrict("Sylhet", "school");
const allInChittagong = getInstitutesByDistrict("Chittagong");getInstitutesByDivision(division, type?)
Shorthand for filtering by division name.
const dhakaDiv = getInstitutesByDivision("Dhaka", "university");getInstitutesByUpazila(upazila, type?)
Shorthand for filtering by upazila name.
const mirpurSchools = getInstitutesByUpazila("Mirpur", "school");countInstitutes(options?)
Count institutions matching optional filter options. Useful when you need the total without fetching all records.
countInstitutes(); // 32544 — total
countInstitutes({ type: "university" }); // all universities
countInstitutes({ type: "school", district: "Dhaka" }); // schools in DhakagetAllDistricts(type?)
Get a sorted list of all unique district names present in the dataset. Optionally restrict to one institution type.
const districts = getAllDistricts(); // all districts
const uniDistricts = getAllDistricts("university"); // only where unis existgetAllDivisions(type?)
Get a sorted list of all unique division names present in the dataset.
const divisions = getAllDivisions();Filter Options
All getter functions accept an optional filter object:
{
type?: "school" | "college" | "university" | "madrasha";
version?: "bangla" | "english" | "arabic"; // schools & madrashas
category?: "public" | "private" | "national"; // universities
department?: "general" | "engineering" | "medical" | "agricultural" | "textile" | "dental";
district?: string; // case-insensitive substring match
division?: string; // case-insensitive substring match
upazila?: string; // case-insensitive substring match
limit?: number; // max records to return (default: all)
page?: number; // 1-indexed page number (works with limit)
}Note on location data:
district,division, andupazilafiltering works fully for universities and madrashas. Schools and colleges currently have limited location data in the dataset — location filters may return fewer results for those types.
Data Coverage
| Dataset | Records | |---|---| | Bangla Medium Schools | 19,302 | | Aliya Madrashas | 9,358 | | National University Colleges | 2,295 | | Private Universities | 208 | | Colleges | 896 | | Public Universities | 107 | | Qawmi Madrashas | 260 | | English Medium Schools | 118 | | Total | 32,544 |
Contributing
If you find any missing institutions or incorrect data, feel free to open an issue or send a PR.
Note: This repository is currently set to private. If you'd like to contribute, please reach out to me first so I can grant you access — Abdur Rahman.
License
MIT — Abdur Rahman
