Indonesian postal code search API by place name, village or city.
-
Clone this repository
git clone https://github.com/sooluh/kodepos.git
-
Change current directory to this repository folder
cd kodepos
-
Install dependencies
npm install
-
Run the server
-
Development mode
npm run dev
-
Production mode
-
Build first
npm run build
-
Run
npm start
-
-
Base URL : http://localhost:3000/
Endpoint | Description | Parameter | Method |
---|---|---|---|
/ |
Only the start page shows basic information | No | GET |
/search |
To find postcode using keywords | q |
GET |
curl -XGET 'http://localhost:3000/search/?q=danasari'
{
"success": true,
"message": "Data search successfully parsed.",
"data": [
{
"province": "Jawa Tengah",
"city": "Purbalingga",
"subdistrict": "Karangjambu",
"urban": "Danasari",
"postalcode": "53357"
},
{
"province": "Jawa Tengah",
"city": "Tegal",
"subdistrict": "Bojong",
"urban": "Danasari",
"postalcode": "52465"
},
{
"province": "Jawa Tengah",
"city": "Pemalang",
"subdistrict": "Pemalang",
"urban": "Danasari",
"postalcode": "52314"
},
{
"province": "Jawa Barat",
"city": "Ciamis",
"subdistrict": "Cisaga",
"urban": "Danasari",
"postalcode": "46386"
}
]
}
Code licensed under Apache 2.0 License.