Conventions
- Every file has
dataset,updated(the date its figures were last checked against the source) andsources(a list of{ "title", "url" };urlis optional). - Rates are percentages:
13means 13%, and0.015means 0.015%. - Amounts are whole rupees (NPR). An upper bound of
nullmeans the slab has no upper limit. - Shares with no exact decimal are fractions in a string, such as
"1/3". - Dates are AD, as
YYYY-MM-DD. Fiscal-year files also give the start of the year in Bikram Sambat:"starts": { "bs": "2083-04-01", "ad": "2026-07-17" }. - Each fiscal year is its own file and is never changed afterwards except to fix a mistake, so a calculation for a past year keeps working. A change that would break existing readers goes in
/v2/. - Responses can be cached for up to 10 minutes. Any website can fetch the files: they are sent with
Access-Control-Allow-Origin: *. - Python's built-in
urllibis turned away unless it sends its ownUser-Agentheader, as in the Python examples below. Other clients work as they are.
Errors
An address with no file behind it, such as a fiscal year that isn't published yet, returns 404 with GitHub Pages' HTML error page rather than JSON. Check res.ok (or the status code) before parsing, and use index.json to see which files exist.
Figures are copied from the sources named in each file. Check them against the Inland Revenue Department, SEBON or NEPSE before relying on them; this is not tax or investment advice. Source on GitHub.