مفت ڳڻپيوڪر API

هر هڪ حساب ڪتاب هن سائيٽ تي پڻ مفت JSON API آهي. ڪو به رجسٽريشن، ڪو API ڪوڊ، CORS-فعال - پنهنجي سرور کان يا برائوزر کان سڌو سڌو سڏڻ.

نظرثاني

API صحيح حساب ڪتاب کي استعمال ڪري ٿو. هڪ حساب ڪتاب جي علائقي جي قيمتن کي سوال جي پاراميٽرن يا JSON جي طور تي موڪليو ۽ حساب ڪيل نتيجن کي JSON جي طور تي واپس وٺو - ڪنهن به وڪرو واري منصوبي يا چارٽ ڊيٽا سان گڏ جيڪو حساب ڪتاب پيدا ڪري ٿو.

  • 198+ حساب ڪتاب، هر هڪ پنھنجي آخري نقطي سان
  • API ڪوڙ نه آھي — نامعلوم رسائي، IP جي شرح سان محدود
  • CORSAccess-Control-Allow-Origin: * (استعمال ٿيندڙ ڪلائنٽ- پاسي)
  • شرح جي حد: 60 درخواستون/ ڪلاڪ هر IP (HTTP 429 جڏھن حد کان وڌي وڃي)
  • 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

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

شاخون — سڀئي ڳاڙهو

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

سڀئي ڪليڪٽرن جو مشين-پڙھڻ وارو فہرست موٽائي ٿو، هر هڪ جي ميدان سان (ڪُٻي، ليڪ، قسم، ڊيفالٽ، يونٽ) ۽ نتيجي جون ڪُٻيون - ڪافي ته ڪلائنٽ کي متحرڪ بڻائي. 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.

ڳڻيو — هڪ ڳڻپيوڪر هلايو

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

جوابي شڪل:

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

ملڪ-آگاهه ڳاڙهو (مهرباني، قرض، آمدني-ٽيڪس، وڪرو-ٽيڪس...) قبول ڪريو ?country=us|uk|ca|au|in|ie|nz|za. نامعلوم سلگ 404 موٽائي ٿو، غير مدد ڏنل ملڪ يا خراب داخلا 400 مددگار پيغام ۽ ميدان جي وضاحت سان موٽائي ٿو.

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.

تصديق ۽ منصوبا

توھان API کي ڪابه ڪوڊ نه ھجڻ سان سڏ ڪري سگھو ٿا - نامعلوم درخواستون IP جي شرح سان محدود آھن. وڌي، اندازو ڪيل مهيني جي حصيداري (۽ تجارتي استعمال) لاءِ، پنھنجي اڪائونٽ صفحي تي ڪوڊ ٺاهيو ۽ ان کي ٽين طريقن مان ھڪ موڪليو:

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"
  • مفت — نامعلوم (IP rate-limited) يا مفت ڪوڊ ننڍي مهيني جي حصيداري سان. غير تجارتي.
  • ڊيولپر $9/ مهينو — 10,000 ڪالون/مھينو، تجارتي استعمال.
  • ڪاروبار $49/مھينو — 100,000 ڪالون/مھينو، ترجيحي ٽرانسميشن.

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.

جڏھن ڪوئي مھيني جي ڪوٽائي استعمال ٿئي ٿي API HTTP 429 واپس ڪري ٿو غلطي سان "quota_exceeded"؛ نامعلوم يا غير فعال ڪوئي HTTP 401 واپس ڪري ٿو. ڏسو مڪمل منصوبا ۽ رجسٽر قيمت صفحو.

مثال

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

سڀئي آخر

هر ڳاڙهو ڳڻپيوڪر لاءِ هڪ آخري نقطو. هر هڪ لاءِ ميدان جون ڪُليون ۽ نتيجي جون ڪُليون هيٺ ڏنل آهن. /api/v1/ شاخ.

رقم (41)
ڳڻپيوڪرآخر وارو نقطو
بئنڪ جي حساب /api/v1/mortgage/
قرض جي ڳڻپيندڙ /api/v1/loan/
ڪمپائونڊ فائدي جي ڳڻپيندڙ /api/v1/compound-interest/
سادو فائدو ڳڻيندڙ /api/v1/simple-interest/
ڪريڊٽ ڪارڊ /api/v1/credit-card-payoff/
ڪاربان جي قيمت جو حساب /api/v1/fuel-cost/
خودڪار قرض جي ڳڻپيندڙ /api/v1/auto-loan/
رڪنيت جي حساب /api/v1/retirement/
بچت جي مقصد جي ڳڻپيندڙ /api/v1/savings-goal/
فائدي جي حد جي ڳڻپيندڙ /api/v1/margin/
مستقبل جي قيمت جو ڳڻپيوڪر /api/v1/future-value/
موجوده قيمت جي ڳڻپيندڙ /api/v1/present-value/
ROI ڳڻپيوڪر /api/v1/roi/
سالياني ادائگي جو ڳڻپيوڪر /api/v1/annuity-payout/
حساب ڪتاب /api/v1/apr-to-apy/
سي ڊي ڳڻپيوڪر /api/v1/cd/
inflation ڳڻپيوڪر /api/v1/inflation/
گھر جي قيمت جي حساب /api/v1/home-affordability/
ڪرائي جي مهانگائي جو حساب /api/v1/rent-affordability/
ادائگي جو حساب /api/v1/down-payment/
حساب ڪتاب /api/v1/refinance/
قرض-آئِن جي شرح جو ڳڻپيوڪر /api/v1/debt-to-income/
بوٽ قرض ڳڻپيوڪر /api/v1/boat-loan/
شاگرد قرض جي ڳڻپيندڙ /api/v1/student-loan/
ذاتي قرض جي ڳڻپيندڙ /api/v1/personal-loan/
ڪار جي وڪرو جي حساب /api/v1/lease/
صاف قدر جي ڳڻپيندڙ /api/v1/net-worth/
Break-Even پوائنٽ ڳڻپيوڪر /api/v1/break-even/
SIP ڳڻپيوڪر /api/v1/sip/
EMI ڳڻپيوڪر /api/v1/emi/
401(k) ڳڻپيوڪر /api/v1/401k/
IRA ڳڻپيوڪر /api/v1/roth-ira/
روايتي IRA ڳڻپيوڪر /api/v1/ira/
بجٽ جي حساب ڪتاب (50/30/20) /api/v1/budget/
سماجي حفاظت جي ڳڻپيندڙ /api/v1/social-security/
قرض ادا ڪرڻ وارو ڳڻپيوڪر /api/v1/debt-payoff/
خريد ۽ وڪرو /api/v1/rent-vs-buy/
مائيگيٽ پيپ آف ڪليڪٽر /api/v1/mortgage-payoff/
APR ڳڻپيوڪر /api/v1/apr/
ڦيرگھير جي ڳڻپيندڙ /api/v1/depreciation/
GDP ڳڻپيوڪر /api/v1/gdp/
ٽيڪس ۽ پگهار (2)
صحت ۽ فٽنيس (28)
ڳڻپيوڪرآخر وارو نقطو
BMI ڳڻپيوڪر /api/v1/bmi/
ڪلوري (TDEE) ڳڻپيوڪر /api/v1/tdee/
جسم جي ٿلهائي جو حساب /api/v1/body-fat/
وزن جو حساب /api/v1/ideal-weight/
پاڻي جي استعمال جو حساب /api/v1/water-intake/
BMR ڳڻپيوڪر /api/v1/bmr/
ڊوڙڻ جي رفتار جو حساب /api/v1/running-pace/
ماڪرو ڪئلڪٽر /api/v1/macro/
ڪلوري نقصان جي ڳڻپيندڙ /api/v1/calorie-deficit/
پروٽين جي استعمال جو حساب /api/v1/protein-intake/
هڪ Rep Max ڳڻپيوڪر /api/v1/one-rep-max/
وڌ ۾ وڌ دل جي دڳ جي حساب /api/v1/max-heart-rate/
دل جي شرح جو علائقو /api/v1/heart-rate-zones/
خون جي الڪوحل (BAC) جي حساب /api/v1/bac/
ڳڻپيوڪر /api/v1/pregnancy-due-date/
ايوبوليشن ۽ ڦرڻ وارو حساب /api/v1/ovulation/
ويز-ٽو-هپ تناسب ڳڻپيوڪر /api/v1/waist-to-hip-ratio/
ويڪرو-ويڪرو تناسب ڳڻپيوڪر /api/v1/waist-to-height-ratio/
جسم جي ماپ جو حساب /api/v1/lean-body-mass/
فوجي جسم جي ٿلهائي جو حساب /api/v1/army-body-fat/
ساڙيل کالوريز جو حساب /api/v1/calories-burned/
قدمن کي ميلن ۾ ڳڻپيوڪر /api/v1/steps-to-miles/
سڪون جي دور جو حساب /api/v1/sleep/
جسم جي سطح جي ايراضي جو حساب /api/v1/body-surface-area/
دور جي ڳڻپيندڙ /api/v1/period/
تاريخ جي حساب /api/v1/conception/
ڳڻپيوڪر /api/v1/pregnancy-weight-gain/
GFR ڳڻپيوڪر (eGFR, CKD-EPI) /api/v1/gfr/
قسم (26)
انگ اکر (15)
يونٽ مٽا سٽا (17)
سائنس ۽ انجنيئرنگ (27)
ڳڻپيوڪرآخر وارو نقطو
اوم جو قانون /api/v1/ohms-law/
وولتائيٽ ڪٽڻ وارو حساب /api/v1/voltage-drop/
رسٽورس رنگ ڪوڊ ڳڻپيوڪر /api/v1/resistor-color-code/
ڪنيڪشن چارج جي حساب /api/v1/capacitor-charge/
برقي طاقت جي حساب /api/v1/electrical-power/
فورس ڳڻپيوڪر (F = ma) /api/v1/force/
ڪينيٽڪ انرجي جي حساب /api/v1/kinetic-energy/
توانائي جي حساب /api/v1/potential-energy/
ڳڻپيوڪر /api/v1/density/
مولارٽي ڳڻپيوڪر /api/v1/molarity/
مثالي گئس قانون جي حساب /api/v1/ideal-gas-law/
موج جي ڊگهائي ۽ فريڪوئنسي جو حساب /api/v1/wavelength-frequency/
pH ڳڻپيوڪر /api/v1/ph/
ٽورڪ ڳڻپيوڪر /api/v1/torque/
گيئر رپورٽ /api/v1/gear-ratio/
پروجيڪٽل مووشن ڳڻپيوڪر /api/v1/projectile-motion/
سب نیٹ ڳڻپيوڪر (IPv4 CIDR) /api/v1/subnet/
ٻنھي / Hex / ڏهاڪي تبديل ڪندڙ /api/v1/binary-hex/
BTU ڳڻپيوڪر (AC ۽ گرمي) /api/v1/btu/
اڌ زندگي ڳڻپيوڪر /api/v1/half-life/
مالِڪول وزن /api/v1/molecular-weight/
بجلي جي قيمت جو حساب /api/v1/electricity/
واءُ جي گرمي حساب /api/v1/wind-chill/
گرمي انڊيڪس حساب /api/v1/heat-index/
ڊي پوائنٽ /api/v1/dew-point/
بندشيڊو / ڊائون لوڊ وقت جو حساب /api/v1/bandwidth/
horsepower ڳڻپيوڪر /api/v1/horsepower/
تاريخ ۽ وقت (15)
سڀڪو ڏينھن (27)

نتيجا صرف عام رهنمائي لاءِ اندازا آهن، نه مالي، طبي يا ٽيڪس صلاحون.