A blazing fast, open-source REST API for accessing up-to-date administrative and geographical data of Bangladesh, including all divisions, districts, and upazilas (sub-districts). Ideal for developers building location-based apps, data explorers, or mapping tools.
- All Bangladesh Geo Data: Divisions, districts, upazilas (495), unions (4550+ as of 2025)
- Filter Support: Get districts by division, upazilas by district, unions by upazila
- Bilingual: English and Bengali names for all entities
- Developer Friendly: Clean JSON responses, CORS enabled
- Performance: Built-in caching, rate limiting, and monitoring
- Live API Explorer UI: Test endpoints instantly in your browser
- Open Source: Free for personal and commercial use
All endpoints are prefixed with /geo/v2.0
.
Endpoint | Description |
---|---|
/geo/v2.0/divisions |
Get all divisions |
/geo/v2.0/districts |
Get all districts |
/geo/v2.0/districts/{division} |
Get districts by division with ID |
/geo/v2.0/upazilas |
Get all upazilas (495 upazilas as of 2025) |
/geo/v2.0/upazilas/{district} |
Get upazilas by district with ID |
/geo/v2.0/unions/{upazila} |
Get unions by upazila with ID |
/geo/v2.0/search/{query} |
Search divisions, districts, or upazilas |
Get all districts in the "Mymensingh" division:
GET /geo/v2.0/districts/8
Get all upazilas in the "Jamalpur" district:
GET /geo/v2.0/upazilas/63
Search for upazilas containing "jamal":
GET /geo/v2.0/search/jamal?type=upazilas
bd-apis/
├── public/ # Frontend (API Explorer UI)
│ ├── index.html
│ └── style.css
├── src/
│ ├── database/ # Data files (JSON, JS)
│ │ ├── data.js
│ │ └── json data
│ └── routes/
│ │ └── geo/
| │ ├── geo # v1 API routes
│ │ └── geo-v2.js # v2 API routes
│ └── config/
│ └── indexes.js # MongoDB indexes
├── index.js # Express server entry point
├── package.json
├── OPTIMIZATION.md # Performance & deployment tips
└── README.md
- All geo data is included in
src/database/
. - Data includes both English and Bengali names.
- Upazila data is updated to include all 495 upazilas of Bangladesh.
- Union data is updated to include all 4550+ unions of Bangladesh.
- Built with Express.js and MongoDB
- Caching with node-cache and optional Redis
- Rate limiting, monitoring, and health endpoints included
- See
OPTIMIZATION.md
for best practices and troubleshooting