GET — Mortgage Products
This is a read-only API that allows you to retrieve a list of available mortgage products in the United States. It is designed for developers, data scientists, and real estate professionals who want to integrate mortgage data into their applications or use it for research purposes.
URL
https://api.ratespot.io/v1/api
Authentication
To get started with this endpoint, you will need a valid, active RateSpot account and an API key. Please refer back to the Authentication section for more information on how to create an account and get an API key.
Once you have an API key, you should pass it to the endpoint by including it as a query parameter called apikey
in the URL every time you make a request:
https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY
Query Parameters
This endpoint accepts the following filters as URL query parameters:
Parameter | Type | Required | Multiple | Accepted Values |
---|---|---|---|---|
apikey | string | yes | no | Your RateSpot API key |
state | string | no | no | Any allowed US state abbreviation (e.g. CA or NY ) |
zipcodes | number | no | yes | Any allowed US zip code (e.g. 94501 ) |
interval | number | no | no | Any integer representing minutes |
Allowed states
Free users can only request mortgage products from California (CA
) and New York (NY
), while paid users can request mortgage products from a larger set of states. If you want to request mortgage products from other states, you will need to upgrade to a paid plan and get a paid API key.
Please refer to the RateSpot Website for more information about the available plans.
Sending any other state than the ones allowed for your plan will result in the API falling back to the default state (CA
).
Allowed zip codes
While we have a comprehensive list of supported zip codes, you may encounter some that aren't currently available. No worries! You can easily add those zip codes directly in our API Portal.
For free users, mortgage product requests are limited to California and New York zip codes. Paid users enjoy access to a wider range of zip codes. To explore our available plans, visit the RateSpot Website.
How to filter by multiple zip codes
If you want to filter by multiple zip codes, you will need to send the zipcodes
parameter multiple times, once for each zip code you want to filter by.
https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY&zipcodes=ZIPCODE1&zipcodes=ZIPCODE2
state
and zipcodes
overlap
Avoid sending both state
and zipcodes
, as state
overrides zipcodes
, rendering the latter ineffective. For filtering by zipcodes
, send only zipcodes
.
Pagination Parameters
This endpoint accepts the following pagination parameters as URL query parameters:
Parameter | Type | Required | Multiple | Accepted Values |
---|---|---|---|---|
limit | number | no | no | Any natural number starting from 10 |
offset | number | no | no | Any natural number |
Setting a limit lower than 10
will result in the API falling back to 10
.
Examples
Get mortgage products from California (CA)
The following examples show how to retrieve available mortgage products in California (CA):
- Bash
- Python
curl "https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY&state=CA"
import requests # pip install requests
ENDPOINT = "https://api.ratespot.io/v1/api"
params = {
"apikey": "YOUR_API_KEY",
"state": "CA",
}
response = requests.get(ENDPOINT, params=params)
print(response.json())
{
"data": [
{
"apr": 8.361,
"credit_score": 730,
"down_payment": 203693.0,
"is_jumbo": false,
"lender_name": "Rocket Mortgage",
"load_datetime": "Wed, 29 Nov 2023 17:59:33 GMT",
"mat_years": "30",
"mo_payment": 6049.64,
"mortgage_type": "refinance",
"nmls": "3030",
"points": 2.0,
"purchase_price": 1018463.0,
"rate": 8.125,
"rate_desc": "30 year fixed refinance",
"rate_lock_used": "45",
"upfront_costs": 17795.4,
"zipcode": 94611
}
// ... 999 more results
],
"error": null,
"message": null,
"results": {
"current_page": 1,
"next_page": "https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY&state=CA&interval=60&limit=1000&offset=2",
"pages": 3,
"results_per_page": 1000,
"total": 2979
}
}
Get mortgage products from California (CA) in the last 10 minutes
The following examples show how to retrieve the available mortgage products from California (CA
) in the last 10
minutes:
- Bash
- Python
curl "https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY&state=CA&interval=10"
import requests # pip install requests
ENDPOINT = "https://api.ratespot.io/v1/api"
params = {
"apikey": "YOUR_API_KEY",
"state": "CA",
"interval": 10,
}
response = requests.get(ENDPOINT, params=params)
print(response.json())
{
"data": [
{
"apr": 7.882,
"credit_score": 650,
"down_payment": 137430.0,
"is_jumbo": false,
"lender_name": "PADDIO",
"load_datetime": "Wed, 29 Nov 2023 18:12:57 GMT",
"mat_years": "20",
"mo_payment": 1568.0,
"mortgage_type": "Refinance",
"nmls": "1907",
"points": 0.813,
"purchase_price": 343575.0,
"rate": 6.75,
"rate_desc": "PERIOD_FIXED_20YEARS",
"rate_lock_used": "30",
"upfront_costs": 7345.0,
"zipcode": 90308
}
// ... 32 more results
],
"error": null,
"message": null,
"results": {
"current_page": 1,
"next_page": null,
"pages": 1,
"results_per_page": 1000,
"total": 33
}
}
Get mortgage products from 78012 (Texas zip code)
The following examples show how to retrieve the available mortgage products in Texas (78012
):
- Bash
- Python
curl "https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY&zipcodes=78012"
import requests # pip install requests
ENDPOINT = "https://api.ratespot.io/v1/api"
params = {
"apikey": "YOUR_API_KEY",
"zipcodes": 78012,
}
response = requests.get(ENDPOINT, params=params)
print(response.json())
{
"data": [
{
"apr": 8.379,
"credit_score": 650,
"down_payment": 50175.0,
"is_jumbo": false,
"lender_name": "PADDIO",
"load_datetime": "Wed, 29 Nov 2023 16:52:46 GMT",
"mat_years": "20",
"mo_payment": 1587.0,
"mortgage_type": "Purchase",
"nmls": "1907",
"points": 0.813,
"purchase_price": 250874.0,
"rate": 7.25,
"rate_desc": "PERIOD_FIXED_20YEARS",
"rate_lock_used": "30",
"upfront_costs": 7151.0,
"zipcode": 78012
}
/// ... 3 more results
],
"error": null,
"message": null,
"results": {
"current_page": 1,
"next_page": null,
"pages": 1,
"results_per_page": 1000,
"total": 4
}
}
Paginate mortgage products from California (CA)
The following examples show how to retrieve the available mortgage products in California (CA) with a limit of 10 per page:
- Bash
- Python
curl "https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY&state=CA&limit=10"
import requests # pip install requests
ENDPOINT = "https://api.ratespot.io/v1/api"
params = {
"apikey": "YOUR_API_KEY",
"state": "CA",
"limit": 10,
}
response = requests.get(ENDPOINT, params=params)
print(response.json())
{
"data": [
{
"apr": 8.361,
"credit_score": 730,
"down_payment": 203693.0,
"is_jumbo": false,
"lender_name": "Rocket Mortgage",
"load_datetime": "Wed, 29 Nov 2023 17:59:33 GMT",
"mat_years": "30",
"mo_payment": 6049.64,
"mortgage_type": "refinance",
"nmls": "3030",
"points": 2.0,
"purchase_price": 1018463.0,
"rate": 8.125,
"rate_desc": "30 year fixed refinance",
"rate_lock_used": "45",
"upfront_costs": 17795.4,
"zipcode": 94611
}
// ... 9 more results
],
"error": null,
"message": null,
"results": {
"current_page": 1,
"next_page": "https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY&state=CA&interval=60&limit=10&offset=2",
"pages": 304,
"results_per_page": 10,
"total": 3035
}
}
Go to the next page of mortgage products from California (CA)
The following example show how to retrieve the available mortgage products from the second page of the previous example:
- Bash
- Python
curl "https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY&limit=10&offset=2"
import requests # pip install requests
ENDPOINT = "https://api.ratespot.io/v1/api"
params = {
"apikey": "YOUR_API_KEY",
"limit": 10,
"offset": 2,
}
response = requests.get(ENDPOINT, params=params)
print(response.json())
{
"data": [
{
"apr": 7.607,
"credit_score": 730,
"down_payment": 203693.0,
"is_jumbo": false,
"lender_name": "Watermark Home Loans",
"load_datetime": "Wed, 29 Nov 2023 17:59:33 GMT",
"mat_years": "7",
"mo_payment": 5489.26,
"mortgage_type": "refinance",
"nmls": "1838",
"points": 2.0,
"purchase_price": 1018463.0,
"rate": 7.125,
"rate_desc": "7/1 ARM refinance",
"rate_lock_used": "30",
"upfront_costs": 17879.4,
"zipcode": 94611
}
// ... 9 more results
],
"error": null,
"message": null,
"results": {
"current_page": 2,
"next_page": "https://api.ratespot.io/v1/api?apikey=YOUR_API_KEY&state=CA&interval=60&limit=10&offset=3",
"pages": 304,
"results_per_page": 10,
"total": 3035
}
}
Schemas
This endpoint comes with a standard JSON response schema that fits with most applications. This section describes the response schema and the fields included in the response data object.
Response data schema
The response data object contains the following fields:
Field | Type | Description |
---|---|---|
data | array | A list of mortgage products. |
error | string | An error message, if there is one. |
message | array | A list of event messages, if there are any. |
results | object | Information about the results, such as the current page, next page URL, total number of pages, and total number of results. |
Mortgage product schema
Each mortgage product included in the data
array contains the following fields:
Field | Type | Description |
---|---|---|
apr | number | Annual percentage rate. |
credit_score | number | Minimum credit score required to qualify for the mortgage. |
down_payment | number | Minimum down payment required to qualify for the mortgage, in USD. |
is_jumbo | boolean | Whether the mortgage is a jumbo mortgage. |
lender_name | string | Name of the lender offering the mortgage. |
load_datetime | string | Date and time when the mortgage was last updated. |
mat_years | string | Maturity years of the mortgage. |
mo_payment | number | Monthly payment amount for the mortgage, in USD. |
mortgage_type | string | Type of mortgage (e.g. "purchase" or "refinance" ) |
nmls | string | NMLS number of the lender offering the mortgage. |
points | number | Number of points charged for the mortgage. |
purchase_price | number | Purchase price of the home that the mortgage is for, in USD. |
rate | number | Interest rate of the mortgage. |
rate_desc | string | Description of the mortgage interest rate (e.g., 30-year fixed). |
rate_lock_used | string | Number of days the mortgage interest rate is locked for. |
upfront_costs | number | Total upfront costs associated with the mortgage, in USD. |
zipcode | number | Zip code of the property that the mortgage is for. |