Free Sri Lanka Developer API
A free, public JSON API for Sri-Lanka-specific data — NIC decoding, gazetted holidays, working days, income tax, land-area conversion, districts and AI text-to-speech. CORS-enabled, no signup to try, free API keys for higher limits.
Try it instantly
Most endpoints work with no key at 50 requests/day per IP. Just curl them.
Free key = 1,000/day
Sign in and create a key for higher limits and key-only endpoints.
Predictable JSON
Every response is { ok, data, meta } with X-RateLimit-* headers.
Built with our free AI builder
Build yours
Cross Multi Talenta — AI Workspace
BIKININ GW WEBSITE YG BERJUDUL CROSS MULTI TALENTA SEKALI BUKA LANGSUNG MUNCUL TULISAN, SELAMAT DATANG (USN YG LOGIN), SAYA DIRANCANG OLEH T
by Anonymous #12
Authentication
Send your key in a header. Anonymous calls (no header) work at the lower limit.
# header option 1
Authorization: Bearer ilk_live_xxxxxxxx
# header option 2
x-api-key: ilk_live_xxxxxxxxUse it in your language
cURL
curl "https://induwara.lk/api/v1/nic/199234567890"JavaScript (SDK)
import { InduwaraLK } from
"https://induwara.lk/sdk/induwaralk.js";
const api = new InduwaraLK();
const nic = await api.nic("199234567890");Python
import requests
r = requests.get(
"https://induwara.lk/api/v1/nic/199234567890")
print(r.json()["data"])Machine-readable spec: OpenAPI 3.1 · JS SDK · API index (JSON)
Rate limits
| Tier | Daily limit | Notes |
|---|---|---|
| Anonymous | 50 / day per IP | No key needed. Voice not available. |
| Free key | 1,000 / day | Voice: 100 / day. Resets 00:00 UTC. |
Endpoints
AI
/api/v1/voice key required FeaturedAI Voice (Text to Speech)
Convert text into natural AI speech (MP3). Requires a free API key. Body: { text, voice }. Hosted on our own infrastructure.
| Param | In | Req | Description |
|---|---|---|---|
| text | query | yes | Text to synthesise (JSON body). May embed effects: inline [pause] [laugh] [sigh], or wrapping <whisper>…</whisper> <slow>…</slow>. |
| voice | query | no | Voice id: eve | ara | leo | rex | sal (default eve). |
| language | query | no | Language code, e.g. en, auto, fr, de, hi, ja … (28 supported, default en). |
| codec | query | no | mp3 | wav (default mp3). |
| sample_rate | query | no | 8000 | 16000 | 22050 | 24000 | 44100 | 48000 Hz. |
| bit_rate | query | no | 32000 | 64000 | 96000 | 128000 | 192000 (mp3 only). |
| text_normalization | query | no | Expand numbers/dates/abbreviations before speaking (default true). |
Example request
curl -X POST https://induwara.lk/api/v1/voice -H "Authorization: Bearer ilk_live_…" -H "Content-Type: application/json" -d '{"text":"Hello! <whisper>secret</whisper> [laugh]","voice":"eve","language":"en","codec":"mp3"}' --output voice.mp3Example response
# Returns binary audio (Content-Type: audio/mpeg).
# Save it to a file:
curl -X POST https://induwara.lk/api/v1/voice \
-H "Authorization: Bearer ilk_live_…" \
-H "Content-Type: application/json" \
-d '{"text":"Hello from Sri Lanka","voice":"eve"}' \
--output voice.mp3Identity
/api/v1/nic/{number}NIC Decoder
Decode a Sri Lankan NIC (old 10-char or new 12-digit) into the data the number encodes: date of birth, gender, age, serial and voting eligibility. Pure parsing — no personal database lookup.
| Param | In | Req | Description |
|---|---|---|---|
| number | path | yes | The NIC number. |
Example request
curl "https://induwara.lk/api/v1/nic/199234567890"Example response
{
"ok": true,
"data": {
"nic": "199234567890",
"valid": true,
"format": "new",
"dateOfBirth": "1992-12-10",
"gender": "Male",
"age": { "years": 33, "months": 5, "days": 24 },
"serial": 6789,
"votingEligible": null,
"source": "Department for Registration of Persons, Sri Lanka",
"lastVerified": "2026-05-10"
},
"meta": { "tier": "anonymous", "endpoint": "nic", "limit": 50, "remaining": 49 }
}Calendar
/api/v1/holidaysPublic Holidays
Sri Lankan gazetted holidays for a year (public, bank, mercantile and poya days), with English/Sinhala/Tamil names.
| Param | In | Req | Description |
|---|---|---|---|
| year | query | no | Year (supported: 2026, 2027). Defaults to current year. |
| type | query | no | Filter to one calendar: public | bank | mercantile. |
Example request
curl "https://induwara.lk/api/v1/holidays?year=2026&type=public"Example response
{
"ok": true,
"data": {
"year": 2026,
"type": "public",
"count": 24,
"holidays": [
{ "date": "2026-01-03", "name": "Duruthu Full Moon Poya Day",
"type": "Buddhist", "public": true, "bank": true, "mercantile": true }
],
"source": "Sri Lanka Government Gazette",
"lastVerified": "2026-05-16"
}
}/api/v1/working-daysWorking Days
Count business days between two dates, excluding weekends and Sri Lankan holidays for the chosen calendar.
| Param | In | Req | Description |
|---|---|---|---|
| from | query | yes | Start date YYYY-MM-DD. |
| to | query | yes | End date YYYY-MM-DD. |
| calendar | query | no | public | bank | mercantile | government (default: mercantile). |
| saturday | query | no | Set to 1 to count Saturdays as working days. |
Example request
curl "https://induwara.lk/api/v1/working-days?from=2026-01-01&to=2026-03-31&calendar=mercantile"Example response
{
"ok": true,
"data": {
"from": "2026-01-01", "to": "2026-03-31", "calendar": "mercantile",
"workingDays": 58, "totalDays": 90, "weekendDays": 25, "holidayDays": 7
}
}Finance
/api/v1/tax/payeIncome Tax (PAYE / APIT)
Calculate Sri Lankan personal income tax (APIT) on a gross monthly salary using the current IRD brackets.
| Param | In | Req | Description |
|---|---|---|---|
| monthly | query | yes | Gross monthly salary in LKR. |
Example request
curl "https://induwara.lk/api/v1/tax/paye?monthly=250000"Example response
{
"ok": true,
"data": {
"grossMonthly": 250000, "grossAnnual": 3000000,
"monthlyTax": 8000, "annualTax": 96000,
"monthlyNet": 242000, "annualNet": 2904000, "currency": "LKR"
}
}/api/v1/vatVAT Calculator
Add or remove Sri Lankan VAT. mode=add adds VAT to a net amount; mode=remove extracts VAT from a gross amount. Rate defaults to the standard 18%.
| Param | In | Req | Description |
|---|---|---|---|
| amount | query | yes | Amount in LKR. |
| rate | query | no | VAT rate %, default 18. |
| mode | query | no | add | remove (default add). |
Example request
curl "https://induwara.lk/api/v1/vat?amount=10000&rate=18&mode=add"Example response
{
"ok": true,
"data": {
"mode": "add", "rate": 18, "base": 10000,
"vat": 1800, "total": 11800, "currency": "LKR"
}
}/api/v1/loanLoan EMI Calculator
Equated monthly instalment (EMI) plus total interest and total payment, using the reducing-balance formula.
| Param | In | Req | Description |
|---|---|---|---|
| principal | query | yes | Loan amount in LKR. |
| rate | query | yes | Annual interest rate %. |
| months | query | yes | Tenure in months. |
Example request
curl "https://induwara.lk/api/v1/loan?principal=5000000&rate=12.5&months=240"Example response
{
"ok": true,
"data": {
"principal": 5000000, "annualRate": 12.5, "tenureMonths": 240,
"emi": 56785.71, "totalInterest": 8628570.4, "totalPayment": 13628570.4,
"currency": "LKR"
}
}/api/v1/fdFixed Deposit Calculator
Fixed-deposit maturity and effective annual yield. payout=cumulative|monthly; wht=1 applies the 5% withholding tax on interest.
| Param | In | Req | Description |
|---|---|---|---|
| principal | query | yes | Deposit amount in LKR. |
| rate | query | yes | Annual interest rate %. |
| months | query | yes | Tenure in months. |
| payout | query | no | cumulative | monthly. |
| wht | query | no | 1 to apply 5% WHT. |
Example request
curl "https://induwara.lk/api/v1/fd?principal=1000000&rate=10&months=12&payout=cumulative"Example response
{
"ok": true,
"data": {
"principal": 1000000, "annualRate": 10, "tenureMonths": 12,
"payout": "cumulative", "maturityGross": 1104713.07,
"totalInterestGross": 104713.07, "effectiveAnnualYieldGross": 10.47,
"currency": "LKR"
}
}Utility
/api/v1/convert/landLand Area Converter
Convert a Sri Lankan land area between perch, rood, acre, cent, hectare, m², ft² and yd², with acre-rood-perch deed notation.
| Param | In | Req | Description |
|---|---|---|---|
| value | query | yes | The amount to convert. |
| from | query | yes | Source unit: perch | sqft | sqm | sqyd | rood | acre | hectare | cent. |
Example request
curl "https://induwara.lk/api/v1/convert/land?value=10&from=perch"Example response
{
"ok": true,
"data": {
"value": 10, "from": "perch", "squareMetres": 252.9285264,
"values": { "perch": 10, "acre": 0.0625, "rood": 0.25, "hectare": 0.0253 },
"deed": { "acres": 0, "roods": 0, "perches": 10, "text": "0A-0R-10.0P" }
}
}Reference
/api/v1/districtsDistricts of Sri Lanka
The 25 districts with province, a short tagline and notable places — for address forms, dropdowns and travel apps.
Example request
curl "https://induwara.lk/api/v1/districts"Example response
{
"ok": true,
"data": {
"count": 25,
"districts": [
{ "slug": "kandy", "name": "Kandy", "province": "Central",
"tagline": "…", "notablePlaces": ["Temple of the Tooth", "…"] }
]
}
}Frequently asked questions
- Is the API free?
- Yes. Every endpoint is free. You can call most of them with no key at a lower daily limit; create a free API key for a higher limit. Some endpoints (like voice) require a free key.
- Do I need an API key?
- Not to try it — anonymous calls work at 50 requests/day per IP. For 1,000/day and access to key-only endpoints, create a free key in your developer dashboard.
- Can I use this in production / commercially?
- Yes, within the rate limits. Data endpoints cite their official source and a last-verified date. We may introduce higher paid tiers later, but the current free tier stays free.
- Is the NIC API a personal-data lookup?
- No. It only decodes the information encoded in the NIC number itself (date of birth, gender, serial). It does not look anyone up in any database.