Metadata
Dataset and API
Version, counts and import status for the active snapshot, plus the endpoints used by this console.
Snapshot
Import metadata stored alongside the dataset.
2026-10-19-dhaka-thanas
Imported19 Oct 2026, 01:15
Loaded into memory19 Oct 2026, 08:20
Snapshot version
2026-10-19-dhaka-thanasRecord counts
Current snapshot composition.
5,156 total
- Divisions
- 8
- Districts
- 64
- Upazilas
- 544
- Unions
- 4,540
- Post offices
- 0
API surface
The console talks to these endpoints through a same-origin Next.js rewrite.
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/divisions | Paginated divisions, sorted by name. |
| GET | /api/v1/districts | Districts with optional cursor pagination. |
| GET | /api/v1/upazilas | Upazilas and thanas under each district. |
| GET | /api/v1/unions | Unions under each upazila. |
| GET | /api/v1/post-offices | Postal offices, when present in the dataset. |
| GET | /api/v1/:resource/:code | Resolve a single record by its stable code. |
| GET | /api/v1/search?q=…&type=… | Search names, aliases and codes. |
| GET | /api/v1/hierarchy?depth=2 | Nested tree from divisions down to unions. |
| GET | /api/v1/meta/dataset | Dataset version, counts and import status. |
| GET | /api/v1/openapi.json | Machine-readable OpenAPI document. |
Request examples
Point the base URL at the API service.
curl
API_URL="http://localhost:4000"
curl "$API_URL/api/v1/divisions?limit=5"
curl "$API_URL/api/v1/search?q=dhaka&type=district"
curl "$API_URL/api/v1/hierarchy?depth=3"
curl "$API_URL/api/v1/meta/dataset"Response envelope
Lists include pagination metadata; single records return data only.
JSON
{
"status": "success",
"data": [
{
"code": "D-13",
"name": "Dhaka",
"bn_name": "ঢাকা",
"divisionCode": "BD-13",
"deprecated_at": null
}
],
"meta": {
"limit": 5,
"hasMore": true,
"nextCursor": "eyJ..."
}
}