API Documentation

US government data API — Census Bureau, FEMA, and more. Per-request pricing.

Base URL

https://www.dorothydata.com

Endpoints

POST /api/v1/enrich/paid x402 — for AI agents

No signup required. Pay $0.01 USDC per request on Base mainnet.

Your agent sends a request → receives 402 with payment details → pays USDC → resends with payment proof → gets data back.

curl
# Step 1: Discover payment requirements
curl -X POST https://www.dorothydata.com/api/v1/enrich/paid \
  -H "Content-Type: application/json" \
  -d '{"address": "350 5th Ave, New York NY 10118"}'
# Returns 402 with payment-required header

# Step 2: Pay and get data (handled automatically by x402-compatible agents)

POST /api/v1/flood x402 — for AI agents

FEMA flood zone lookup. Returns flood zone, risk level, SFHA status, and base flood elevation for any US address.

No signup required. Pay $0.01 USDC per request on Base mainnet.

curl
curl -X POST https://www.dorothydata.com/api/v1/flood \
  -H "Content-Type: application/json" \
  -d '{"address": "350 5th Ave, New York NY 10118"}'
# Returns 402 with payment-required header

# Payment handled automatically by x402-compatible agents

POST /api/v1/address/enrich API key — for developers

1,000 free requests/month. Get a key at /signup.

curl
curl -X POST https://www.dorothydata.com/api/v1/address/enrich \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer dbe_your_api_key" \
  -d '{"address": "350 5th Ave, New York NY 10118"}'

Legacy alias: POST /api/v1/enrich

Request Format

json body
{
  "address": "350 5th Ave, New York NY 10118"
}

Response Format

200 ok
{
  "success": true,
  "data": {
    "input": "350 5th Ave, New York NY 10118",
    "standardizedAddress": "350 5TH AVE, NEW YORK, NY, 10118",
    "zipCode": "10118",
    "coordinates": { "lat": 40.747848, "lng": -73.985077 },
    "county": "New York County",
    "state": "New York",
    "stateAbbreviation": "NY",
    "stateFips": "36",
    "countyFips": "36061",
    "censusTract": "007600",
    "censusTractGeoid": "36061007600",
    "censusBlockGroup": "360610076001",
    "censusBlock": "360610076001000",
    "congressionalDistrict": "NY-12",
    "congressionalDistrictName": "Congressional District 12",
    "schoolDistrict": "New York City Department Of Education",
    "timezone": "America/New_York",
    "urbanRural": "New York--Jersey City--Newark, NY--NJ Urban Area",
    "sources": ["US Census Geocoder", "US Census TIGERweb"]
  }
}

Flood Zone Response

200 ok — /api/v1/flood
{
  "success": true,
  "data": {
    "input": "350 5th Ave, New York NY 10118",
    "coordinates": { "lat": 40.747848, "lng": -73.985077 },
    "floodZone": "X",
    "floodZoneDescription": "Minimal to moderate flood risk.",
    "zoneSubtype": "AREA OF MINIMAL FLOOD HAZARD",
    "isSpecialFloodHazardArea": false,
    "baseFloodElevationFt": null,
    "verticalDatum": null,
    "depthFt": null,
    "dfirmId": "360497",
    "riskLevel": "low",
    "source": "FEMA NFHL"
  }
}
Risk LevelFlood Zones
highA, AE, AH, AO, AR, A99, V, VE — Special Flood Hazard Areas
moderateX (shaded) — 0.2% annual chance (500-year flood)
lowX (unshaded) — minimal flood hazard
undeterminedD — no analysis performed

Error Responses

StatusMeaning
400Missing or invalid address field
401Invalid or missing API key
402Payment required (x402 endpoint)
413Address is too long
422Address could not be geocoded
429Monthly limit reached (free tier)
502Upstream data source error (FEMA)
503Usage limit check temporarily unavailable
500Internal error

Pricing

  • x402: $0.01/request, USDC on Base
  • API key free tier: 1,000 req/month
  • API key paid: coming soon (Stripe)

Data Sources

  • Address enrichment: US Census Bureau Geocoder + TIGERweb APIs
  • Flood zones: FEMA National Flood Hazard Layer (NFHL)

All data is authoritative government data but may not reflect recent changes.

Ready to get started?

Get your API key