API Reference
Base URL: https://apibase.dev/v1
X-Api-Key header on every request. Get a key →
Authentication
Include your API key in the X-Api-Key request header. Alternatively, pass it as a query parameter ?api_key=.
# Recommended: header curl https://apibase.dev/v1/spellnumber?number=1000 \ -H "X-Api-Key: sk_live_your_key_here" # Alternative: query param curl "https://apibase.dev/v1/spellnumber?number=1000&api_key=sk_live_your_key_here"
Errors
| HTTP Status | Meaning |
|---|---|
200 | Success |
401 | Missing API key |
403 | Invalid key or quota exceeded |
400 | Bad parameter value (unsupported language, country, or year) |
422 | Missing or invalid required parameter (e.g., non-numeric number, NIK not 16 digits) |
Quota
Every response includes a quota object showing your current usage. Each successful request counts as 1 call. Quota resets monthly with your billing cycle.
"quota": { "used": 3, "limit": 10000, "remaining": 9997, "resets_at": "2026-07-23 10:00:00" }
Quota resets automatically each billing cycle (triggered by renewal payment).
Spell Number
Convert any integer into its written-word equivalent in 19 languages.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
number |
integer | required | The number to spell out. Supports negative numbers. Range: up to ±999 trillion. |
lang |
string | optional | Language code. Default: id. 19 supported — see full list ↓ |
Example requests
# Indonesian (default) curl "https://apibase.dev/v1/spellnumber?number=1500000&lang=id" \ -H "X-Api-Key: sk_live_your_key" # English curl "https://apibase.dev/v1/spellnumber?number=1500000&lang=en" \ -H "X-Api-Key: sk_live_your_key" # Chinese curl "https://apibase.dev/v1/spellnumber?number=1500000&lang=zh" \ -H "X-Api-Key: sk_live_your_key" # Negative number curl "https://apibase.dev/v1/spellnumber?number=-42&lang=en" \ -H "X-Api-Key: sk_live_your_key"
Example responses
// lang=id { "number": 1500000, "words": "satu juta lima ratus ribu", "lang": "id", "quota": { "used": 1, "limit": 10000, "remaining": 9999 } } // lang=en { "number": 1500000, "words": "one million five hundred thousand", "lang": "en", "quota": { "used": 2, "limit": 10000, "remaining": 9998 } } // lang=zh { "number": 1500000, "words": "一百五十万", "lang": "zh", "quota": { "used": 3, "limit": 10000, "remaining": 9997 } }
NIK Decoder
Decode an Indonesian NIK (Nomor Induk Kependudukan — 16-digit national ID number). Extracts province, birth date, gender, and district code.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
nik |
string | required | 16-digit Indonesian NIK number. |
NIK structure
| Digits | Meaning |
|---|---|
1–2 | Province code |
3–4 | City / regency (kabupaten/kota) code |
5–6 | District (kecamatan) code |
7–12 | Date of birth (DDMMYY). For women, DD is DD+40 (e.g., born on the 5th → 45). |
13–16 | Unique sequence number |
Example request
curl "https://apibase.dev/v1/nik?nik=3201010150020001" \ -H "X-Api-Key: sk_live_your_key"
Example response
{ "nik": "3201010150020001", "valid": true, "province": { "code": "32", "name": "Jawa Barat" }, "city_code": "3201", "district_code": "320101", "birth_date": "2002-02-01", "gender": "M", "sequence": 1, "quota": { "used": 1, "limit": 10000, "remaining": 9999 } } // Female example (DD+40): NIK with digits 7-8 = "45" → born on the 5th, gender F { "gender": "F", "birth_date": "2002-02-05" // ... other fields }
Bank Holiday
Indonesian public holiday and joint-leave (cuti bersama) calendar. Data sourced from official Keputusan Bersama (Joint Ministerial Decree) published annually by the Indonesian government. Currently covers 2025–2026.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
country |
string | optional | Country code. Default: ID. Available: ID Indonesia · SG Singapore · MY Malaysia · TH Thailand · PH Philippines · VN Vietnam |
year |
integer | optional | Year to query. Default: current year. Available: 2025, 2026. |
Holiday types
| Type | Meaning |
|---|---|
national | Hari Libur Nasional — official national public holiday |
joint_leave | Cuti Bersama — government-declared joint leave days (widely followed by private sector) |
Example request
curl "https://apibase.dev/v1/holidays?country=ID&year=2026" \ -H "X-Api-Key: sk_live_your_key"
Example response
{ "country": "ID", "year": 2026, "count": 25, "holidays": [ { "date": "2026-01-01", "name": "Tahun Baru Masehi", "type": "national" }, { "date": "2026-01-16", "name": "Isra Mikraj Nabi Muhammad SAW", "type": "national" }, { "date": "2026-02-16", "name": "Cuti Bersama Tahun Baru Imlek", "type": "joint_leave" }, // ... 22 more entries ], "quota": { "used": 1, "limit": 10000, "remaining": 9999 } }
Language Codes
Pass the code via ?lang=. Default is id.
| Code | Language | 1500000 → |
|---|---|---|
| id | Indonesian | satu juta lima ratus ribu |
| en | English | one million five hundred thousand |
| ms | Malay | satu juta lima ratus ribu |
| zh | Chinese (Simplified) | 一百五十万 |
| ja | Japanese | 百五十万 |
| ko | Korean | 백오십만 |
| ar | Arabic | مليون خمسمئة ألف |
| hi | Hindi | पंद्रह लाख |
| ru | Russian | один миллион пятьсот тысяч |
| de | German | eine Million fünfhunderttausend |
| fr | French | un million cinq cents mille |
| es | Spanish | un millón quinientos mil |
| pt | Portuguese | um milhão e quinhentos mil |
| it | Italian | un milione cinquecentomila |
| nl | Dutch | één miljoen vijfhonderdduizend |
| sv | Swedish | en miljon femhundratusen |
| tr | Turkish | bir milyon beşyüzbin |
| th | Thai | หนึ่งล้านห้าแสน |
| vi | Vietnamese | một triệu năm trăm nghìn |