API Reference
Documentation
Single endpoint. Three risk dimensions. Any US coordinate. All responses are normalized to the same 0–100 scale so you can display, compare, or alert on them with a single code path.
Quick start
Make your first request in under a minute.
Get a free API key — no credit card required.
Make a request:
curl "https://api.gravelo.io/v1/risk?lat=40.71&lng=-74.00" \ -H "Authorization: Bearer pk_live_your_key_here"
Read .flood.score, .air_quality.aqi, and .river.score — all on the same 0–100 scale.
Authentication
Pass your API key as a Bearer token in the Authorization header of every request.
Authorization: Bearer pk_live_your_key_here
Keys prefixed pk_live_ are production keys. Never commit keys to source control — use environment variables.
/v1/risk
Returns flood, air quality, and river gauge risk scores for a US coordinate. Responses are cached up to 1 hour per location.
curl "https://api.gravelo.io/v1/risk?lat=40.71&lng=-74.00" \ -H "Authorization: Bearer pk_live_your_key_here"
Parameters
All parameters are passed as query string values.
Response schema
All successful responses return 200 OK with Content-Type: application/json.
{
"location": { "lat": 40.71, "lng": -74.0 },
"flood": {
"fema_zone": "X",
"zone_subtype": null,
"score": 5,
"label": "Minimal",
"source": "FEMA NFHL"
},
"air_quality": {
"aqi": 41,
"primary_pollutant": "O3",
"category": "Good",
"score": 5,
"label": "Good",
"source": "AirNow",
"preliminary": true
},
"river": {
"nearest_gauge": "RICHMOND CREEK AT LIGHTHOUSE AVE",
"site_no": "01376534",
"gage_height_ft": 1.09,
"flood_stage_ft": null,
"flood_stage_pct": null,
"score": 10,
"label": "Minimal",
"source": "USGS"
},
"updated_at": "2026-03-16T15:59:01Z"
}/v1/risk/batch
Look up risk data for up to 50 coordinates in a single request. Each location counts as one call against your monthly quota. Ideal for property portfolio analysis, insurance underwriting, and bulk enrichment pipelines.
curl -X POST "https://api.gravelo.io/v1/risk/batch" \
-H "Authorization: Bearer pk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"locations":[{"lat":40.71,"lng":-74.00},{"lat":34.05,"lng":-118.24}]}'{
"locations": [
{ "lat": 40.71, "lng": -74.00 },
{ "lat": 34.05, "lng": -118.24 },
{ "lat": 29.76, "lng": -95.37 }
]
}{
"results": [
{
"location": { "lat": 40.71, "lng": -74.0 },
"flood": { "fema_zone": "X", "score": 5, "label": "Minimal", ... },
"air_quality": { "aqi": 41, "score": 5, "label": "Good", ... },
"river": { "score": 10, "label": "Minimal", ... },
"updated_at": "2026-03-16T15:59:01Z"
},
{ ... }
],
"count": 2,
"calls_charged": 2
}/v1/flood/zone
FEMA flood zone only — no air quality or river data. Faster and cheaper for mortgage, title, and real estate workflows that only need flood zone status.
curl "https://api.gravelo.io/v1/flood/zone?lat=40.71&lng=-74.00" \ -H "Authorization: Bearer pk_live_your_key_here"
{
"location": { "lat": 40.71, "lng": -74.0 },
"fema_zone": "X",
"zone_subtype": null,
"county_fips": "36061",
"risk_score": 5,
"label": "Minimal",
"source": "FEMA NFHL"
}/v1/sources/status
Returns the last-fetched timestamp, reading count, and staleness flag for every upstream data source. Use it to display freshness badges or alert when data is unexpectedly old.
curl "https://api.gravelo.io/v1/sources/status" \ -H "Authorization: Bearer pk_live_your_key_here"
{
"sources": [
{
"source": "airnow",
"hazard_type": "air_quality",
"last_updated": "2026-03-16T14:00:00Z",
"reading_count": 4821,
"age_hours": 1.9,
"stale": false
},
{ "source": "usgs", "hazard_type": "river", ... }
],
"fema_last_updated": "2026-01-03T08:00:00Z",
"fema_zone_count": 2847193,
"checked_at": "2026-03-16T15:59:01Z"
}Score scale
All five hazard types use the same 0–100 scale so you can render a unified risk indicator or fire a single alert threshold. Every hazard also returns a score_basis string explaining exactly what drove the score — useful for audits and underwriting workflows.
Per-hazard scoring methodology
Scores are independently derived per hazard and should not be summed directly — use them as individual risk signals or weight them by your own model.
Error codes
Errors always return JSON with an detail field containing a human-readable message.
{ "detail": "Monthly call limit reached. Upgrade your plan at gravelo.io/pricing" }
Rate limits
Limits are per API key, per calendar month. Every response includes current usage headers.
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 84 X-RateLimit-Reset: 1748736000
Free
100 / month
Developer
5,000 / month
Pro
50,000 / month
Burst limit: 10 requests / second per key. Cached responses do not count against your monthly quota.
Data sources
Gravelo aggregates authoritative US government data. Risk scores are Gravelo's own normalized derivation and do not constitute official agency guidance.
Official flood zone designations updated as FEMA issues new FIRMs. Coverage: contiguous US. https://msc.fema.gov/portal/home
Preliminary real-time AQI data from federal, state, local, and tribal monitoring agencies. Not for regulatory use. https://www.airnow.gov
Real-time gage height and streamflow. Provisional data subject to revision. https://waterdata.usgs.gov
All data provided "as-is" for informational purposes only. Not intended to support regulatory decisions, establish legal liability, or substitute for professional risk assessment.