FEMA National Flood Hazard Layer Documentation
    • Dark
      Light
    • PDF

    FEMA National Flood Hazard Layer Documentation

    • Dark
      Light
    • PDF

    Article summary

    Purpose

    LightBox National Flood Hazard Layer API supports retrieving flood risk at the Property, Structure/Building Footprint, Assessment and the address level. There is also an endpoint to pass in a WKT geometry when accessing a third party geocoder. 

    OAS 3.1 Specification

    Features

    • Return a National Flood Hazard record by address
    • Return a National Flood Hazard record using a geometry with an optional buffer unit and distance
    • Return a National Flood Hazard record using a LightBox Parcel {{glossary.LightBox ID}}.
    • Return a National Flood Hazard record using a LightBox Assessment {{glossary.LightBox ID}}.
    • Return a National Flood Hazard record using a LightBox Address {{glossary.LightBox ID}}.
    • Return a National Flood Hazard record using a LightBox Structure {{glossary.LightBox ID}}.

    Requirements

    The LightBox APIs are hosted in the cloud and therefore have no platform requirements. Application requirements include:
    • A network connection to the LightBox API server
    • Ability to parse JavaScript Object Notation (JSON) API responses
    • Secure HTTPS connection
    • LightBox authentication key
    • LightBox authentication key

    Connecting your account

    When your LightBox user account is created, a unique API key is also generated. The API key should be kept secret at all times and can only be used for API requests. The key is required in all API calls.

    To retrieve your unique API key:

    • Log in to the LightBox Developer Portal 
    • Select Apps from the menu bar
    • In your approved App, note your API key (under Consumer Key)

    Performing API requests

    All API requests must be made over secure HTTPS connections. Requests made over HTTP will fail.

    The base URL of the API server that all API requests will be made to is: https://api.lightboxre.com/ followed by a version number https://api.lightboxre.com/v1

    Authentication

    LightBox APIs uses a token-based authentication. All requests to the LightBox APIs must be authenticated. The token to be passed via an HTTP header with key 'x-api-key' and value <Your authentication token>

    Pass your unique API key in the authorization header of every LightBox API call.  LightBox uses this information to authenticate your identify and determine whether you have sufficient permissions to complete the operation. curl -X GET -H ‘x-api-key: (api_key)’  https://api.lightboxre.com/

    API Requests

    Query by Geometry

    Query for national flood hazard records based on a geometry represented as a well-known text (WKT) string.

    • POINT(-122.40317865990883 45.585729937697515)
    • LINESTRING (-122.40581795357949 45.58497908445598,-122.40325376176125 45.58627054581282)
    • POLYGON ((-122.4032877944377 45.58629457984625,-122.40264406427413 45.585697658341736,-122.40184476598769 45.58610686936547,-122.40244558080703 45.586688769812724,-122.4032877944377 45.58629457984625))

    GET /nfhls/us/geometry

    Pro Tip:
    This endpoint is best used when you have an existing latitude longitude from the LightBox geocoder, or using the value of a map click/identify from a standard map control.

    Example requests

    curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/nfhls/us/geometry?wkt=POINT%28-117.852723%2033.63799%29&bufferDistance=50&bufferUnit=m

    https://api.lightboxre.com/v1/nfhls/us/geometry?wkt=POINT%28-117.852723%2033.63799%29&bufferDistance=50&bufferUnit=m

    Parameters

    ParameterTypeDescriptionUsage
    wktqueryThe geometry of the location is expressed in WKT format.required
    bufferDistancequeryBuffer distance expressed in 'bufferUnits'.optional
    bufferUnitqueryThe unit type to apply to the buffer (eg m, km, ft, mi)optional

    Response

    Media type: application/json

    Query By Address

    Query National Flood Hazard risk by address.

    GET /nfhls/address/search

    Pro Tip:
    You can use this endpoint as a one request vs a double request first to the Geocoder then to the National Risk Index API using the WKT returned from the Geocoding response. Keep in mind that if the address entered is not found you will receive a 404 Not Found HTTP Response

     Example Requests

    curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/nfhls/address/search?text=5201%20California%20Ave%2C%20Irvine%20CA

    https://api.lightboxre.com/v1/nfhls/address/search?text=5201%20California%20Ave%2C%20Irvine%20CA

    Parameters

    ParameterTypeDescriptionUsage
    textqueryComplete address stringrequired

    Response

    Media type: application/json

    Query National Flood Hazard Layer Object Related to a Parcel Record.

    Query National Flood Hazard Layer Object that are related to a parcel using the LightBox Parcel 'ID.'

    GET /nfhls/_on/parcel/us/{id}

    Example Requests

    curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/nfhls/_on/parcel/us/0201MABNPDBU5D2EGP08YA

    https://api.lightboxre.com/v1/nfhls/_on/parcel/us/0201MABNPDBU5D2EGP08YA

    Parameters

    ParameterTypeDescriptionUsage
    idpathParcel LightBox ID required

    Response

    Media type: application/json

    Query National Flood Hazard Layer Object Related to a Structure Record.

    Query National Flood Hazard Layer Object that are related to a structure using the LightBox Structure 'ID.'

    GET /nfhls/_on/structure/us/{id}

    Example Requests

    curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/nfhls/_on/structure/us/0500F9G87XG0NEK51ZQHJR

    https://api.lightboxre.com/v1/nfhls/_on/structure/us/0500F9G87XG0NEK51ZQHJR

    Parameters

    ParameterTypeDescriptionUsage
    idpathStructure {{glossary.LightBox ID}}required

    Response

    Media type: application/json

    Query National Flood Hazard Layer Object Related to a Assessment Record.

    Query National Flood Hazard Layer Object that are related to a assessment record using the LightBox Assessment 'ID.'

    GET /nfhls/_on/assessment/us/{id}

    Example Requests

    curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/nfhls/_on/assessment/us/030022BT8WGISNVQJIEW54

    https://api.lightboxre.com/v1/nfhls/_on/assessment/us/030022BT8WGISNVQJIEW54

    Parameters

    ParameterTypeDescriptionUsage
    idpathAssessment {{glossary.LightBox ID}};required

    Response

    Media type: application/json

    Query National Flood Hazard Layer Object Related to a Address Record.

    Query National Flood Hazard Layer Object that are related to a address using the LightBox Address 'ID.'

    GET /nfhls/_on/address/us/{id}

    Example Requests

    curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/nfhls/_on/address/us/0606ZGPRLD5KGWFYRD7QH9

    https://api.lightboxre.com/v1/nfhls/_on/address/us/0606ZGPRLD5KGWFYRD7QH9

    Parameters

    ParameterTypeDescriptionUsage
    idpathAddress {{glossary.LightBox ID}}required

    Response

    Media type: application/json

    Query National Flood Hazard Layer Object Related by LightBox Site ID.

    Query National Flood Hazard Layer Object that are related to a address using the LightBox Site 'ID.'

    GET /nfhls/_on/site/us/{id}

    Example Requests

    curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/nfhls/_on/site/us/0901R7OPQ4SLNLLG038WKA

    https://api.lightboxre.com/v1/nfhls/_on/site/us/0901R7OPQ4SLNLLG038WKA

    Parameters

    ParameterTypeDescriptionUsage
    idpathSite {{glossary.LightBox ID}}required

    Response

    Media type: application/json

    Health Check

    Health Check is an endpoint used to determine the health of this service

    GET /nfhls/health

    Example Requests

    curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/nfhls/health

    https://api.lightboxre.com/v1/nfhls/health

    Parameters

    ParameterTypeDescriptionUsage
    None
     

    Response

    Media type: application/json

    Tile Request

    Use within common map controls to show FEMA flood objects as a tile overlay.

    GET /nfhls/us/tile/{zoom}/{x}/{y}

    Example Requests

    curl -X GET -H ‘x-api-key: (api_key)’ https://api.lightboxre.com/v1/nfhls/us/tile/18/45050/104888

    https://api.lightboxre.com/v1/nfhls/us/tile/18/45050/104888

    Parameters

    ParameterTypeDescriptionUsage
    zoompathTile zoom level, which can be a minimum of '13' and a maximum or '21.'required
    xpathTile column.required
    ypathTile row.required

    Response

    Media type: image/png

    Health Check HTTP Status Codes:

    Status CodeDescription
    200 OK - Service is up and healthy
    503Service is unavailable

    API Response

    For each endpoint other then the tile requests the response will stay consistent. 

    {
      "$ref": "string",
      "$metadata": {
        "geogcs": {
          "epsg": "4326"
        },
        "recordSet": {
          "totalRecords": 99,
          "bbox": {
            "xMax": -105.250409,
            "xMin": -105.251916,
            "yMax": 40.023629,
            "yMin": 40.022576
          }
        },
        "geocode": {
          "confidence": {
            "streetNumber": 1,
            "streetName": 1,
            "locality": 1,
            "postalCode": 1,
            "score": 1
          },
          "precisionCode": "10"
        }
      },
      "nfhls": [
        {
          "fips": "06059",
          "location": {
            "representativePoint": {
              "longitude": 0,
              "latitude": 0,
              "geometry": {
                "wkt": "string"
              }
            },
            "streetAddress": "25344 Garfield St",
            "locality": "Camas",
            "regionCode": "AL",
            "postalCode": "98607",
            "postalCodeExt": "1154",
            "unit": "Unit 15A",
            "countryCode": "US"
          },
          "dfirmId": "06009C",
          "sfha": true,
          "effectiveDate": "string",
          "sourceCitation": "06009C_STUDY2",
          "studyType": "NP",
          "isIn100Year": true,
          "zones": {
            "zone": "X",
            "description": "Areas outside of the 100- and 500 year floodplains",
            "subtype": "AREA WITH REDUCED FLOOD RISK DUE TO LEVEE"
          },
          "panel": {
            "firmId": "06077C_54",
            "effectiveDate": "NP",
            "panelId": "06077C0455F",
            "sourceCitation": "06077C_BASE3"
          }
        }
      ]
    }

    Field Dictionary

    FieldTypeDescription
    fipsstringFederal Information Processing (FIPS) code for the state, as well as the Federal Information Processing code for the county. The first two digits are the state code and the last three digits are the county code.
    location.representativePoint.longitudedoubleA geographic coordinate that specifies the east-west position of a point on the Earth's surface, or the surface of a celestial body.
    location.representativePoint.latitude
    doubleA geographic coordinate that specifies the north-south position of a point on the Earth's surface, or the surface of a celestial body.
    location.representativePoint.geometry.wkt
    stringThe geometry of the location expressed in WKT (well-known text) format.
    location.streetAddress
    stringStreet address, which comprises street name, street directional prefix, street number, street suffix, unit type, and unit number (e.g., '125 Main Street S Unit 5').
    location.locality
    stringThe city portion of the address(e.g., CHICAGO, ATLANTA, DENVER, etc.).
    location.regionCode
    stringThe two-letter state code of the address(e.g., CA, NV, WA, etc.).
    location.postalCode
    stringPostal Code portion of the address (e.g., 92675).
    location.postalCodeExt
    stringThe four-digit code of the address. Also referred to as the 'plus 4 code' and the 'add on code.' Used by the US Postal Service to identify a geographic segment within a five-digit postal ZIP code (e.g., 5437).
    location.unit
    stringUnit prefix and Unit number if it exists.
    location.countryCode
    stringISO 3166 alpha-2 country code (e.g., 'US' for the United NRIs).
    dfirmId
    stringDFIRM flood id.
    sfha
    booleanSpecial flood hazard area flag.
    effectiveDate
    stringFederal Information Processing (FIPS) code for the state, as well as the Federal Information Processing code for the county. The first two digits are the state code and the last three digits are the county code.
    sourceCitation
    stringNFHL source citation.
    studyTypestringNFHL study type.
    isIn100Year
    booleanQuick in/out field stating if the property is in or out of a 100 year flood zone.
    zones.zone
    stringFEMA flood zone.
    zones.description
    stringSort description of in or out of a significant flood zone.
    zones.subtypestringFEMA flood zone subtype.
    panel.firmId
    stringFirm Id.
    panel.effectiveDate
    stringFirm panel effective date.
    panel.panelId
    stringFirm panel Id.
    panel.sourceCitation
    stringFirm panel source citation.

    See: OAS 3.1 Specification

    HTTP Error Codes

    HTTP Response status codes along with a brief summary of their commonly accepted usage. These status codes are returned by LightBox APIs for each request:
    200
    The request succeeded.
    201
    The object was created successfully
    202Accepted, no content
    204Successful, no content
    204
    The server has successfully fulfilled the request and that there is no additional content to send in the response payload body. Typically returned on a DELETE
    400
    One or more of the request parameters were invalid.
    401
    The client must authenticate itself to get the requested response. Note: This could also be due to your trial key has expired.
    404
    The server cannot find the requested resource. This can also mean that the endpoint is valid but the resource itself does not exist.
    429
    Too many requests were made in a short period of time, or you have exceeded your request-lot pool.
    500
    The server has encountered an error it does not know how to handle.
    503Service Unavailable.





    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.