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:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Maximum requests in the current window |
| X-RateLimit-Remaining | Requests remaining in the current window |
| X-RateLimit-Reset | UTC timestamp when the window resets |
Limits by Plan
| Plan | Daily Limit | Monthly Limit |
|---|---|---|
| Free | 1 | 30 |
| Single Report | 1 | 1 (report) |
| Buyer Pack | 10 | 300 |
| Pro | 100 | 3,000 |
| Lifetime | 100 | Unlimited |
| Developer (API) | 100 | 3,000 |
| Business (API) | 10,000 | 300,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_KEYenv var.