This API provides location data such as divisions, districts, upazilas, unions, and villages. It supports both authorized dependent dropdown fetching and public name retrieval for a specific ID.
Endpoint:
GET https://makobir.com.bd/location/get/{type}/{parent_id}
| Type | Description | parent_id Meaning |
|---|---|---|
| divisions | All divisions | N/A (can be 0/null) |
| districts | Districts of a division | Division ID |
| upazilas | Upazilas of a district | District ID |
| unions | Unions of an upazila | Upazila ID |
| villages | Villages of a union | Union ID |
X-API-KEY: your_api_key
X-API-DOMAIN: your_website.comcurl -H "X-API-KEY: abcd1234" -H "X-API-DOMAIN: example.com" https://makobir.com.bd/location/get/districts/1{
"status": true,
"data": [
{"id": 1, "name_en": "Dhaka", "name_bn": "ঢাকা"},
{"id": 2, "name_en": "Gazipur", "name_bn": "গাজীপুর"}
]
}No API key required — allows client systems to retrieve a single location name based on type and ID.
Endpoint:
GET https://makobir.com.bd/location/names/{type}/{id}
- division
- district
- upazila
- union
- village
GET https://makobir.com.bd/location/names/division/1
{
"status": true,
"type": "division",
"id": 1,
"name_en": "Dhaka",
"name_bn": "ঢাকা"
}{
"status": false,
"message": "Data not found."
}$response = file_get_contents("https://makobir.com.bd/location/names/upazila/5");
$data = json_decode($response, true);
echo $data['name_bn']; // অথবা $data['name_en']fetch('https://makobir.com.bd/location/names/union/12')
.then(res => res.json())
.then(data => console.log(data.name_bn));import requests
res = requests.get("https://makobir.com.bd/location/names/village/99")
print(res.json()["name_bn"])- Ensure your CodeIgniter
.htaccessand routing is properly set. - No CORS restriction for public name endpoint. Consider adding
Access-Control-Allow-Origin: *. - Public name route is useful when you have only IDs saved and want to show readable names.
- Both
name_enandname_bnare available for multilingual support.
For issues or further integration support, contact: makobirbd@gmail.com ✅