API Áireamhán Saor in Aisce

Tá API JSON saor in aisce ag gach áireamhán ar an suíomh seo freisin.Níl aon síniú suas, níl aon eochair API, CORS-chumasaithe — glaoigh air ó do fhreastalaí nó díreach ón mbrabhsálaí.

Forbhreathnú

Seol luachanna réimse an áireamháin mar pharaiméadair cheiste nó mar JSON agus faigh na torthaí ríofa ar ais mar JSON — lena n-áirítear aon sceideal dímheasa nó sonraí cairte a tháirgeann an t-áireamhán.

  • 198+ áireamháin, gach ceann acu lena chríochphointe féin
  • Gan eochair API — rochtain gan ainm, ráta-teoranta ag IP
  • CORSAccess-Control-Allow-Origin: * (inúsáidte ar thaobh an chliaint)
  • Teorainn Ráta: 60 iarratais/uair an chloig in aghaidh an IP (HTTP 429 nuair a sháraítear)
  • Errors are free — only a successful (2xx) response uses one call from your monthly quota. Every 400, 401, 404, 429 and 500 costs you nothing.

URL Bun

https://calculator.free/api/v1/

Innéacs — liosta gach áireamháin

GET https://calculator.free/api/v1/

Fillteann sé liosta inléite ag meaisín de gach áireamhán le réimsí gach ceann acu (eochair, lipéad, cineál, réamhshocrú, aonad) agus eochracha toraidh — go leor chun cliant a thógáil go dinimiciúil. Each field also carries a required flag — true for the few fields that have no default (dates, mostly). Send those: a couple of calculators can infer one, the rest answer 400 without it.

Ríomh — rith áireamhán amháin

GET  https://calculator.free/api/v1/<slug>/?field=value&field=value
POST https://calculator.free/api/v1/<slug>/     (JSON or form body)

Cruth an fhreagra:

{
  "ok": true,
  "slug": "mortgage",
  "country": "us",
  "inputs":   { ... the values actually computed with ... },
  "results":  { ... computed result keys ... },
  "schedule": { "columns": [...], "rows": [...] } | null,
  "chart":    { "type": "pie", "slices": [...] } | null,
  "defaults_applied": ["tax", "insurance"]
}

Glac le háireamháin tír-eolach (morgáiste, iasacht, cáin ioncaim, cáin díolacháin...) ?country=us|uk|ca|au|in|ie|nz|za. Tuairisceán slug anaithnid 404; tír neamh-thacaithe nó droch-ionchur ar ais 400 le teachtaireacht cabhrach agus an spec réimse.

Parameters, defaults and errors

Send only the fields you care about. Anything you leave out is filled with that field's published default — the same value the calculator page pre-fills, so the API and the website always return the same numbers for the same inputs. Each response lists what it filled in under defaults_applied.

Anything the API cannot resolve honestly is an error, never a zero: a misspelled parameter, a value of the wrong type, an unknown dropdown option, or a missing field that has no default (the date fields — a birth date cannot be guessed). Every 400 names the offending parameter and echoes the full field spec so a client can correct itself.

$ curl "https://calculator.free/api/v1/mortgage/?price=350000&rate=6.5&term=30"
{
  "ok": false,
  "error": "unknown_parameter",
  "message": "Unknown parameter 'term' for calculator 'mortgage'. Did you mean 'years'? ...",
  "unknown_parameters": ["term"],
  "did_you_mean": { "term": "years" },
  "valid_parameters": ["down", "extra", "extra_onetime", "extra_yearly", "hoa",
                       "insurance", "other", "pmi", "price", "rate", "tax", "years"],
  "fields": [ ... ]
}
errorHTTPWhen
unknown_parameter400a parameter that is not a field of this calculator (with a did-you-mean suggestion)
invalid_value400a number field that is not a number, a dropdown value outside its options, an unparseable date, or an unknown _mode
missing_parameter400the calculator produced no result because a field with no default was left empty
unsupported_country400?country= is not one this calculator has data for
bad_json400the POST body is not valid JSON
unknown_calculator404no calculator with that slug
invalid_key401an API key was sent but is unknown or inactive
rate_limited / quota_exceeded429the anonymous hourly IP limit, or a key's monthly quota, is used up
too_many_invalid_requests429too many rejected requests in one hour for this key — rejected calls are free, so they are rate-limited instead. Resets hourly; successful calls never count towards it.

The /api/v1/ index publishes every field's key, type, unit, default and whether it is required — enough to build a client that never guesses.

Fíordheimhniú agus pleananna

Is féidir leat glaoch ar an API gan eochair ar chor ar bith - tá iarratais anaithnid ráta-teoranta ag IP. Chun cuóta míosúil níos airde, intuartha (agus úsáid tráchtála), a chruthú eochair ar do leathanach cuntas agus é a sheoladh ar cheann de thrí bhealach:

GET  https://calculator.free/api/v1/mortgage/?price=350000&key=YOUR_KEY
curl -H "Authorization: Bearer YOUR_KEY" "https://calculator.free/api/v1/bmi/?units=metric&height=180&weight=80"
curl -H "X-Api-Key: YOUR_KEY"           "https://calculator.free/api/v1/bmi/?units=metric&height=180&weight=80"
  • Saor — anaithnid (IP ráta-teoranta) nó eochair saor in aisce le cuóta míosúil beag. Neamhthráchtála.
  • Forbróir & mdash; $9/ mí — 10,000 glaoch/mí, úsáid tráchtála.
  • Gnó & mdash; $ 49 / mí — 100,000 glaonna / mí, tríthoiseach tosaíochta.

What counts against your quota

Only a successful response does. One 2xx = one call. Every error is free: a 400 for a misspelled parameter, a bad value or a missing required field, a 404 for an unknown slug, a 401 for a bad key, a 429, and anything that goes wrong on our side. Explore the contract and fix your request as many times as you need — you are billed for answers, not for corrections.

Because errors are free they are rate-limited instead: if one key provokes more than 200 rejected responses in an hour, it gets HTTP 429 "too_many_invalid_requests" until the hour rolls over. Successful calls never count towards that, so a working integration will never see it — it only catches a client stuck in a retry loop.

Nuair a úsáidtear cuóta míosúil eochrach suas, tugann an API HTTP 429 ar ais le hearráid "quota_exceeded"; tugann eochair anaithnid nó neamhghníomhach HTTP 401 ar ais. Féach pleananna iomlán agus clárú ar an Praghsáil leathanach.

Samplaí

curl

curl "https://calculator.free/api/v1/mortgage/?price=350000&down=70000&rate=6.9&years=30"

JavaScript fetch()

const r = await fetch(
  "https://calculator.free/api/v1/bmi/?" + new URLSearchParams({
    units: "metric", height: "180", weight: "80"
  }));
const { results } = await r.json();
console.log(results.bmi, results.category);

Python

import requests

r = requests.get("https://calculator.free/api/v1/mortgage/",
                 params={"price": 350000, "down": 70000,
                         "rate": 6.9, "years": 30},
                 headers={"Authorization": "Bearer YOUR_KEY"})
print(r.json()["results"])

POST JSON

curl -X POST "https://calculator.free/api/v1/income-tax/?country=uk" \
  -H "Content-Type: application/json" \
  -d '{"income": 60000}'

Gach Deireadhphointe

Tá eochracha réimse agus eochracha toraidh do gach ceann acu sa bhileog oibre. /api/v1/ innéacs.

Airgeadas (41)
ÁireamhánDeireadhphointe
Áireamhán Morgáiste /api/v1/mortgage/
Áireamhán na hIasachta /api/v1/loan/
Áireamhán Úis Chomhdhéanta /api/v1/compound-interest/
Áireamhán Simplí Úis /api/v1/simple-interest/
Cárta Creidmheasa Áireamhán Íocaíochta /api/v1/credit-card-payoff/
Áireamhán Costas Breosla /api/v1/fuel-cost/
Áireamhán Iasachta Uathoibríoch /api/v1/auto-loan/
Áireamhán Scoir /api/v1/retirement/
Áireamhán Sprioc Coigiltis /api/v1/savings-goal/
Áireamhán Margaíocht Brabúis /api/v1/margin/
Áireamhán Luach Todhchaí /api/v1/future-value/
Áireamhán Luach Reatha /api/v1/present-value/
Áireamhán ROI /api/v1/roi/
Áireamhán Íocaíochta Blianachta /api/v1/annuity-payout/
Áireamhán do APR go APY /api/v1/apr-to-apy/
Áireamhán CD /api/v1/cd/
Áireamhán Boilscithe /api/v1/inflation/
Áireamhán Inacmhainneacht Baile /api/v1/home-affordability/
Áireamhán Inacmhainneachta Cíosa /api/v1/rent-affordability/
Áireamhán Íocaíochta síos /api/v1/down-payment/
Áireamhán Athmhaoinithe /api/v1/refinance/
Áireamhán Cóimheas Fiachais-go-Ioncam /api/v1/debt-to-income/
Áireamhán Iasachta Bád /api/v1/boat-loan/
Áireamhán Iasachta do Mhic Léinn /api/v1/student-loan/
Áireamhán Iasachta Pearsanta /api/v1/personal-loan/
Áireamhán Léasa Carranna /api/v1/lease/
Áireamhán Glanluach /api/v1/net-worth/
Áireamhán Pointe Briseadh- Cothrom /api/v1/break-even/
Áireamhán SIP /api/v1/sip/
IEA Áireamhán /api/v1/emi/
Áireamhán 401(k) /api/v1/401k/
Roth IRA Áireamhán /api/v1/roth-ira/
Áireamhán IRA Traidisiúnta /api/v1/ira/
Áireamhán buiséid (50/30/20) /api/v1/budget/
Slándáil Shóisialta na hÉireann /api/v1/social-security/
Áireamhán Íocaíochta Fiachais /api/v1/debt-payoff/
Cíos vs Ceannaigh Áireamhán /api/v1/rent-vs-buy/
Áireamhán Íocaíochta Morgáiste /api/v1/mortgage-payoff/
Áireamhán APR /api/v1/apr/
Áireamhán Dímheasa /api/v1/depreciation/
Áireamhán OTI /api/v1/gdp/
Cáin agus Tuarastal (2)
Sláinte & Folláine (28)
ÁireamhánDeireadhphointe
Áireamhán BMI /api/v1/bmi/
Calorie (TDEE) Áireamhán /api/v1/tdee/
Áireamhán Saill Comhlacht /api/v1/body-fat/
Áireamhán Meáchan Ideal /api/v1/ideal-weight/
Áireamhán Iontógáil Uisce /api/v1/water-intake/
Áireamhán BMR /api/v1/bmr/
Áireamhán Luais Reatha /api/v1/running-pace/
Áireamhán Macra /api/v1/macro/
Áireamhán Easnamh Calorie /api/v1/calorie-deficit/
Áireamhán Iontógáil Próitéin /api/v1/protein-intake/
[Translation temporarily unavailable. Please try again.] /api/v1/one-rep-max/
Áireamhán Ráta Croí Uasta /api/v1/max-heart-rate/
Áireamhán Chrios Ráta Croí /api/v1/heart-rate-zones/
Alcól Fola (BAC) Áireamhán /api/v1/bac/
Toirchis Dlite Dáta Áireamhán /api/v1/pregnancy-due-date/
[Translation temporarily unavailable. Please try again.] /api/v1/ovulation/
Waist-to-Hip Cóimheas Áireamhán /api/v1/waist-to-hip-ratio/
Waist-to-Airde Cóimheas Áireamhán /api/v1/waist-to-height-ratio/
Áireamhán mais comhlacht Lean /api/v1/lean-body-mass/
Airm Comhlacht Saill Áireamhán /api/v1/army-body-fat/
Áireamhán Calories Dóite /api/v1/calories-burned/
Céimeanna go Míle Áireamhán /api/v1/steps-to-miles/
Áireamhán Timthriall Codlata /api/v1/sleep/
Áireamhán Achar Dromchla an Choirp /api/v1/body-surface-area/
[Translation temporarily unavailable. Please try again.] /api/v1/period/
Áireamhán Dáta Coincheaptha /api/v1/conception/
Meáchan Gnóthachan Áireamhán do Thoirchis /api/v1/pregnancy-weight-gain/
Áireamhán GFR (eGFR, CKD-EPI) /api/v1/gfr/
Cineál (26)
Staitisticí (15)
Tiontairí Aonad (17)
Eolaíocht & Innealtóireacht (27)
Dáta agus Am (15)
Gach Lá (27)

Is meastacháin iad na torthaí le haghaidh treoir ghinearálta amháin, ní comhairle airgeadais, leighis nó cánach.