focuses on the geographic and administrative divisions of the Philippines up to barranggay level
Explore the docs »
A library that enables search using an updated collection of Philippines Geo Administrative divisions.
Region
{
"psgcId": "0100000000",
"name": "Region I (Ilocos Region)",
"geoLevel": "Reg",
"regionId": "01",
"provinceId": "000",
"municipalityId": "00",
"baranggayId": "000"
}
Province
{
"psgcId": "0102800000",
"name": "Ilocos Norte",
"geoLevel": "Prov",
"regionId": "01",
"provinceId": "028",
"municipalityId": "00",
"baranggayId": "000"
}
Municipality
{
"psgcId": "0102801000",
"name": "Adams",
"geoLevel": "Mun",
"regionId": "01",
"provinceId": "028",
"municipalityId": "01",
"baranggayId": "000"
}
Baranggay
{
"psgcId": "0102801001",
"name": "Adams (Pob.)",
"geoLevel": "Bgy",
"regionId": "01",
"provinceId": "028",
"municipalityId": "01",
"baranggayId": "001"
}
Listing Records
const allRegions = await searchRegion();
const allProvinces = await searchProvince();
const allMunicipalities = await searchMunicipalities();
const allBaranggays = await searchBaranggays();
Listing Parameters
interface SearchParams {
name?: string;
regionId?: string;
provinceId?: string;
municipalityId?: string;
baranggayId?: string;
}
check test.spec.ts
for more usage.
National Capital Region is manually added to the province list, catering for this special need to complete the flow of searching province, municipality then baranggay, this eliminates the process of searching Regions etc.
Distributed under the MIT License. See LICENSE
for more information.
Mark Ernest R. Matute- linkedin - markernest.matute@gmail.com