Market Rates · integration guide

A live market signal in one script.

Last updated: September 7, 2026

Public, cached, keyless rate modules for editorial pages, dashboards, calculators, and lender experiences.

1

Install

Paste the script where the module should render. It loads the public widget, fetches a bounded leaderboard, and includes RateAPI attribution and methodology links. No API key or backend is required.

<>HTML — complete install
<script
src="https://rateapi.dev/widgets/v1/embed.js"
data-rateapi
data-product="30-year-fixed"
data-theme="dark"
></script>

Safe public boundary

This widget reads public market data. It does not accept personal facts, determine membership eligibility, or produce an individualized product recommendation.

2

Choose a product

Set one data-product value. The builder previews the exact module before you copy it.

ValuePublished productsPrimary metric
30-year-fixed30-year fixed mortgagesAPR
15-year-fixed15-year fixed mortgagesAPR
allMortgage terms togetherAPR
auto-newNew auto loansAPR
auto-usedUsed auto loansAPR
cdCertificates and CDsAPY
savingsSavings and share savingsAPY
money-marketMoney market accountsAPY
3

Choose a layout

Card

The default ranked table. Use it when readers need institution, product, rate, verification, and context together.

Ticker

An inline market signal that inherits the host page's font, size, and color. It intentionally omits card-only controls.

<>HTML — ticker
<!-- Place inside your existing ticker or stat bar -->
<span class="market-signal">
<script
src="https://rateapi.dev/widgets/v1/embed.js"
data-rateapi
data-product="cd"
data-variant="ticker"
data-state="NY"
></script>
</span>

Stat

A compact sourced figure for a content card. Keep the numeric rate out of your static headline so it cannot become stale.

<>HTML — stat
<article class="market-card">
<p>Rate watch</p>
<h3>Published 30-year mortgage pricing</h3>
<script
src="https://rateapi.dev/widgets/v1/embed.js"
data-rateapi
data-product="30-year-fixed"
data-variant="stat"
data-state="CA"
></script>
</article>
4

Configure

AttributeValuesBehavior
data-themedark, light, autoCard theme; inline layouts inherit the host.
data-stateTwo-letter US stateScopes the board; invalid values fall back to nationwide.
data-sortapr, rate, institutionLending card sort. Deposits remain APY-ranked.
data-show-aprfalseHides the APR column on lending cards.
data-show-verifiedfalseHides verification badges, not source attribution.
data-show-metricsfalseHides the summary strip on cards.
data-compactBoolean attributeUses denser card spacing.

The module is deliberately capped at five rows. There is no data-limit option to imply a larger public feed.

5

Publish

W

WordPress

  1. Add a Custom HTML block.
  2. Paste the complete script.
  3. Preview and publish.
◇

Webflow

  1. Add an Embed element.
  2. Paste the script.
  3. Publish the site.
</>

React / Next.js

  1. Render the script after hydration.
  2. Keep attributes unchanged.
  3. Allow the RateAPI script origin.

Attribution is part of the data contract

The free widget keeps RateAPI source and methodology links. Do not cover, remove, or restyle evidence in a way that obscures what the number represents.

6

Troubleshoot

Nothing renders

Confirm the script is not being stripped by your CMS, allow https://rateapi.dev in Content Security Policy, and check the browser console for blocked scripts.

The ticker looks different

That is intentional: ticker typography and color inherit from its parent. Apply host-page styles to the wrapper around the script.

You need person-level product matching

Market Rates is the wrong boundary for customer facts. Use RateAPI Routes, which is private, no-store, origin-restricted, and evidence-backed.

Preview the exact embed.

Configure the product and layout, then copy production-ready markup.