Skip to content
/ demos Public

7 production-ready demos: AI mortgage agents (GPT-4/LangChain), React widgets, Chrome extensions (Zillow/Redfin/Projection Lab), webhook monitors. 34,930 rates from 2,918 US credit unions. Zero-dependency CLI to full TypeScript. Mock modes included. Fork, learn, ship.

License

Notifications You must be signed in to change notification settings

rate-api/demos

RateAPI Demos

Example implementations showing how to integrate RateAPI into your applications

RateAPI Live Data - 34,930 rates from 2,918 credit unions

Pick a DemoDemo DetailsDocumentationGet API Key


Node.js Version License Demos API Status GitHub stars GitHub forks

This is a collection of developer demos — working code examples that show how to integrate RateAPI's mortgage rate data into different types of applications. Fork the code, learn from it, and adapt it for your own projects.

git clone https://github.com/rate-api/demos.git
cd rateapi-demos
node run.js rate-explorer  # Auto-creates API key, explore the API

What You Can Build

These demos show integration patterns for:

  • Real Estate Platforms — Rate widgets for property listings
  • Financial Planning Apps — Refinance recommendations, mortgage optimization
  • AI Assistants — Natural language mortgage rate queries
  • Rate Comparison Sites — Credit union rate aggregators
  • Monitoring & Alerts — Webhook-powered rate drop notifications
  • Browser Extensions — Contextual rate overlays on real estate sites

Get your free API key: https://rateapi.dev


🎯 Pick Your Demo

Demo What It Demonstrates API Features
Rate Explorer CLI interaction with Decision Engine Key creation, decisions, lookups
Webhook Monitor Rate alert system architecture Monitors, webhooks, HMAC verification
AI Agent LLM tool integration patterns Function calling, natural language → API
React Widget Embeddable UI component React hooks, server-side key protection
LangChain Agent Full AI agent architecture Multi-tool orchestration, memory
Discord Bot Hosted bot (one-click install) Add to Server
Chrome Extension Content injection patterns DOM extraction, Shadow DOM, proxies

API Coverage by Demo

Rate Explorer Webhook Monitor AI Agent React Widget LangChain Discord Chrome Ext
API Key Creation
Decision Engine
Credit Union Lookup
Monitor CRUD
Webhook Verification
LLM Tool Integration
React Hooks
Web Components
Content Injection

Start with Rate Explorer — it auto-creates an API key the other demos will use.


📖 Demo Details

🔍 1. Rate Explorer

Find the best mortgage rates in seconds. Zero dependencies, just Node.js.

node run.js rate-explorer

What you'll learn:

  • Self-service API key creation (POST /keys)
  • Decision engine (POST /v1/decisions)
  • Credit union lookups (GET /credit-unions/{state}/{slug})

View source →


🔔 2. Webhook Monitor

Get alerts when mortgage rates drop. Production-ready webhook verification included.

cd rate-monitor && npm install
node server.js

What you'll learn:

  • Creating rate monitors with conditions
  • HMAC-SHA256 signature verification
  • Monitor lifecycle (create, list, delete)

View source →


🤖 3. AI Agent

Chat-based mortgage advisor. Works without OpenAI key (mock mode).

node run.js rate-agent          # Mock mode
node run.js rate-agent --real   # GPT-4 mode (needs OPENAI_API_KEY)

What you'll learn:

  • LLM function/tool calling
  • Natural language → API queries
  • Testing AI integrations without API costs

View source →


📊 4. React Widget

Embeddable rate comparison widget. Light/dark themes, TypeScript support.

cd react-rate-widget && npm install
RATEAPI_KEY=your-key npm start

What you'll learn:

  • React integration patterns
  • Custom hooks (useRateAPI)
  • Server-side API key protection

View source →


🧠 5. LangChain Agent

Full mortgage advisor with LangChain. CLI and web interface.

cd langchain-mortgage-agent && npm install
npm run chat      # CLI
npm run web       # Web UI at localhost:3000

What you'll learn:

  • LangChain agent architecture
  • Multi-tool orchestration
  • Conversational AI patterns

View source →


💬 6. Discord Bot

Free hosted bot — add RateAPI to your Discord server with one click. No setup, no API key required.

Add to Discord

Features:

  • Real-time rate comparisons across thousands of credit unions
  • Rate drop alerts — get notified when rates hit your target
  • Natural language queries — ask questions in plain English

Great for:

  • Real estate investing Discord communities
  • Personal finance servers
  • Mortgage professional groups

View documentation and add the bot →


🔌 7. Chrome Extension

See credit union rates while browsing Zillow, Redfin, Realtor.com & ProjectionLab. Supports both home purchase and refinance contexts.

node run.js chrome-extension
# Then load unpacked extension in chrome://extensions

What you'll learn:

  • Chrome Manifest V3 extension architecture
  • Lit web components with Shadow DOM for style isolation
  • Site-specific DOM scraping and content injection
  • Background service workers for API communication
  • Bridge pattern for MAIN/ISOLATED world messaging
  • Cloudflare Worker proxy for API key protection
  • Refinance vs. purchase context handling

Key features:

  • Purchase context: Auto-detects listings on Zillow, Redfin, Realtor.com
  • Refinance context: Integrates with ProjectionLab financial planning dashboards
  • Extracts price/balance and location from page DOM
  • Displays floating overlay with best credit union rates
  • Shows potential monthly savings vs. current rate or national average
  • Expandable to show top 5 credit union offers
  • State persistence across sessions (Chrome storage)
  • In-memory caching to reduce API calls
  • Demo mode with realistic sample data (no API key needed)

NEW: ProjectionLab Integration 🔥

  • First Chrome extension for the FIRE community
  • Auto-detects mortgage liabilities from your financial dashboard
  • Shows refinance rates to help accelerate your path to FI
  • Saves $214/mo on average ($400k mortgage, 7% → 6.125%)
  • Read full integration guide

View source →


🌟 Built With These Patterns

Developers have used these demos as starting points for:

  • Real estate platform integrations
  • AI-powered mortgage chatbots
  • Rate monitoring dashboards
  • Credit union comparison tools

Built something with RateAPI? Submit a PR to share your implementation.


⚙️ Setup

All demos share a .env file in the root:

RATEAPI_KEY=your-key        # Auto-created by Rate Explorer
RATEAPI_URL=https://api.rateapi.dev
OPENAI_API_KEY=sk-...       # Only for AI demos in real mode

Requirements: Node.js 18+


🔗 Resources


🤝 Contributing

PRs welcome! Ideas for new integration patterns:

  • Discord bot (hosted service)
  • Chrome extension (content scripts, DOM extraction, Shadow DOM)
  • Telegram bot (inline queries, notifications)
  • Google Sheets (custom functions, data import)
  • Python SDK (requests wrapper, async support)
  • Slack bot (slash commands, Block Kit)
  • Firefox extension (port WebExtension patterns)

Want to contribute? Each demo should:

  1. Demonstrate a specific API integration pattern
  2. Include working, runnable code
  3. Explain what developers can learn from it

Open an issue →


RateAPI — Mortgage rate data for developers

About

7 production-ready demos: AI mortgage agents (GPT-4/LangChain), React widgets, Chrome extensions (Zillow/Redfin/Projection Lab), webhook monitors. 34,930 rates from 2,918 US credit unions. Zero-dependency CLI to full TypeScript. Mock modes included. Fork, learn, ship.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •