Skip to content

A basic API to fetch division, district, upazila or union of Bangladesh

License

Notifications You must be signed in to change notification settings

thekhairul/bdgeoapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bdgeoapi

A basic nodejs API to fetch division, district, upazila or union of Bangladesh as JSON

base URL

https://bdgeoapi.herokuapp.com

endpoints

  • /divisions (GET) : gets all the divisions of Bangladesh.

    fetch("https://bdgeoapi.herokuapp.com/divisions")
      .then((response) => response.json())
      .then((data) => console.log(data));
  • /districts/:divisionID (GET) : Districts are mapped against their corresponding division. This endpoint gets all the districts matched with the provided division ID.

    fetch("https://bdgeoapi.herokuapp.com/districts/6")
      .then((response) => response.json())
      .then((data) => console.log(data));

    This will return an array of districts under Dhaka division.

  • /upazilas/:districtID (GET) : Upazilas are mapped against their corresponding district. This endpoint gets all the upazilas matched with the provided district ID.

    fetch("https://bdgeoapi.herokuapp.com/upazilas/2")
      .then((response) => response.json())
      .then((data) => console.log(data));

    This will return an array of upazilas under Feni district.

  • /unions/:upazilaID (GET) : Unions are mapped against their corresponding Upazilla. This endpoint gets all the unions matched with the provided upazila ID.

    fetch("https://bdgeoapi.herokuapp.com/unions/19")
      .then((response) => response.json())
      .then((data) => console.log(data));

    This will return an array of unions under Feni Sadar upazila.

credits

The idea and all the data was taken from this great project Bangladesh Geocode by Nuhil Mehdy

About

A basic API to fetch division, district, upazila or union of Bangladesh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published