API Reference

Base URL: https://apibase.dev/v1

API Key required. Pass your key via 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 StatusMeaning
200Success
401Missing API key
403Invalid key or quota exceeded
400Bad parameter value (unsupported language, country, or year)
422Missing 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.

GET /v1/spellnumber

Parameters

ParameterTypeRequiredDescription
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.

GET /v1/nik

Parameters

ParameterTypeRequiredDescription
nik string required 16-digit Indonesian NIK number.

NIK structure

DigitsMeaning
1–2Province code
3–4City / regency (kabupaten/kota) code
5–6District (kecamatan) code
7–12Date of birth (DDMMYY). For women, DD is DD+40 (e.g., born on the 5th → 45).
13–16Unique 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.

GET /v1/holidays

Parameters

ParameterTypeRequiredDescription
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

TypeMeaning
nationalHari Libur Nasional — official national public holiday
joint_leaveCuti 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.

CodeLanguage1500000 →
idIndonesiansatu juta lima ratus ribu
enEnglishone million five hundred thousand
msMalaysatu juta lima ratus ribu
zhChinese (Simplified)一百五十万
jaJapanese百五十万
koKorean백오십만
arArabicمليون خمسمئة ألف
hiHindiपंद्रह लाख
ruRussianодин миллион пятьсот тысяч
deGermaneine Million fünfhunderttausend
frFrenchun million cinq cents mille
esSpanishun millón quinientos mil
ptPortugueseum milhão e quinhentos mil
itItalianun milione cinquecentomila
nlDutchéén miljoen vijfhonderdduizend
svSwedishen miljon femhundratusen
trTurkishbir milyon beşyüzbin
thThaiหนึ่งล้านห้าแสน
viVietnamesemột triệu năm trăm nghìn