Data & Analytics

Historical rate time-series per product/state

Returns a date-ranged, point-in-time rate time-series for a product/state over a requested window (bounded by data retention). Each point is a day or week bucket with min/median/max APR and a count of underlying offers; empty buckets are included with count 0 and null values so the series is chart-ready. Also returns a summary of the move across the window (first vs last median, delta, down/up/flat direction). Differs from /v1/rate-delta (a single now-vs-then comparison): this returns the full series for dashboards, charts, backtests, and timing confidence. This route is the single source of truth; the MCP get_rate_history tool and the consumer app call it.

Authentication required: Pass your API key in the X-API-Key header.

post/v1/rate-history

Request

  • Base URL: https://api.rateapi.dev
  • URL: https://api.rateapi.dev/v1/rate-history
  • Auth: API key in header X-API-Key

Request body

product_type'auto_loan' | 'mortgage' | 'heloc' | 'personal_loan' | 'student_loan' | 'credit_card' required

Loan or deposit product this applies to.

statestring required

2-letter US state code

window'30d' | '60d' | '90d' | '180d' | '365d'

Lookback window. Defaults to 90d. Bounded by data retention; bad values clamp to the default.

interval'day' | 'week'

Bucket granularity per point. Defaults to week; bad values clamp to the default.

vehicle_condition'new' | 'used' | 'cpo'

auto_loan only; selects the benchmark bucket. Defaults to new.

Example request

{
  "product_type": "mortgage",
  "state": "CA",
  "window": "90d",
  "interval": "week",
  "vehicle_condition": "new"
}

Response

Ascending time-series of bucketed rate stats plus a summary. Degrades to an empty series with an explanatory note when history is thin.

product_typestring

Loan or deposit product this applies to.

statestring

Two-letter US state code.

windowstring

How far back the series reaches.

intervalstring

How the series is bucketed.

notestring

Plain-language explanation of what this result means.

Changes

No recorded changes to this operation across all 1 revision of this API.