Skip to main content
Back to Docs

Authentication

All API requests require an API key. Free accounts get county-level data with rate limits. Paid plans unlock tract-level detail, NPV calculations, and higher rate limits.

Getting an API Key

Create a free account to get your API key:

curl -X POST https://riskbeforebuy.smarttechinvest.com/v1/signup \
  -H "Content-Type: application/json" \
  -d '{"name": "Your Name", "email": "you@example.com", "password": "min8chars"}'

The response includes your API key. Save it immediately -- it will not be shown again.

{
  "success": true,
  "data": {
    "message": "Account created successfully",
    "apiKeyPrefix": "rbb_a1b2...",
    "apiKey": "rbb_a1b2c3d4e5f6..."
  }
}

Using Your API Key

Pass your API key in the X-API-Key header:

curl https://riskbeforebuy.smarttechinvest.com/v1/risk/zip/90210 \
  -H "X-API-Key: rbb_your_api_key_here"

Node.js

const response = await fetch(
  'https://riskbeforebuy.smarttechinvest.com/v1/risk/zip/90210',
  { headers: { 'X-API-Key': process.env.RISKBEFOREBUY_API_KEY } }
);
const data = await response.json();

Python

import requests
import os

response = requests.get(
    "https://riskbeforebuy.smarttechinvest.com/v1/risk/zip/90210",
    headers={"X-API-Key": os.environ["RISKBEFOREBUY_API_KEY"]}
)
data = response.json()

Rate Limits

Rate limits vary by plan. Every response includes rate limit headers:

HeaderDescription
X-RateLimit-LimitMaximum requests in the current window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUTC timestamp when the window resets

Limits by Plan

PlanDaily LimitMonthly Limit
Free130
Single Report11 (report)
Buyer Pack10300
Pro1003,000
Lifetime100Unlimited
Developer (API)1003,000
Business (API)10,000300,000

Key Management

You can manage your API keys from the API Keys dashboard or via the API:

List Keys

curl https://riskbeforebuy.smarttechinvest.com/v1/account/keys \
  -H "X-API-Key: rbb_your_key"

Rotate Key

curl -X POST https://riskbeforebuy.smarttechinvest.com/v1/account/keys/rotate \
  -H "X-API-Key: rbb_your_key"

Rotation revokes your old key and issues a new one. Update your integrations immediately.

Security Best Practices

  • Never expose your API key in client-side code or public repositories.
  • Use environment variables (RISKBEFOREBUY_API_KEY) to store keys.
  • Rotate your key immediately if you suspect it has been compromised.
  • Use the MCP server for AI integrations -- it handles auth via RISKBEFOREBUY_API_KEY env var.