{
  "openapi": "3.1.0",
  "info": {
    "title": "FEMA Flood Zone Lookup API",
    "version": "1.0.0",
    "summary": "FEMA flood zone, Special Flood Hazard Area status and FIRM panel for any US address.",
    "description": "FEMA flood zone, Special Flood Hazard Area status and FIRM panel for any US address.\n\nNo API key is required. Data comes from official US government sources and is attributed in each response. Where the underlying model does not cover a location, the API says so explicitly rather than returning a confident wrong answer.",
    "contact": {
      "email": "chris.ellington13@gmail.com"
    },
    "license": {
      "name": "Proprietary",
      "identifier": "LicenseRef-Proprietary"
    }
  },
  "servers": [
    {
      "url": "https://flood-zone-lookup-fema.netlify.app",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Flood",
      "description": "Flood zone lookups"
    },
    {
      "name": "Meta",
      "description": "Service metadata"
    }
  ],
  "paths": {
    "/flood-zone": {
      "get": {
        "tags": [
          "Flood"
        ],
        "operationId": "getFloodZone",
        "summary": "Flood zone for a location",
        "description": "Give a US address or a lat/lon and get the FEMA flood zone (AE, X, VE and so on), whether the point sits in a Special Flood Hazard Area, and the FIRM panel and effective date where FEMA publishes them. Provide `address` OR both `lat` and `lon`. Unmapped locations are reported as unknown rather than as \"not in a flood zone\".",
        "x-probes": {
          "default": "/flood-zone?address=1%20Ocean%20Dr,%20Miami%20Beach%20FL"
        },
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": false,
            "description": "US street address. Optional if lat/lon are given.",
            "schema": {
              "type": "string"
            },
            "example": "1 Ocean Dr, Miami Beach FL"
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Latitude, -90..90. Requires lon.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "Longitude, -180..180. Requires lat.",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "object",
                      "properties": {
                        "address": {
                          "type": "string"
                        }
                      }
                    },
                    "location": {
                      "type": "object",
                      "properties": {
                        "matchedAddress": {
                          "type": "string"
                        },
                        "lat": {
                          "type": "number"
                        },
                        "lon": {
                          "type": "number"
                        },
                        "county": {
                          "type": "string"
                        },
                        "countyFips": {
                          "type": "string"
                        },
                        "zip": {
                          "type": "string"
                        }
                      }
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "coverage": {
                          "type": "string"
                        },
                        "isMapped": {
                          "type": "boolean"
                        },
                        "floodZone": {
                          "type": "string"
                        },
                        "zoneSubtype": {
                          "type": [
                            "null"
                          ]
                        },
                        "inSpecialFloodHazardArea": {
                          "type": "boolean"
                        },
                        "riskLevel": {
                          "type": "string"
                        },
                        "staticBaseFloodElevationFt": {
                          "type": "integer"
                        },
                        "meaning": {
                          "type": "string"
                        },
                        "firmPanel": {
                          "type": "object",
                          "properties": {
                            "panel": {
                              "type": "string"
                            },
                            "panelNumber": {
                              "type": "string"
                            },
                            "suffix": {
                              "type": "string"
                            },
                            "effectiveDate": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "floodData": {
                          "type": "string"
                        },
                        "floodService": {
                          "type": "string"
                        },
                        "geocoder": {
                          "type": "string"
                        }
                      }
                    },
                    "retrievedAt": {
                      "type": "string"
                    },
                    "disclaimer": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "query": {
                    "address": "1 Ocean Dr, Miami Beach FL"
                  },
                  "location": {
                    "matchedAddress": "1 OCEAN DR, MIAMI BEACH, FL, 33139",
                    "lat": 25.768373300509,
                    "lon": -80.133245756018,
                    "county": "Miami-Dade County",
                    "countyFips": "12086",
                    "zip": "33139"
                  },
                  "result": {
                    "coverage": "mapped",
                    "isMapped": true,
                    "floodZone": "AE",
                    "zoneSubtype": null,
                    "inSpecialFloodHazardArea": true,
                    "riskLevel": "high",
                    "staticBaseFloodElevationFt": 8,
                    "meaning": "High-risk (Special Flood Hazard Area). 1%+ annual chance of flooding, with a determined Base Flood Elevation (BFE). Flood insurance is required with a federally backed mortgage.",
                    "firmPanel": {
                      "panel": "12086C0319L",
                      "panelNumber": "0319",
                      "suffix": "L",
                      "effectiveDate": "2009-09-11"
                    }
                  },
                  "source": {
                    "floodData": "FEMA National Flood Hazard Layer (NFHL), public ArcGIS MapServer",
                    "floodService": "https://hazards.fema.gov/arcgis/rest/services/public/NFHL/MapServer",
                    "geocoder": "US Census Geocoder (geographies/onelineaddress, Public_AR_Current)"
                  },
                  "retrievedAt": "2026-07-25T21:42:24.103Z",
                  "disclaimer": "Flood zone determined live from FEMA's National Flood Hazard Layer. This is informational, not an official flood determination or an Elevation Certificate, and not insurance advice. FEMA maps are updated over time and a point can fall on a zone boundary — verify the exact structure location on the FEMA Flood Map Service Center (msc.fema.gov) before making financial or insurance decisions."
                }
              }
            }
          },
          "400": {
            "description": "The request did not identify a location (no address, ZIP or lat/lon).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Meta"
        ],
        "operationId": "getHealth",
        "summary": "Service metadata and status",
        "description": "The service description, version and endpoint documentation. Also serves as a liveness check.",
        "x-probes": {
          "default": "/health"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Service is up",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "endpoints": {
                      "type": "object",
                      "properties": {
                        "/flood-zone": {
                          "type": "object",
                          "properties": {
                            "method": {
                              "type": "string"
                            },
                            "params": {
                              "type": "object",
                              "properties": {
                                "address": {
                                  "type": "string"
                                },
                                "lat": {
                                  "type": "string"
                                },
                                "lon": {
                                  "type": "string"
                                }
                              }
                            },
                            "note": {
                              "type": "string"
                            },
                            "examples": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "/health": {
                          "type": "object",
                          "properties": {
                            "method": {
                              "type": "string"
                            },
                            "note": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "coverageHonesty": {
                      "type": "string"
                    },
                    "dataSource": {
                      "type": "object",
                      "properties": {
                        "floodData": {
                          "type": "string"
                        },
                        "floodService": {
                          "type": "string"
                        },
                        "geocoder": {
                          "type": "string"
                        }
                      }
                    },
                    "docs": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "name": "FEMA Flood Zone Lookup API",
                  "status": "ok",
                  "version": "1.0.0",
                  "description": "Keyless US flood-zone lookup. Give a US address or lat/lon and get the FEMA flood zone (e.g. AE, X, VE), whether it is in a Special Flood Hazard Area (SFHA), the FIRM panel + effective date when available, and a plain-English explanation — with HONEST handling of unmapped/unknown locations.",
                  "endpoints": {
                    "/flood-zone": {
                      "method": "GET",
                      "params": {
                        "address": "US street address (optional if lat/lon given)",
                        "lat": "latitude -90..90 (optional if address given; requires lon)",
                        "lon": "longitude -180..180 (optional if address given; requires lat)"
                      },
                      "note": "Provide address OR (lat AND lon).",
                      "examples": [
                        "/flood-zone?address=1 Ocean Dr, Miami Beach FL",
                        "/flood-zone?lat=25.7907&lon=-80.1300",
                        "/flood-zone?lat=63.5&lon=-150.5   (example of an UNMAPPED location)"
                      ]
                    },
                    "/health": {
                      "method": "GET",
                      "note": "This document; returns status ok."
                    }
                  },
                  "coverageHonesty": "FEMA has not mapped every US county. When a point falls outside the NFHL, the API returns coverage:\"unmapped\" with an explicit unknown and guidance — it will never return a silent \"not in a flood zone.\"",
                  "dataSource": {
                    "floodData": "FEMA National Flood Hazard Layer (NFHL)",
                    "floodService": "https://hazards.fema.gov/arcgis/rest/services/public/NFHL/MapServer",
                    "geocoder": "US Census Geocoder (keyless)"
                  },
                  "docs": "/api-docs.html"
                }
              }
            }
          }
        }
      }
    }
  }
}