Add current mortgage rates to your product.
Call /v1/rates with product_type=mortgage. Filter by geography and loan scenario, then render the lender’s published product name, rate, APR, points, and as_of. The inventory covers US credit unions and keeps benchmark series separate.
The request your backend makes
/v1/ratesQuery a comparable mortgage cohort and sort it on the server.
curl -X POST "https://api.rateapi.dev/v1/rates" \ -H "Authorization: Bearer $RATEAPI_KEY" \ -H "Content-Type: application/json" \ -d '{ "product_type": "mortgage", "state": "NC", "term_months": 360, "loan_program": "conventional", "occupancy": "primary", "sort": "apr_asc", "limit": 50 }'Model the scenario before ranking
- state
- Mortgage pricing and product availability vary geographically. Query the borrower’s market.
- term_months
- Use 360 for a 30-year term or 180 for a 15-year term when those are the cohorts you intend to compare.
- loan_program
- Keep conventional, FHA, VA, jumbo, and other published programs in their own comparable cohorts.
- occupancy
- Primary residence, second home, and investor pricing are different products.
- rate, apr, points
- Return and display them separately. A low note rate with points is not equivalent to a zero-point offer.
- as_of
- The observation timestamp. Suppress stale inventory according to one explicit policy.
A server-side integration
const result = await fetch("https://api.rateapi.dev/v1/rates", { method: "POST", headers: { Authorization: `Bearer ${process.env.RATEAPI_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ product_type: "mortgage", state: userState, term_months: 360, loan_program: "conventional", sort: "apr_asc", limit: 25, }),}); if (!result.ok) throw new Error(`RateAPI returned ${result.status}`);const { rates } = await result.json(); return rates.map((offer) => ({ lender: offer.lender, product: offer.product_name, rate: offer.rate, apr: offer.apr, points: offer.points, observedAt: offer.as_of,}));A mortgage rate card needs context
State the scenario
Term, program, occupancy, and points belong beside the number. Without them, two offers may only look comparable.
Show rate and APR separately
The note rate drives interest accrual; APR is a standardized cost measure. Preserve both fields.
Show when it was observed
Render
as_ofnear the offer and remove rows that exceed your freshness policy.Keep approval language out
A published offer is not a preapproval. Let the lender make underwriting claims.
Frequently asked questions
Call GET or POST /v1/rates with product_type=mortgage, add the state and loan terms your visitor selected, and render the returned rate, APR, points, product name, lender, and as_of timestamp. Keep the API key on your server.
Yes. Filter by state, lender, term_months, loan_program, occupancy, audience, and APR bounds. Results support APR, rate, or freshness sorting with limit/offset pagination.
No. RateAPI serves published credit-union offers. Freddie Mac, FRED, Treasury, SOFR, and Federal Reserve series are benchmarks or indices and answer a different question.
No. A published offer is inventory, not an underwriting decision. Eligibility and lender approval remain separate steps.