KalkuliloName

Ĉiu kalkulilo en ĉi tiu retejo estas ankaŭ libera JSON API. Neniu enskribo, neniu API ŝlosilo, CORS-enŝaltita - voku ĝin de via servilo aŭ rekte de la retumilo.

Overview

La API rulas la precize saman matematikon kiun la retejo uzas. Sendu kalkulilajn kampvalorojn kiel demandparametroj aŭ JSON kaj ricevu la kalkulitajn rezultojn kiel JSON - inkluzive de ajna amortizo aŭ diagramaj datumoj kiujn la kalkulilo produktas.

  • 198+ kalkuliloj, ĉiu kun sia propra finopunkto
  • Neniu API-ŝlosilo — anonima aliro, rapidec- limigita per IP
  • CORSAccess-Control-Allow-Origin: * (uzebla klientflanke)
  • Limito de rapideco: 60 petoj/ horo po IP (HTTP 429 se superita)
  • 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.

Baza URLo

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

Indekso — listigas ĉiun kalkulilon

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

Redonas maŝinlegindajn listojn de ĉiuj kalkuliloj kun la kampoj de ĉiu (ŝlosilo, etikedo, tipo, defaŭlta, unuo) kaj rezultoŝlosiloj — sufiĉe por konstrui klienton dinamike. 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.

Kalkuli — lanĉi unu kalkulilon

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

Respondoformo:

{
  "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"]
}

Land-konsciaj kalkuliloj (hipoteko, prunto, enspezimposto, vend-imposto...) akceptas ?country=us|uk|ca|au|in|ie|nz|za. Nekonata ŝraŭbo redonas 404; nesubtenita lando aŭ malbona enigo redonas 400 kun helpa mesaĝo kaj la kampospecifo.

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.

Aŭtentigo

Vi povas voki la API sen ŝlosilo - anonimaj petoj estas limigitaj laŭ IP. Por pli alta, antaŭvidebla monata kvoto (kaj komerca uzo), kreu ŝlosilon en via kontpaĝo kaj sendu ĝin unu el tri manieroj:

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"
  • Libera — anonima (IP- limigita) aŭ libera ŝlosilo kun malgranda monata kotizo. Nekomerca.
  • Programisto &mdash; $9/mo — 1000♠ 1000♠ 100♠ 1000
  • Business &mdash; $49/mo — 100.000 personoj, ĉefe en la ĉefurbo.

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.

Kiam la monata kvoto de ŝlosilo estas elĉerpita, la API redonas HTTP 429 kun eraro "quota_exceeded"; nekonata aŭ neaktiva ŝlosilo redonas HTTP 401. Vidu plenajn planojn kaj subskribu por la Prezoj paĝo.

Ekzemploj

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}'

Ĉiuj finpunktoj

Unu finpunkto por kalkulilo. Kampaj kaj rezulto-klavoj por ĉiu estas en la /api/v1/ indekso.

Financo (41)
KalkuliloFinpunkto
Hipoteka kalkuliloName /api/v1/mortgage/
Kalkulilo de pruntoj /api/v1/loan/
Kalkulilo de komponita interezo /api/v1/compound-interest/
Simpla interezkalkuliloName /api/v1/simple-interest/
Kalkulilo por kreditkartaj pagoj /api/v1/credit-card-payoff/
Kalkulilo de brulaĵokostoj /api/v1/fuel-cost/
Aŭtomata pruntkalkulilo /api/v1/auto-loan/
[Translation temporarily unavailable. Please try again.] /api/v1/retirement/
Kalkulilo de ŝparceloj /api/v1/savings-goal/
Kalkulilo de profitmarĝeno /api/v1/margin/
Kalkulilo de estontaj valoroj /api/v1/future-value/
Kalkulilo de nuna valoro /api/v1/present-value/
[Translation temporarily unavailable. Please try again.] /api/v1/roi/
Kalkulilo de pagoj /api/v1/annuity-payout/
Kalkulilo de APR al APY /api/v1/apr-to-apy/
KD- kalkulado /api/v1/cd/
Inflacia kalkulilo /api/v1/inflation/
Kalkulilo de hejma aĉetebleco /api/v1/home-affordability/
Kalkulilo de luprezoj /api/v1/rent-affordability/
Kalkulilo de antaŭpagoj /api/v1/down-payment/
Kalkulilo de refinancado /api/v1/refinance/
Kalkulilo de ŝuldo-al-enspezo-raporto /api/v1/debt-to-income/
Kalkulilo de boatpruntoj /api/v1/boat-loan/
Kalkulilo por studentaj pruntoj /api/v1/student-loan/
Persona pruntkalkuliloName /api/v1/personal-loan/
Kalkulilo de aŭtomobila prunto /api/v1/lease/
Kalkulilo de Netvaloro /api/v1/net-worth/
Kalkulilo de ekvilibra punkto /api/v1/break-even/
KalkuliloName /api/v1/sip/
Kalkulilo de EMI /api/v1/emi/
Kalkulilo /api/v1/401k/
[Translation temporarily unavailable. Please try again.] /api/v1/roth-ira/
Tradicia IRA-kalkulilo /api/v1/ira/
Buĝetkalkulilo (50/30/20) Name /api/v1/budget/
Kalkulilo de socia sekureco /api/v1/social-security/
Kalkulilo de ŝuldo /api/v1/debt-payoff/
[Translation temporarily unavailable. Please try again.] /api/v1/rent-vs-buy/
Kalkulilo de hipotekaj pagoj /api/v1/mortgage-payoff/
APR-kalkulilo /api/v1/apr/
Kalkulilo de malŝparo /api/v1/depreciation/
GDP-kalkulilo /api/v1/gdp/
Imposto kaj salajro (2)
Sano kaj FitnessName (28)
& Tipo: (26)
Statistiko (15)
Unuo- konvertiloj (17)
Scienco kaj inĝenierartoName (27)
Dato kaj Tempo (15)
Everyday (27)

La rezultoj estas taksadoj por ĝenerala gvidado nur, ne financa, medicina aŭ imposta konsilo.