⚠️ Due to financial issues, our free hosted API at https://api.wilayah-nusantara.id has been shut down. ⚠️

Provinsi (Province)
Get Provinsi by Code

Get Provinsi by Area Code

Fetches a province based on its area code.

Endpoint

Base URL
https://api.wilayah-nusantara.id
 
or, if running on local
 
http://localhost:1945
Method and Endpoint
GET /provinsi/{code}

Route Params

code : string (required)

Area code of a province.

Responses

200 (success)

Example Request
GET https://api.wilayah-nusantara.id/provinsi/36
Example Response
{
  "code": "36",
  "province": "BANTEN"
}

404 (not found)

Example Response
{
  "statusCode": 404,
  "message": "province not found"
}

500 (server error)

Example Response
{
  "statusCode": 500,
  "message": "Internal server error"
}