U.S. flag
        An official website of the United States government
          Here’s how you know
        Here’s how you know
        world globe
        Languages
      EnglishEspañolFrançaisKreyòlTiếng Việt简体中文한국어 **Official websites use .gov** A **.gov** website belongs to an official government organization in the United States.
 **Secure .gov websites use HTTPS** A **lock** (
A locked padlock
) or **https://** means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.
              .
  Apply for Assistance


                Toggle Menu

    close
            Disasters & Assistance
                  
                                                      Current DisastersCalifornia Severe StormsHermit's Peak/Calf Canyon FireMaine Severe StormsMichigan Severe StormsRhode Island Severe Storms (December 2023)Rhode Island Severe Storms (January 2024)Washington WildfiresWildfire ActionsWrangell Cooperative Association Severe StormAll Disaster Declarations
Assistance After a DisasterGovernments and Private Non-ProfitsIndividuals and Families
Tools to RecoverCommon RumorsDisaster Multimedia ToolkitDisaster-Related FAQFEMA in Your LanguageSave Your Family TreasuresVolunteer & Donate
General Disaster InformationSearch Your LocationHow a Disaster Gets DeclaredDisaster AuthoritiesHistoric DisastersGrants
                  
                                                      FEMA GrantsPreparedness GrantsHazard Mitigation Assistance GrantsResilience GrantsContinuing Training Grants ProgramEmergency Food and Shelter ProgramShelter and Services Program
Policy & GuidanceProcurement & Contracting"Buy America" PreferenceBipartisan Infrastructure LawLow-Carbon Goals2 CFR Policy Updates
ToolsAuthorized Equipment ListBenefit-Cost AnalysisEnvironmental & Historic Preservation GuidanceFEMA Grants Outcomes (FEMA GO)Grants Management Technical AssistanceNon-Disaster Grants Management SystemFloods & Maps
                  
                                                      Flood InsuranceFind an Insurance FormWork with National Flood InsuranceNFIP’s Pricing ApproachInsurance Outreach PublicationsRules and LegislationFlood Insurance Advocate
Floodplain ManagementManage Floodplain RiskGet Financial HelpCommunity Assistance Program for StatesCommunity Rating SystemFloodplains & Wildlife ConservationIntergovernmental Collaboration
Flood MapsFlood Data Viewers & Geospatial DataChange Your Flood Zone DesignationRisk MAPProducts and ToolsGuidance & ReportsCooperating Technical Partners
Know Your RiskHomeowners, Renters or Business OwnersCommunity OfficialsEngineers, Surveyors or ArchitectsReal Estate, Lending or Insurance ProfessionalsState, Local, Tribal or Territorial GovernmentsEmergency Management
                  
                                                      National PreparednessTraining & EducationNational Incident Management System (NIMS)National Planning FrameworksNational Preparedness GoalContinuity Resource ToolkitEquityExercises
Risk ManagementHazard Mitigation PlanningClimate ResilienceBuilding ScienceEarthquake RiskDam SafetyHurricane, Wind & Water Surge HazardsHazardous Response Capabilities
Tools for PractitionersIntegrated Public Alert & Warning System (IPAWS)Planning GuidesCommunity LifelinesEnvironmental Planning & Historic PreservationRecovery ResourcesCase Study LibraryPrepTalks
Individuals & CommunitiesPreparedness Activities, Research & WebinarsFaith-Based & Volunteer Partnership ResourcesYouth & Emergency PlanningCommunity Emergency Response Team (CERT)Activities to Reduce Risk for Your HomeAbout
                  
                                                      About UsHow FEMA WorksStrategic PlanOffices & LeadershipRegions, States & TerritoriesTribal AffairsHow to Pay FEMAHistory of FEMAContact Us
NewsroomBlogEventsFact SheetsFEMA LiveMobile ProductsNewslettersPress ReleasesPodcastSocial Media
Reports & DataAnnual ReportsData VisualizationsDisaster Relief Fund ReportsFEMA Guidance DocumentsGlossaryOpenFEMAResilience Analysis & Planning Tool
FEMA in ActionWe Are FEMADisaster ResilienceTwenty Years Later: 9/11Work With Us
                  
                                                      CareersBenefitsCareer PathsHow to ApplyRecruitment EventsFEMA Employee Resources
Business and OrganizationsDoing Business with FEMANational Business Emergency Operations Center
PartnershipsCommunity Disaster Resilience ZonesEmergency Manager ExchangeFederal Agency Mission AssignmentsResilient Nation Partnership NetworkApply for Assistance

world globe
        Languages
      EnglishEspañolFrançaisKreyòlTiếng Việt简体中文한국어  Reports & Data
              
              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

              OpenFEMA
                          OpenFEMA

                      Developer Resources
                  
                                        
                    
          
                    
                            
                                        
                    
          
                    
                            
                                        
                    
          
                    
                            
                                                    Data Sets
                                                Frequently Asked Questions
                                                Changelog
                                                API Documentation
                                                Working with Large Datasets
                                                                      Open Government
                                                Other FEMA Data Sources
                                                Terms and Conditions
                              
                                                            Annual Reports
                                                        Data Visualizations
                                                        Disaster Relief Fund Reports
                                                        FEMA Guidance Documents
                                                        Glossary
                                                                                  Resilience Analysis & Planning Tool
          OpenFEMA Developer Resources
world globeEnglish
Welcome to the OpenFEMA Developer Resources page, devoted to providing additional development information regarding our Application Programming Interface (API) for use in your applications and mashups.  The API is free of charge and does not currently have user registration requirements.  Please contact the OpenFEMA Team at openfema@fema.dhs.gov  to suggest additional datasets and additional API features.



Please review the API Documentation for list of commands that can be used for each endpoint. As OpenFEMA’s main purpose is to act as a content delivery mechanism, each endpoint represents a dataset. Therefore, the documentation does not outline each one; they all operate in the same manner. Metadata (content descriptions, update frequency, data dictionary, etc.) for each data set can be found on the individual data set pages. The Data Sets page provides a list of the available endpoints.



The Changelog identifies new, changing, and deprecated datasets, and describes new features to the API.



The  API Specifics/Technicalportion of the FAQ may be of particular interest to developers.



The Large Data Set Guide provides recommendations and techniques for working with OpenFEMA's large data files. Some code examples are included.



Following are examples or recipes of commonly performed actions - many expressed in different programming or scripting languages. We will continue to expand this section. If you have code examples you would like to see, please contact the OpenFEMATeam. We also welcome any code examples you would like to provide.



alert - infoOpenFEMA provides sample code and examples on GitHub! Please visit github.com/FEMA



Accessing Data from API Endpoint



There are many ways to access data from the OpenFEMA API such as using a programming language, scripting language, or some built-in command. The following examples demonstrate how to get data using an OpenFEMA API endpoint. All of these examples will return disaster summaries for Hurricane Isabell (disaster number 1491).



alert - warningNote that not all the data may be returned. By default only 1,000 records are returned. If more data exists, it will be necessary to page through the data to capture it all. See the API Documentation and GitHub paging examples for more information.



**HTTP/URL** – Paste in your browsers URL.



`https://www.fema.gov/api/open/v2/DisasterDeclarationsSummaries?$filter=disasterNumber eq 1491`



**cURL** – Saving returned data to a file. Note URL %20 encoding used for spaces.



`curl 'https://www.fema.gov/api/open/v2/DisasterDeclarationsSummaries?$filter=disasterNumber%20eq%201491' >> output.txt`



**wget** – Saving returned data to a file.



`wget –O output.txt 'https://www.fema.gov/api/open/v2/DisasterDeclarationsSummaries?$filter=disasterNumber%20eq%201491'`



**Windows PowerShell 3.0** – Note site security uses TLS 1.2, therefore the security protocol must be set first.



`[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://www.fema.gov/api/open/v2/DisasterDeclarationsSummaries?$filter=disasterNumber%20eq%201491 –OutFile c:\temp\output.txt`



Paging Through Data



For performance reasons, only 1,000 records are returned per API endpoint call by default (i.e., if no value is set for $top). The maximum number of records that can be returned per call is 10,000 (i.e., $top=10000). If more than 10,000 records exist for the specified filter, it will be necessary to page through the data, using the $skip and $inlinecount parameters to retrieve every record. The metadata header returned as part of the dataset JSON response will only display the full record count if the $inlinecount parameter is used—otherwise, it will have a value of 0. Computer code containing a loop is written to continue making API calls, incrementing the $skip parameter accordingly, until the number of records retrieved equals the total record count. See the OpenFEMA Documentation, URI commands section for additional information regarding these parameters.



NOTE: Although a few of the examples provided download CSV files, it is recommended that results be downloaded in a JSON format. This format is native to the OpenFEMA data store, as such data need not be converted by the server thereby improving download performance. Further, when using CSV there is no guarantee that the record order will be maintained (this a very unlikely event however, that we have been unable to produce in tests.)



alert - infoPlease see our GitHub OpenFEMA Samples repository for download/paging examples in various languages including Bash, Python, R, JavaScript, and more.



Other Common Code Examples to be Added Soon



Downloading full filesPeriodic updates instead of full downloadsChecking for dataset data updatesConverting JSON to a different formatWorking with different time formatsUsing the metadata endpointsIPAWS Archived Alerts Query Examples



The Integrated Public Alert and Warning System (IPAWS) Archived Alerts data set is unique among OpenFEMA datasets in that the information is hierarchical in nature. Performing searches through the API can be challenging and the ability to filter, search, and sort IPAWS data is limited. In most cases it will be necessary to first download a subset based on a filter to limit data to a region or date, and then post-process offline with external tools.



OpenFEMA generally uses utilities and tools built into the Linux operating system. For example, once downloaded a utility called *jq* can be used to extract and manipulate JSON data and even extract it into a CSV file. This has to be done with care however, because the hierarchical nature of CAP messages can introduce duplicate records in the results.



alert - infoPlease see our GitHub OpenFEMA Dataset Examples repository for specific examples of IPAWS queries. Included are examples on basic filtering by a variety of fields, retrieving data by state, retrieving data by IPAWS event code, retrieving COVID-19 specific data, and executing geospatial queries.
Last updated May 30, 2023

            Return to top Disasters & Assistance
      
    
                  Grants
      
    
                  Floods & Maps
      
    
                  Emergency Management
      
    
                  About
      
    
                  Work With Us

Facebook

          Instagram


          Twitter

          YouTube

          LinkedIn

          Newsletter

        Contact FEMA

DHS logo
              FEMA.govAn official website of the U.S. Department of Homeland Security
          Accessibility
                Accountability
                Careers
                Civil Rights
                Contact Us
                FOIA
                Glossary
                No FEAR Act
                Plug-Ins
                Privacy
                Report Disaster Fraud
                Website Information
                DHS.gov
                USA.gov
                Inspector General