{"openapi":"3.1.0","info":{"title":"induwara.lk Public API","version":"1.0.0","description":"Free public API for Sri-Lanka data: NIC decoding, holidays, working days, income tax, land-area conversion, districts and AI text-to-speech.","contact":{"url":"https://induwara.lk/developers"}},"servers":[{"url":"https://induwara.lk"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"ilk_live_*"}}},"paths":{"/api/v1/nic/{number}":{"get":{"operationId":"nic","summary":"NIC Decoder","description":"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.","tags":["Identity"],"parameters":[{"name":"number","in":"path","required":true,"description":"The NIC number.","schema":{"type":"string"},"example":"199234567890"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/holidays":{"get":{"operationId":"holidays","summary":"Public Holidays","description":"Sri Lankan gazetted holidays for a year (public, bank, mercantile and poya days), with English/Sinhala/Tamil names.","tags":["Calendar"],"parameters":[{"name":"year","in":"query","required":false,"description":"Year (supported: 2026, 2027). Defaults to current year.","schema":{"type":"string"},"example":"2026"},{"name":"type","in":"query","required":false,"description":"Filter to one calendar: public | bank | mercantile.","schema":{"type":"string"},"example":"public"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/working-days":{"get":{"operationId":"working-days","summary":"Working Days","description":"Count business days between two dates, excluding weekends and Sri Lankan holidays for the chosen calendar.","tags":["Calendar"],"parameters":[{"name":"from","in":"query","required":true,"description":"Start date YYYY-MM-DD.","schema":{"type":"string"},"example":"2026-01-01"},{"name":"to","in":"query","required":true,"description":"End date YYYY-MM-DD.","schema":{"type":"string"},"example":"2026-03-31"},{"name":"calendar","in":"query","required":false,"description":"public | bank | mercantile | government (default: mercantile).","schema":{"type":"string"},"example":"mercantile"},{"name":"saturday","in":"query","required":false,"description":"Set to 1 to count Saturdays as working days.","schema":{"type":"string"},"example":"0"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/tax/paye":{"get":{"operationId":"tax","summary":"Income Tax (PAYE / APIT)","description":"Calculate Sri Lankan personal income tax (APIT) on a gross monthly salary using the current IRD brackets.","tags":["Finance"],"parameters":[{"name":"monthly","in":"query","required":true,"description":"Gross monthly salary in LKR.","schema":{"type":"string"},"example":"250000"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/convert/land":{"get":{"operationId":"convert-land","summary":"Land Area Converter","description":"Convert a Sri Lankan land area between perch, rood, acre, cent, hectare, m², ft² and yd², with acre-rood-perch deed notation.","tags":["Utility"],"parameters":[{"name":"value","in":"query","required":true,"description":"The amount to convert.","schema":{"type":"string"},"example":"10"},{"name":"from","in":"query","required":true,"description":"Source unit: perch | sqft | sqm | sqyd | rood | acre | hectare | cent.","schema":{"type":"string"},"example":"perch"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/vat":{"get":{"operationId":"vat","summary":"VAT Calculator","description":"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%.","tags":["Finance"],"parameters":[{"name":"amount","in":"query","required":true,"description":"Amount in LKR.","schema":{"type":"string"},"example":"10000"},{"name":"rate","in":"query","required":false,"description":"VAT rate %, default 18.","schema":{"type":"string"},"example":"18"},{"name":"mode","in":"query","required":false,"description":"add | remove (default add).","schema":{"type":"string"},"example":"add"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/loan":{"get":{"operationId":"loan","summary":"Loan EMI Calculator","description":"Equated monthly instalment (EMI) plus total interest and total payment, using the reducing-balance formula.","tags":["Finance"],"parameters":[{"name":"principal","in":"query","required":true,"description":"Loan amount in LKR.","schema":{"type":"string"},"example":"5000000"},{"name":"rate","in":"query","required":true,"description":"Annual interest rate %.","schema":{"type":"string"},"example":"12.5"},{"name":"months","in":"query","required":true,"description":"Tenure in months.","schema":{"type":"string"},"example":"240"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/fd":{"get":{"operationId":"fd","summary":"Fixed Deposit Calculator","description":"Fixed-deposit maturity and effective annual yield. payout=cumulative|monthly; wht=1 applies the 5% withholding tax on interest.","tags":["Finance"],"parameters":[{"name":"principal","in":"query","required":true,"description":"Deposit amount in LKR.","schema":{"type":"string"},"example":"1000000"},{"name":"rate","in":"query","required":true,"description":"Annual interest rate %.","schema":{"type":"string"},"example":"10"},{"name":"months","in":"query","required":true,"description":"Tenure in months.","schema":{"type":"string"},"example":"12"},{"name":"payout","in":"query","required":false,"description":"cumulative | monthly.","schema":{"type":"string"},"example":"cumulative"},{"name":"wht","in":"query","required":false,"description":"1 to apply 5% WHT.","schema":{"type":"string"},"example":"0"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/districts":{"get":{"operationId":"districts","summary":"Districts of Sri Lanka","description":"The 25 districts with province, a short tagline and notable places — for address forms, dropdowns and travel apps.","tags":["Reference"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/z-score":{"get":{"operationId":"z-score","summary":"A/L Z-Score Calculator","description":"Compute a Sri Lankan A/L Z-score from three subject marks, with per-subject Z, the final Z and an estimated all-island percentile. Built-in subject statistics are approximate — pass the verbatim Department of Examinations mean and standard deviation for an authoritative result. Call with no parameters to list valid subject ids and streams.","tags":["Education"],"parameters":[{"name":"subjects","in":"query","required":false,"description":"Three comma-separated terms as subject:mark, e.g. combined-maths:75,physics:68,chemistry:71. Optionally override the reference statistics per subject as subject:mark:mean:sd. Omit entirely to get the list of subject ids and streams.","schema":{"type":"string"},"example":"combined-maths:75,physics:68,chemistry:71"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/scholarship-cutoff":{"get":{"operationId":"scholarship-cutoff","summary":"Grade 5 Scholarship Cut-Off & School Eligibility","description":"Check whether a Grade 5 Scholarship mark clears a district's official cut-off, and which national schools in that district it qualifies for under the merit quota. Covers the 2024-2026 exams, all 25 districts, both mediums, and the Ministry of Education's complete 302-school Grade 6 admission list. Call with no parameters to list valid years, districts and mediums.","tags":["Education"],"parameters":[{"name":"year","in":"query","required":false,"description":"Exam year. Defaults to the latest published year.","schema":{"type":"string"},"example":"2026"},{"name":"district","in":"query","required":true,"description":"One of the 25 Sri Lankan districts.","schema":{"type":"string"},"example":"Colombo"},{"name":"medium","in":"query","required":true,"description":"Exam language: Sinhala or Tamil.","schema":{"type":"string"},"example":"Sinhala"},{"name":"mark","in":"query","required":false,"description":"Child's mark, 0-200. Omit to get just the district cut-off.","schema":{"type":"string"},"example":"174"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/plate/{plate}":{"get":{"operationId":"plate","summary":"Vehicle Number Plate Decoder","description":"Decode a Sri Lankan number plate into the province, vehicle class and approximate issue era encoded in the letters and digits. Pure parsing of the plate string — no vehicle register is queried and no owner information is returned.","tags":["Identity"],"parameters":[{"name":"plate","in":"path","required":true,"description":"The number plate. Use hyphens for spaces, e.g. WP-CAB-1234 or CAR-4582.","schema":{"type":"string"},"example":"WP-CAB-1234"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/tools":{"get":{"operationId":"tools","summary":"Tool Catalogue","description":"Search the full catalogue of live tools on induwara.lk. Returns each tool's title, description, category, keywords and URL, ordered by real organic traffic, and flags the tools that also have a computational API endpoint.","tags":["Reference"],"parameters":[{"name":"q","in":"query","required":false,"description":"Free-text search across title, description and keywords.","schema":{"type":"string"},"example":"tax"},{"name":"category","in":"query","required":false,"description":"Filter to one category, e.g. Finance, Education, AI.","schema":{"type":"string"},"example":"Finance"},{"name":"limit","in":"query","required":false,"description":"Results per page, 1-200 (default 50).","schema":{"type":"string"},"example":"50"},{"name":"offset","in":"query","required":false,"description":"Pagination offset (default 0).","schema":{"type":"string"},"example":"0"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/news":{"get":{"operationId":"news","summary":"Sri Lanka News Feed","description":"Structured, sourced writeups on trending Sri Lanka topics, each reviewed and approved by a human before publishing. Every post lists the independent source URLs used to verify it. Call with ?slug=<slug> for one full post (title, full body, every source), or without it for a paginated, searchable list of summaries.","tags":["News"],"parameters":[{"name":"slug","in":"query","required":false,"description":"Get one full post by slug, including its full body and source URLs.","schema":{"type":"string"},"example":"rumesh-pathirage-wins-the-diamond-league-final-a-first-for-sri-lanka"},{"name":"q","in":"query","required":false,"description":"Free-text search across title, excerpt, tags and keywords.","schema":{"type":"string"},"example":"digital id"},{"name":"category","in":"query","required":false,"description":"Filter to one category, e.g. Sports, Economy, Tech.","schema":{"type":"string"},"example":"Economy"},{"name":"limit","in":"query","required":false,"description":"Results per page, 1-100 (default 20).","schema":{"type":"string"},"example":"20"},{"name":"offset","in":"query","required":false,"description":"Pagination offset (default 0).","schema":{"type":"string"},"example":"0"}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}}}},"/api/v1/voice":{"post":{"operationId":"voice","summary":"AI Voice (Text to Speech)","description":"Convert text into natural AI speech (MP3). Requires a free API key. Body: { text, voice }. Hosted on our own infrastructure.","tags":["AI"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"429":{"description":"Rate limit or daily quota exceeded"}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to synthesise (JSON body). May embed effects: inline [pause] [laugh] [sigh], or wrapping <whisper>…</whisper> <slow>…</slow>.","example":"Hello! <whisper>this is whispered</whisper> [laugh]"},"voice":{"type":"string","description":"Voice id: eve | ara | leo | rex | sal (default eve).","example":"eve"},"language":{"type":"string","description":"Language code, e.g. en, auto, fr, de, hi, ja … (28 supported, default en).","example":"en"},"codec":{"type":"string","description":"mp3 | wav (default mp3).","example":"mp3"},"sample_rate":{"type":"string","description":"8000 | 16000 | 22050 | 24000 | 44100 | 48000 Hz.","example":"24000"},"bit_rate":{"type":"string","description":"32000 | 64000 | 96000 | 128000 | 192000 (mp3 only).","example":"128000"},"text_normalization":{"type":"string","description":"Expand numbers/dates/abbreviations before speaking (default true).","example":"true"}}}}}}}}}}