Disaster Funding and Spending Download
/api/v2/download/disaster/Creates a new download job for the requested COVID-19 related account and award. Returns a link to a zipped file containing the generated data files.
Request
curl -X POST 'https://api.usaspending.gov/api/v2/download/disaster/' \
-H 'Content-Type: application/json' \
-d '{
"filters": {
"def_codes": [
"L",
"M",
"N",
"O",
"P",
"U"
]
}
}'Request body
The filters object is shared by every search endpoint. The filter object explains each filter with examples.
filtersobject · Filters1 fielddef_codesarray of DEFCList of Disaster Emergency Fund (DEF) Codes (DEFC) defined by legislation at the time of writing. Currently, the download is limited to either All COVID-19 DEFC or a single COVID-19 DEFC. A list of current DEFC can be found here.
file_formatenum (string)The format of the file(s) in the zip file containing the data. Currently, only works for a download filtered on a single DEFC.
csvtsvpstxt
Try it
Runs against the live API. Responses are real data.
/api/v2/download/disaster/Response · 200
status_urlstringRequiredThe endpoint used to get the status of a download.
file_namestringRequiredIs the name of the zipfile containing CSVs that will be generated (with a timestamp suffix).
file_urlstringRequiredThe URL for downloading the zip file containing the generated data files. It might not resolve to a file if the download is in-progress.
download_requestobjectRequiredThe JSON object used when processing the download.
{
"status_url": "https://api.usaspending.gov/api/v2/download/status?file_name=COVID-19_Profile_2020-07-09_H17M39S27272793.zip",
"file_name": "COVID-19_Profile_2020-07-09_H17M39S27272793.zip",
"file_url": "https://files.usaspending.gov/generated_downloads/COVID-19_Profile_2020-07-09_H17M39S27272793.zip",
"download_request": {
"filters": {
"def_codes": [
"L"
],
"latest_fiscal_period": "8",
"latest_fiscal_year": "2020",
"start_date": "2020-04-01"
}
}
}Recent changes
Generated from contracts/v2/download/disaster.md in the USAspending API repo.