Quickstart

Bitaloka is a set of deterministic parsers for Indonesian document numbers. Every request is a pure function of the input — the API never queries a government database and never stores your input.

Base URL

https://api.bitaloka.io

First call

curl https://api.bitaloka.io/v1/nik/3174022501700001

Example response (trimmed):

{
  "valid": true,
  "gender": "L",
  "birthDate": { "day": 25, "month": 1, "yearResolved": 1970 },
  "region": {
    "province": { "code": "31", "name": "Daerah Khusus Ibukota Jakarta" },
    "regency": { "code": "3174", "name": "Kota Administrasi Jakarta Selatan" },
    "district": { "code": "317402", "name": "Setiabudi" }
  }
}

Endpoints

  • GET /v1/nik/<nik> — parse a 16-digit NIK
  • GET /v1/plate/<plate> — parse a vehicle plate
  • GET /v1/npwp/<npwp> — validate & parse an NPWP
  • POST /v1/batch — parse many documents in one call

Every parser returns HTTP 200 with a result object; inspect the valid field to decide whether the document is well-formed.

Authentication

In open mode (default for local dev) no key is required. In production, set the API_KEYS secret and send your key via X-API-Key or Authorization: Bearer.