Mortgage estimate
https://idx.ruuster.com/v1/mortgage/estimatepublishable or secret key · free · cached 3600 s
Estimate the monthly payment for a home price, with principal and interest, property tax, home insurance, mortgage insurance and HOA dues, at today's market rates.
A monthly payment estimate for one price, line by line, at today's market rates. The listing page's
MortgageCalculator calls it with your publishable key and shows the answer; on other stacks,
ruuster-idx.js does the same from the page's markup.
What to know
- Send
priceand the home'sstate(or itszip). Everything else has a default: 20 percent down, a 30-year fixed conventional loan in the United States, and a 5-year fixed term on a 25-year amortization in Canada. - Send the listing's HOA dues and yearly tax when you have them. Without
hoaMonthlythe HOA line is 0. A yearly tax or insurance figure you leave out is estimated, andmonthly.provenancemarks that lineestimatedso the page can show an "est." badge. - The answer's
optionslists the loan types and terms for the home's country. A term value of30-armmeanstermYears=30withrateType=arm. - A scenario that misses a loan type's rules still answers 200, with
eligible: falseandineligibleReasonssaying what to change in full sentences. - Show every line of
requiredDisclosuresunder the estimate. - It costs no daily units. Rates refresh hourly, and when a refresh fails the last rates stay in
use with
stale: true, so the page can say the rates may be a few days old. - From the browser, call it with your publishable key as
?key=. Answers to a publishable key are cached for 5 minutes per scenario, so the same price, down payment and place reuse one answer.
Where it is used
- Mortgage calculator: the
MortgageCalculatorrecipe component and its place on the listing page. - The TypeScript SDK:
idx.mortgage(query)on your server, andtoMortgageQueryString(query)for the same query string the calculator sends.
Query parameters
| Name | Type | Description |
|---|---|---|
price |
number 1000 to 100000000 | The home price in dollars (required). On a listing page, send the listing's price. |
downPayment |
number 0 to 100000000 | The down payment in dollars, at most the price. Send this or downPaymentPercent, not both; with neither the estimate uses 20 percent. |
downPaymentPercent |
number 0 to 100 | The down payment as a percent of the price (0 to 100). Send this or downPayment, not both. |
loanType |
enum | The loan type. In the United States: conventional (the default), fha, va, usda or jumbo. In Canada: fixed (the default), variable or adjustable. The answer's options.loanTypes lists the ones that apply. Values: conventional, fha, va, usda, jumbo, fixed, variable, adjustable. |
termYears |
integer 1 to 30 | The loan term in years. In the United States 30 (the default), 20 or 15. In Canada the contract term, 1 to 10 (default 5). |
rateType |
enum, default fixed | United States only: fixed, or arm for a 5/6 adjustable-rate loan (termYears 30). Values: fixed, arm. |
amortizationYears |
integer 15 to 30 | Canada only: the years to pay the loan off (15 to 30, default 25). |
creditScore |
enum, default 760+ | United States only: the buyer's credit score range, which sets the rate's credit adjustment. Values: 760+, 740-759, 720-739, 700-719, 680-699, 660-679, 640-659, 620-639, <620. |
rate |
number 0 to 15 | An annual interest rate in percent that replaces today's market rate (for example 6.25). |
state |
string | The home's two-letter state code (or Canadian province code, which makes the estimate Canadian). It sets the insurance average. Send state or zip. |
zip |
string | The home's five-digit ZIP code. Without state, the estimate reads the state from it. |
hoaMonthly |
number 0 to 100000 | Monthly HOA dues (condo fees in Canada) in dollars. Without it the estimate shows 0 for this line. |
propertyTaxAnnual |
number 0 to 10000000 | The yearly property tax in dollars. Without it the estimate uses a national average and marks the line as estimated. |
insuranceAnnual |
number 0 to 1000000 | The yearly home insurance in dollars. Without it the estimate uses the state's average for the price and marks the line as estimated. |
Response
The answer is { ok: true, data, meta }. These are the fields of data; meta carries brokerageId, freshness.asOf, mls (each board's display rules) and canonical.
| Field | Type | Description |
|---|---|---|
country |
string (enum) | US, or CA when state is a Canadian province. One of US, CA. |
currency |
string (enum) | The currency of every amount. One of USD, CAD. |
inputs |
object | The inputs as the calculator used them, defaults filled in. |
inputs.price |
number | The home price. In dollars, two decimals at most. |
inputs.downPayment |
number | The down payment. In dollars, two decimals at most. |
inputs.downPaymentPercent |
number | The down payment as a percent of the price. |
inputs.loanType |
string (enum) | The loan type used. One of conventional, fha, va, usda, jumbo, fixed, variable, adjustable. |
inputs.termYears |
integer | The term in years (in Canada the contract term). |
inputs.rateType |
string (enum) | fixed, or arm for a 5/6 adjustable-rate loan (United States). One of fixed, arm. |
inputs.amortizationYears |
integer or null | Canada: the years to pay the loan off; null in the United States. |
inputs.creditScore |
string (enum) | The credit score range used (United States). One of 760+, 740-759, 720-739, 700-719, 680-699, 660-679, 640-659, 620-639, <620. |
inputs.state |
string | The state or province code used. |
inputs.zip |
string or null | The ZIP code sent, or null. |
options |
object | The choices for the loan type and term dropdowns. |
options.loanTypes |
array of object | The loan types for this country, in display order. |
options.loanTypes[].value |
string | The parameter value to send. |
options.loanTypes[].label |
string | The text a dropdown shows. |
options.terms |
array of object | The terms for this country, in display order. A US value of the form 30-arm means termYears=30 and rateType=arm. |
options.terms[].value |
string | The parameter value to send. |
options.terms[].label |
string | The text a dropdown shows. |
eligible |
boolean | false when the scenario misses the loan type's rules. Every figure still calculates. |
ineligibleReasons |
array of string | What to change, as full sentences; empty when eligible. |
rate |
object | The interest rate. |
rate.annualPercent |
number | The annual interest rate in percent. |
rate.asOf |
string | The day of the market rates (YYYY-MM-DD). |
rate.isEstimated |
boolean | true when the rate is derived rather than a published rate for this exact loan. |
rate.isOverride |
boolean | true when the request's rate parameter replaced the market rate. |
loan |
object | The loan. |
loan.amount |
number | The loan amount, including any financed upfront fee. In dollars, two decimals at most. |
loan.ltvPercent |
number | The loan amount as a percent of the price. |
loan.cashAtClosing |
number | The cash needed at closing, down payment included. In dollars, two decimals at most. |
monthly |
object | The monthly payment, line by line. |
monthly.principalAndInterest |
number | Principal and interest each month. In dollars, two decimals at most. |
monthly.propertyTax |
number | Property tax each month. In dollars, two decimals at most. |
monthly.homeInsurance |
number | Home insurance each month. In dollars, two decimals at most. |
monthly.mortgageInsurance |
number | Mortgage insurance each month (0 when none). In dollars, two decimals at most. |
monthly.hoa |
number | HOA dues (condo fees in Canada) each month, 0 when none. In dollars, two decimals at most. |
monthly.total |
number | The whole monthly payment. In dollars, two decimals at most. |
monthly.provenance |
object | Which lines were sent and which the calculator estimated. |
monthly.provenance.propertyTax |
string (enum) | actual = sent in the request; estimated = an average the calculator used (show an "est." badge). One of actual, estimated. |
monthly.provenance.homeInsurance |
string (enum) | actual = sent in the request; estimated = an average the calculator used (show an "est." badge). One of actual, estimated. |
monthly.provenance.hoa |
string (enum) | actual = sent in the request; estimated = an average the calculator used (show an "est." badge). One of actual, estimated. |
mortgageInsuranceNote |
string or null | A sentence about mortgage insurance (when it ends, or the upfront premium); null when there is none. |
requiredDisclosures |
array of string | The calculator's required disclosures. A page that shows the estimate shows these under it. |
stale |
boolean | true when some rates are not today's; the page says the rates may be out of date. |
Errors
These are the error codes this endpoint can answer. Every error has the same body; Errors explains each code and what to show.
invalid_parameter, secret_key_in_url, invalid_credentials, missing_credentials, payment_required, access_revoked, brokerage_not_enabled, origin_not_allowed, origin_required, secret_key_in_browser, internal_error, api_paused, source_unavailable