MotorCrunch
For developers

Free car-cost API

The same verified formulas behind our calculators, as JSON. No API key and no sign-up. Two conditions: stay under 60 requests/minute per IP, and if you publish figures from this API, show the attribution link that comes with every response — full terms at /api-terms. Prefer a drop-in UI? Use a free widget instead.

GET/api/v1/loan-payment

Fixed-rate auto-loan amortization: monthly payment, total interest and amount financed — identical math to our Auto Loan Calculator.

ParamRequiredDescription
priceyesVehicle price in USD (0–2,000,000).
rateyesAPR as a percentage, e.g. 7.2 (0–50).
termyesLoan term in months (1–120).
downnoDown payment in USD. Default 0.
tradenoTrade-in value in USD. Default 0.
taxnoSales-tax percentage applied after trade-in. Default 0.
curl "https://themotorcrunch.com/api/v1/loan-payment?price=32000&down=4000&rate=7.2&term=60&tax=6"

{
  "endpoint": "/api/v1/loan-payment",
  "result": {
    "monthly_payment": 595.29,
    "total_interest": 5797.63,
    "amount_financed": 29920,
    "currency": "USD"
  },
  "attribution": {
    "required": true,
    "html": "Data by <a href=\"https://themotorcrunch.com/car-financing/auto-loan-calculator\">MotorCrunch</a>",
    "url": "https://themotorcrunch.com/car-financing/auto-loan-calculator"
  }
}

GET/api/v1/cost-per-mile

True operating cost per mile (fuel + maintenance + depreciation + insurance) — identical math to our Cost Per Mile Calculator, the number every gig-driving article needs.

ParamRequiredDescription
annual_milesyesMiles driven per year (1–500,000).
fuel_priceyesFuel price in USD per gallon.
mpgyesVehicle fuel economy in MPG (1–200).
maintenancenoMaintenance + tires per year, USD. Default 0.
depreciationnoDepreciation per year, USD. Default 0.
insurancenoInsurance per year, USD. Default 0.
curl "https://themotorcrunch.com/api/v1/cost-per-mile?annual_miles=30000&fuel_price=3.40&mpg=28&maintenance=1400&depreciation=3200&insurance=1800"

{
  "endpoint": "/api/v1/cost-per-mile",
  "result": {
    "total_cost_per_mile": 0.3348,
    "annual_operating_cost": 10042.86,
    "fuel_cost_per_mile": 0.1214,
    "currency": "USD"
  },
  "attribution": { "required": true, "url": "https://themotorcrunch.com/car-rideshare/cost-per-mile-driving-calculator" }
}

JavaScript example

const res = await fetch(
  "https://themotorcrunch.com/api/v1/loan-payment?price=32000&rate=7.2&term=60"
);
const data = await res.json();
console.log(data.result.monthly_payment); // 616.65
// Publishing this number? Render data.attribution.html next to it (required):
document.querySelector("#credit").innerHTML = data.attribution.html;

Attribution snippet (required when you publish figures)

Every response includes an attribution object. Render its html — or this equivalent — anywhere visible on the page that shows the numbers:

Data by <a href="https://themotorcrunch.com/car-financing/auto-loan-calculator">MotorCrunch</a>

Limits & guarantees

  • • 60 requests/minute per IP; over that you get HTTP 429 with Retry-After. Standard X-RateLimit-* headers on every response.
  • • CORS is open (Access-Control-Allow-Origin: *) — call it straight from the browser.
  • • Figures are estimates from standard published formulas (documented on our methodology page) — never quotes or financial advice.
  • • Versioned under /api/v1/; breaking changes get a new version.
  • • Full terms: https://themotorcrunch.com/api-terms.