API Documentation
RESTful API for mortgage rate data and lender information
Base URL
https://mortgage-rate-monitor.vercel.app
Version
v1.0
Endpoints
GET
/api/lenders
Get a list of lenders with filtering and pagination
Parameters
lender_typestring
Filter by type (national, regional, state, local, credit_union, online)
statestring
Filter by state (e.g., CA, TX, FL)
loan_typestring
Filter by loan type (conventional, fha, va, usda, jumbo)
termnumber
Filter by loan term in years (30, 15, 10)
sortstring
Sort by field (rate, apr, rating, reviews, name)
limitnumber
Number of results (default: 20, max: 100)
offsetnumber
Pagination offset (default: 0)
Response
{
"lenders": [...],
"total": 42,
"limit": 20,
"offset": 0
}Example Request
/api/lenders?lender_type=national&loan_type=conventional&term=30&sort=rate&limit=10
Getting Started
Authentication
Currently, no authentication is required for public endpoints. Rate limits apply:
- 100 requests per minute per IP
- 1000 requests per hour per IP
Rate Limiting
API responses include rate limit headers:
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 95 X-RateLimit-Reset: 1699999999
Error Handling
The API uses standard HTTP status codes:
- 200 - Success
- 400 - Bad Request
- 404 - Not Found
- 429 - Rate Limit Exceeded
- 500 - Server Error
Code Examples
JavaScript/Node.js
const response = await fetch( 'https://mortgage-rate-monitor.vercel.app/api/lenders?loan_type=conventional' ); const data = await response.json(); console.log(data.lenders);
Python
import requests
response = requests.get(
'https://mortgage-rate-monitor.vercel.app/api/lenders',
params={'loan_type': 'conventional'}
)
data = response.json()
print(data['lenders'])cURL
curl -X GET "https://mortgage-rate-monitor.vercel.app/api/lenders?loan_type=conventional" \
-H "Accept: application/json"