@abdurrahmanbd/bd-institution-list

中文文档
1.1.0发布于 2026/08/12MITTypeScriptESM + CJS近 30 天下载 2884

Comprehensive, fast, TypeScript-native NPM package for all Bangladeshi educational institutions (Schools, Colleges, Universities, Madrashas). Support O(1) EIIN lookup, search, and category filters.

原始使用文档
文档目录25 节
  1. What's in the box
  2. Install
  3. Usage
  4. With ES Modules
  5. With CommonJS
  6. Subpath Exports (Optimized Import Size)
  7. API
  8. searchInstitutes(query, options?)
  9. getInstituteByEiin(eiin)
  10. getInstitutesByEiins(eiins)
  11. getAllInstitutes(options?)
  12. getSchools(options?)
  13. getColleges(options?)
  14. getUniversities(options?)
  15. getMadrashas(options?)
  16. getInstitutesByDistrict(district, type?)
  17. getInstitutesByDivision(division, type?)
  18. getInstitutesByUpazila(upazila, type?)
  19. countInstitutes(options?)
  20. getAllDistricts(type?)
  21. getAllDivisions(type?)
  22. Filter Options
  23. Data Coverage
  24. Contributing
  25. License

@abdurrahmanbd/bd-institution-list

npm version license

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.

Live Demo & Playground →


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 import and require. Ships with .d.ts files 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-list

or if you prefer pnpm/yarn:

pnpm add @abdurrahmanbd/bd-institution-list
# or
yarn add @abdurrahmanbd/bd-institution-list

Usage

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 number

getInstituteByEiin(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 Dhaka

getAllDistricts(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 exist

getAllDivisions(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, and upazila filtering 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

DatasetRecords
Bangla Medium Schools19,302
Aliya Madrashas9,358
National University Colleges2,295
Private Universities208
Colleges896
Public Universities107
Qawmi Madrashas260
English Medium Schools118
Total32,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

版本与发布记录

@abdurrahmanbd/bd-institution-list 共发布 9 个版本,首次发布于 2026/08/09;过去 12 个月发布了 9 个版本。

版本发布日期距今
1.1.0latest2026/08/122 个月前
1.0.72026/08/102 个月前
1.0.62026/08/102 个月前
1.0.52026/08/092 个月前
1.0.42026/08/092 个月前
1.0.32026/08/092 个月前

关于 @abdurrahmanbd/bd-institution-list 的常见问题

@abdurrahmanbd/bd-institution-list 是什么?

Comprehensive, fast, TypeScript-native NPM package for all Bangladeshi educational institutions (Schools, Colleges, Universities, Madrashas). Support O(1) EIIN lookup, search, and category filters.

如何安装 @abdurrahmanbd/bd-institution-list?

在项目目录运行 npm install @abdurrahmanbd/bd-institution-list,或使用 pnpm add / yarn add / bun add。

@abdurrahmanbd/bd-institution-list 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@abdurrahmanbd/bd-institution-list 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@abdurrahmanbd/bd-institution-list 可以商用吗?

@abdurrahmanbd/bd-institution-list 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@abdurrahmanbd/bd-institution-list 的下载量有多少?

根据 npm 官方下载统计,@abdurrahmanbd/bd-institution-list 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,884 次,日均约 96 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@abdurrahmanbd/bd-institution-list 还在维护吗?

最新版本 1.1.0 发布于 2026/08/12(2 个月前);至今共发布 9 个版本,其中过去 12 个月发布了 9 个;首次发布于 2026/08/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。