Documentation
Quickstart
Get your API key and make your first property risk request in under 5 minutes.
1Get Your API Key
Create a free account to get your API key. The free tier includes 100 requests per day with county-level data.
curl -X POST https://riskbeforebuy.smarttechinvest.com/v1/signup \
-H "Content-Type: application/json" \
-d '{"name":"Your Name","email":"you@example.com","password":"your_password"}'The response includes your API key. Save it -- you will not see it again.
2Make Your First Request
Query risk scores for any U.S. ZIP code:
curl https://riskbeforebuy.smarttechinvest.com/v1/risk/90210 \ -H "X-API-Key: rbb_your_api_key_here"
Response:
{
"success": true,
"data": {
"composite": 62,
"flood": 28,
"earthquake": 78,
"wildfire": 42,
"crime": 55,
"county": "Los Angeles",
"state": "CA",
"fips": "06037"
}
}3Compare Locations
Compare risk and 30-year NPV costs for multiple ZIP codes:
curl -X POST https://riskbeforebuy.smarttechinvest.com/v1/risk/compare \
-H "Content-Type: application/json" \
-H "X-API-Key: rbb_your_api_key_here" \
-d '{"zips":["90210","94102"],"years":30}'MCP Server (Claude Desktop / Cursor)
Install the RiskBeforeBuy MCP server so AI assistants can use property risk tools natively:
npx @smarttechnologyinvestments/riskbeforebuy-mcp
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"riskbeforebuy": {
"command": "npx",
"args": ["@smarttechnologyinvestments/riskbeforebuy-mcp"],
"env": {
"RISKBEFOREBUY_API_KEY": "rbb_your_api_key_here"
}
}
}
}Available tools: get_risk, compare_locations, get_report, list_hazard_types
SDK Examples
JavaScript / TypeScript
const response = await fetch(
'https://riskbeforebuy.smarttechinvest.com/v1/risk/90210',
{ headers: { 'X-API-Key': process.env.RISKBEFOREBUY_API_KEY } }
);
const { data } = await response.json();
console.log(`Composite risk: ${data.composite}/100`);Python
import requests
resp = requests.get(
"https://riskbeforebuy.smarttechinvest.com/v1/risk/90210",
headers={"X-API-Key": "rbb_your_api_key_here"}
)
data = resp.json()["data"]
print(f"Composite risk: {data['composite']}/100")