Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Refnusa Dev Wilayah API
version: 0.2.0
description: 'Operations tagged Wilayah across 2 of this provider''s published API definitions: openapi.json, refnusa-dev-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://refnusa.dev
tags:
- name: Wilayah
paths:
/v1/wilayah:
get:
summary: 'Administrative regions: the 38 provinces, the children of one parent code, or…'
responses:
'200':
description: OK
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
parameters:
- name: level
in: query
required: false
schema:
type: string
description: Level to list; anything below provinsi needs parent_code
enum:
- provinsi
- kabupaten
- kecamatan
- kelurahan
- name: parent_code
in: query
required: false
schema:
type: string
description: List the children of this code
pattern: ^\d{2}(\.\d{2}){0,2}(\.\d{4})?$
- name: code
in: query
required: false
schema:
type: string
description: Return this one region
pattern: ^\d{2}(\.\d{2}){0,2}(\.\d{4})?$
tags:
- Wilayah
operationId: getV1Wilayah
x-operation-id-source: derived
servers:
- url: https://refnusa.dev
/v1/wilayah/{code}:
get:
summary: One administrative region by code
responses:
'200':
description: OK
'400':
$ref: '#/components/responses/Error'
'404':
$ref: '#/components/responses/Error'
'429':
$ref: '#/components/responses/Error'
parameters:
- name: code
in: path
required: true
schema:
type: string
description: Kemendagri wilayah code
pattern: ^\d{2}(\.\d{2}){0,2}(\.\d{4})?$
tags:
- Wilayah
operationId: getV1WilayahByCode
x-operation-id-source: derived
servers:
- url: https://refnusa.dev
components:
responses:
Error:
description: Error
content:
application/json:
schema:
type: object
properties:
error:
type: string
message:
type: string
x-refined-from:
- openapi.json
- refnusa-dev-openapi.yml