Mortgage Rate API
The Mortgage Rate API provides access to current daily and historical mortgage rate data going back decades.
From 9,633 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 299ms | 327ms | 382ms | 760ms | 1212ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/v2/mortgagerate GET
https://api.api-ninjas.com/v2/mortgagerate
Returns the daily 30-year and 15-year fixed-rate mortgage (FRM) data. If no parameters are set, the mortgage rate data for the most recent day is returned.
Parameters
dateoptional premium onlyIndividual date to query in
YYYY-MM-DDformat.min_dateoptional premium onlyMinimum date range to query in
YYYY-MM-DDformat. Must be used withmax_date.max_dateoptional premium onlyMaximum date range to query in
YYYY-MM-DDformat. Must be used withmin_date.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.
dateDate for the rate data in
YYYY-MM-DDformat.frm_3030-year fixed-rate mortgage (FRM) rate as a percentage.
frm_1515-year fixed-rate mortgage (FRM) rate as a percentage.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v2/mortgagerate?date=2026-05-12Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v2/mortgagerate" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
Frequently Asked Questions
Can I use the Mortgage Rate API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Mortgage Rate API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Mortgage Rate API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Mortgage Rate API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.What rates does the Mortgage Rate API return?
Each object in the JSON array includes adatealong withfrm_30andfrm_15, the 30-year and 15-year fixed-rate mortgage (FRM) rates as percentages. To turn these rates into monthly payment estimates, pair them with the Mortgage Calculator API.How do I pull historical mortgage rates for a date range?
Use themin_dateandmax_dateparameters together (both inYYYY-MM-DDformat) to retrieve every daily record in that window, or usedatefor a single day; these date parameters are premium-only, so see pricing for access. Calling the endpoint with no parameters returns the most recent day's rates.How far back does the historical mortgage rate data go?
The API provides current daily and historical fixed-rate mortgage data going back decades. To compare against other rate benchmarks over time, check the Interest Rate API or the LIBOR API.What happens if I request a date that has no rate data?
Mortgage rates are published on business days, so querying a weekend or holiday may return no matching record, and an unsuccessful request returns an error instead of rate fields. See the full list of status codes on the error codes page.