An API that provices the names of Province, Districts, Sub Districts and Urban in Indonesia
1.Clone project repository
git clone https://github.com/RennnD/API-Lokasi-Indonesia.git
2.Change directory to repository folder
cd API-Lokasi-Indonesia
3.Install all dependencies required for this project
pip install -r requirements.txt
4.Run the local server
- windows
python main.py
- Mac/Linux
python3 main.py
Endpoint | Method | Parameter | Type | Description |
---|---|---|---|---|
/api/provinsi |
GET |
None | None | Show all Provinsi |
/api/kabupaten |
GET |
None | None | Show all kabupaten |
/api/kabupaten/{id_provinsi} |
GET |
id_provinsi | Integer 0-9 | Show kabupaten by id_provinsi (see id from /api/provinsi ) |
/api/kecamatan?limit=10&offset=0 |
GET |
limit & offset | Integer 0-9 | Show all Kecamatan |
/api/kecamatan/{id_kabupaten} |
GET |
id_kabupaten | Integer 0-9 | Show Kecamatan by id_kabupaten (see id from /api/kabupaten ) |
/api/kelurahan?limit=10&offset=0 |
GET |
limit & offset | Integer 0-9 | Show all Kelurahan |
/api/kelurahan/{id_kecamatan} |
GET |
id_kecamatan | Integer 0-9 | Show Kelurahan by id_kecamatan (see id from /api/kecamatan ) |
/api/search/{area_type}/{id_area} |
GET |
area_type & id_area | String provinsi, kabupaten, kelurahan & Integer 0-9 | Filter data by id_area |
/api/search/{area_type}/?keyword= |
GET |
keyword | String a-Z | Search data by keyword |
This project is licensed under the Apache License
, Version 2.0.