---
title: "OpenFEMA Dataset Codes"
method: GET
path: "/v1/DataSetCodes"
tags: ["Miscellaneous"]
---

# OpenFEMA Dataset Codes

`GET /v1/DataSetCodes`

## Request

- Base URL: `https://www.fema.gov/api/open`
- URL: `https://www.fema.gov/api/open/v1/DataSetCodes`
- Auth: none declared
- TypeScript: <https://skmtc.dev/fema/apis/openfema-api/docs/v1/DataSetCodes/get.ts> (a function with typed inputs; its response is checked against the schema)

Metadata for the OpenFEMA API dataset codes. This dataset contains attributes regarding published fields that utilize coded values. Although the codes are presented in the dataset data dictionaries, providing the code descriptions in a format that can be queried is beneficial.
A specific code description can be retrieved by applying a filter to this dataset, providing a source dataset (or endpoint) name, the dataset version, the field for which a code description is desired, and the code value. For examples, see the Metadata Tutorial in the OpenFEMA GitHub repository: https://github.com/FEMA/openfema-samples/tree/master/analysis-examples
Please note that only FEMA maintained codes are documented in this table. Codes such as state abbreviations, FIPS codes, and Census Classification codes will not be provided.

FEMA's terms and conditions and citation requirements for datasets (API usage or file downloads) can be found on the OpenFEMA Terms and Conditions page: https://www.fema.gov/about/openfema/terms-conditions.
For answers to Frequently Asked Questions (FAQs) about the OpenFEMA program, API, and publicly available datasets, please visit: https://www.fema.gov/about/openfema/faq.

If you have media inquiries about this dataset, please email the FEMA Press Office at FEMA-Press-Office@fema.dhs.gov. For inquiries about FEMA's data and Open Government program, please email the OpenFEMA team at OpenFEMA@fema.dhs.gov.

## Query parameters

- `$filter` string
- `$top` integer
- `$skip` integer
- `$count` boolean
- `$filename` string
- `$metadata` boolean
- `$gzip` boolean
- `$orderby` string[]
- `$select` string[]
- `$format` 'json' | 'jsona' | 'jsonl' | 'csv' | 'parquet'

## Response `200`

OK

- object
  - `metadata` Metadata
    - `skip` number, nullable
    - `filter` string, nullable
    - `orderBy` string, nullable
    - `select` string, nullable
    - `rundate` string, nullable
    - `top` number, nullable
    - `format` string, nullable
    - `metadata` boolean, nullable
    - `entityname` string
    - `version` string
    - `url` string
    - `count` number, nullable
  - `DataSetCodes` V1DataSetCodes[]
    - `id` string, string: Unique ID assigned to this record.
    - `datasetId` string, string: Unique, textual identifier for a dataset.
    - `datasetName` string, string: Name of the dataset.
    - `datasetVersion` number: Major version number of the dataset API endpoint. Version number does not change when additional fields are added to an existing dataset. Data type changes and field deletions will necessitate a version number change.
    - `fieldName` string, string: Name of the dataset field.
    - `code` string, string: Code for the specified field and dataset.
    - `description` string, string: Code description.
    - `lastRefresh` string, date-time: Last date the dataset was updated in the datastore
    - `hash` string, string: MD5 hash of fields and values of the record

---

[API](https://skmtc.dev/fema/apis/openfema-api.md) - [All operations](https://skmtc.dev/fema/apis/openfema-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fema/apis/openfema-api/revisions/fdc02603897f?raw)
