No signup required
Start testing immediately. Anonymous access at 100 requests/hour.
Canadian math only
Semi-annual compounding, CMHC tiers, OSFI stress test. Never US conventions.
Structured JSON
Every response includes inputs, outputs, source attribution, and disclaimer.
Try It Live
Select a calculator, fill in the inputs, and see the API response in real time. No signup needed.
Loading calculators...
Quickstart
1. Discover available calculators
curl https://mortgageslab.ca/api/calculators
2. Run a calculation
curl -X POST https://mortgageslab.ca/api/calculate/cmhc-insurance \
-H "Content-Type: application/json" \
-d '{"homePrice": 700000, "downPayment": 50000}'3. JavaScript / TypeScript example
const res = await fetch("https://mortgageslab.ca/api/calculate/cmhc-insurance", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ homePrice: 700000, downPayment: 50000 }),
});
const data = await res.json();
console.log(data.result);
// { premiumRate: 4, premiumAmount: 26000, totalMortgage: 676000, ... }4. Python example
import requests
resp = requests.post(
"https://mortgageslab.ca/api/calculate/cmhc-insurance",
json={"homePrice": 700000, "downPayment": 50000},
)
data = resp.json()
print(data["result"])
# {'premiumRate': 4, 'premiumAmount': 26000, 'totalMortgage': 676000, ...}Endpoints
OpenAPI Spec (JSON)| Method | Endpoint | Description |
|---|---|---|
| GET | /api/calculators | List all calculators with schemas and examples |
| GET | /api/calculate/{id} | Get schema and docs for one calculator |
| POST | /api/calculate/{id} | Execute a calculation with JSON inputs |
Available Calculators
cmhc-insuranceCMHC Insurance
Compare 19% down (insured, lower rate) vs 20% down (uninsured) to see which strategy saves you more over 5 years. Uses Canadian semi-annual compounding.
cost-of-borrowingCost of Borrowing
See the true cost of your mortgage: total interest paid, effective annual rate, cost per dollar borrowed, and how a 1% rate change impacts your bottom line. Uses Canadian semi-annual compounding.
ird-penaltyIRD Penalty
Calculate your Interest Rate Differential (IRD) penalty for breaking a fixed mortgage early. Shows the penalty amount, breakeven timeline, and whether switching lenders actually saves you money.
spousal-buyoutSpousal Buyout
Calculate how much you need to borrow to keep the home in a separation — including your ex's equity payout, debt consolidation, CMHC insurance, and stress test qualification.
renewal-shockRenewal Shock
See exactly how your mortgage renewal rate change affects monthly payments, annual costs, and 5-year impact. Includes an amortization extension relief scenario.
skip-paymentSkip Payment
See the real cost of skipping mortgage payments. Interest keeps compounding while you pause — this calculator shows the added balance, increased payments, and extra months on your mortgage.
Each calculator auto-documents its inputs, outputs, and examples via GET /api/calculate/{id}. New calculators are added regularly.
Rate Limits
| Tier | Limit | Auth | Notes |
|---|---|---|---|
| Anonymous | 100 req / hour | None | For testing and evaluation |
| Free | 500 req / day | X-API-Key | For side projects and prototypes |
| Pro | 10,000 req / day | X-API-Key | For production integrations |
| Enterprise | Custom | X-API-Key | SLA, dedicated support, custom limits |
Response Headers
Every response includes rate limit information:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1715500800
X-API-Tier: anonymous
Response Format
{
"calculator": "cmhc-insurance",
"inputs": {
"homePrice": 700000,
"downPayment": 50000
},
"result": {
"premiumRate": 4,
"premiumAmount": 26000,
"totalMortgage": 676000,
"ltvRatio": 92.86,
"isInsuranceRequired": true,
"monthlyPremiumImpact": 49
},
"source": "Mortgages Lab",
"sourceUrl": "https://mortgageslab.ca/calculators/cmhc-insurance",
"disclaimer": "CMHC insurance premiums are subject to change...",
"calculatedAt": "2026-05-12T14:30:00.000Z"
}API Terms of Use
1. Permitted Use
The Mortgages Lab Calculator API is provided for integration into websites, applications, and platforms that serve Canadian homebuyers, real estate professionals, and financial planners. You may use the API in both personal and commercial projects.
2. Attribution Required
All integrations must display visible attribution: “Powered by Mortgages Lab” near any calculator output shown to end users. The attribution must link to https://mortgageslab.ca.
3. Rate Limits & Fair Use
Requests are rate-limited per tier. Do not attempt to circumvent rate limits through IP rotation, multiple accounts, or other means. Excessive automated scraping of endpoints (as opposed to normal calculator usage) may result in permanent blocking.
4. No Warranty & Disclaimer
The API is provided “as is” without warranties of any kind. Mortgage calculations are estimates based on standard Canadian formulas and may not reflect the exact terms offered by any specific lender. Users must consult a licensed mortgage professional before making financial decisions. Mortgages Lab is not liable for decisions made based on API outputs.
5. Availability
We aim for high availability but do not guarantee uptime or SLA for the free and anonymous tiers. Pro and Enterprise tiers include uptime commitments defined in their respective agreements. We reserve the right to modify endpoints, add or remove calculators, and change rate limits with reasonable notice.
6. Data Privacy
API requests are logged for analytics, rate limiting, and abuse prevention. Logs include IP address, endpoint, timestamp, and API key prefix (if provided). We do not log or store the calculation inputs beyond the current request. No personal financial data is retained.
7. Prohibited Use
You may not use the API to: misrepresent calculations as originating from your own engine without attribution; resell raw API access without adding value; or use outputs in a way that violates Canadian financial services regulations.
Last updated: May 12, 2026. Mortgages Lab reserves the right to update these terms. Continued use of the API constitutes acceptance of the current terms.
Get your API Key
Generate a free API key instantly. No credit card, no approval wait. 500 requests/day to start building.
Checking your account...
