🔌

Public API

Free public API for UK tax calculations and cost-of-living data. No authentication required for read endpoints. HMRC 2025/26 rates. 29 UK cities.

Free to use No API key HMRC 2025/26 JSON responses

Base URL

https://luxenta.polsia.app
GET /api/regions List all UK cities

Returns all 29 UK cities with cost-of-living summary indices.

Example Response

{
  "success": true,
  "regions": [
    {
      "id": 1,
      "slug": "london",
      "name": "London",
      "country": "England",
      "region_group": "London",
      "is_featured": true,
      "rent_1bed": 1850.00,
      "cpi_index": 100,
      "public_transport": 165.00,
      "groceries_single": 320.00
    },
    ...
  ]
}
GET /api/regions/:slug/detail City detail with related cities

Returns full stats for one city, plus other cities in the same region.

Parameters

ParamInDescription
slugpathCity slug (e.g. london, manchester)

Example

GET /api/regions/manchester/detail
GET /api/tax-bands HMRC income tax bands

Returns HMRC income tax bands with rates and thresholds for the specified tax year and country.

Query Parameters

ParamDefaultOptions
tax_year2025-26e.g. 2025-26
countryEngland/Wales/NIEngland/Wales/NI or Scotland

Example Response

{
  "success": true,
  "tax_year": "2025-26",
  "country": "England/Wales/NI",
  "bands": [
    { "band_name": "Personal Allowance", "lower_limit": 0, "upper_limit": 12570, "rate": 0 },
    { "band_name": "Basic Rate",         "lower_limit": 12571, "upper_limit": 50270, "rate": 0.20 },
    { "band_name": "Higher Rate",        "lower_limit": 50271, "upper_limit": 125140, "rate": 0.40 },
    { "band_name": "Additional Rate",    "lower_limit": 125141, "upper_limit": null, "rate": 0.45 }
  ]
}
GET /api/tax/calculate Calculate take-home pay

Returns a full tax breakdown for a given salary. Income tax, National Insurance, student loan, pension, and net monthly take-home.

Query Parameters

ParamRequiredDescription
salaryGross annual salary in GBP (e.g. 50000)
employment_typepaye (default) or freelance
regionCity slug for COL breakdown (e.g. manchester)
student_loan_plannone, plan1, plan2, plan4, plan5, postgrad
pension_percentPension contribution % (e.g. 5)
countryengland (default) or scotland

Example

GET /api/tax/calculate?salary=50000®ion=manchester&student_loan_plan=plan2&pension_percent=5

Example Response

{
  "success": true,
  "salary": 50000,
  "tax_year": "2025-26",
  "income_tax": 7486,
  "national_insurance": 3228,
  "student_loan": 2048,
  "pension": 2500,
  "total_deductions": 15262,
  "net_annual": 34738,
  "net_monthly": 2895,
  "effective_rate": 30.5
}
POST /api/scenario Full scenario with COL breakdown

Returns a complete life scenario: full tax breakdown + city cost of living + monthly surplus. Supports optional city comparison.

Request Body

{
  "salary": 50000,
  "region": "manchester",
  "employment_type": "paye",
  "student_loan_plan": "plan2",
  "pension_percent": 5,
  "household_type": "single",
  "comparison_region": "london"  // optional
}

Response includes

  • Full tax breakdown (income tax, NI, student loan, pension)
  • Monthly take-home pay
  • Cost of living breakdown (rent, council tax, transport, groceries)
  • Monthly surplus or deficit
  • Comparison city breakdown (if provided)
GET /api/reverse-calculator Rank cities by affordability

Returns all 29 UK cities ranked by monthly surplus for a given salary. Useful for "where can I afford to live?" queries.

Query Parameters

ParamRequiredDescription
salaryGross annual salary
employment_typepaye or freelance
household_typesingle, couple, family
min_surplusMinimum monthly surplus filter (GBP)
max_rentMaximum monthly rent filter (GBP)

Example

GET /api/reverse-calculator?salary=40000&employment_type=paye&household_type=single
GET /api/house-prices ONS regional house prices

Returns ONS Q4 2024 average house prices by region. Optional region filter.

Example

GET /api/house-prices?region=manchester
POST /api/mortgage/calculate Mortgage + stamp duty calculator

Returns monthly mortgage payments, stamp duty (SDLT/LBTT/LTT), total interest, and amortisation schedule.

Request Body

{
  "house_price": 250000,
  "deposit": 25000,
  "term_years": 25,
  "rate": 4.75,
  "is_ftb": true,
  "country": "england"
}
GET /api/discretionary-costs City lifestyle costs

Returns discretionary spending costs for a city: pint of beer, flat white, restaurant meal, cinema ticket, gym membership, takeaway.

Example

GET /api/discretionary-costs?region=edinburgh

Usage notes

Try the interactive calculator →