Disaster Recipient Download
/api/v2/download/disaster/recipients/Creates a new download job for the requested filters. Returns a link to a zipped file containing the generated data files.
Request
curl -X POST 'https://api.usaspending.gov/api/v2/download/disaster/recipients/' \
-H 'Content-Type: application/json' \
-d '{
"filters": {
"def_codes": [
"L",
"M",
"N",
"O",
"P",
"U"
],
"award_type_codes": [
"A",
"B",
"C",
"D"
]
}
}'Request body
The filters object is shared by every search endpoint. The filter object explains each filter with examples.
filtersobject · Filters3 fieldsdef_codesarray of DEFCRequiredList of Disaster Emergency Fund (DEF) Codes (DEFC) defined by legislation at the time of writing. A list of current DEFC can be found here.
award_type_codesarray of AwardTypeCodesList of procurement and assistance award type codes supported by USAspending.gov
02030405060708091011ABCDIDV_AIDV_B_AIDV_B_BIDV_B_CIDV_BIDV_CIDV_DIDV_EF001F002F003F004F005F006F007F008F009F010
querystringA "keyword" or "search term" to filter down results based on this text snippet
file_formatenum (string)
Try it
Runs against the live API. Responses are real data.
/api/v2/download/disaster/recipients/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": {
"award_category": "Contracts",
"columns": [
"recipient",
"award_obligations",
"award_outlays",
"number_of_awards"
],
"download_types": [
"disaster_recipient"
],
"file_format": "csv",
"filters": {
"award_type_codes": [
"A",
"B",
"C",
"D"
],
"def_codes": [
"L",
"M",
"N",
"O",
"P"
]
}
}
}Recent changes
- DEV-15240: Remove duplicate character
- DEV-15240: Update API contracts with new Assistance Type codes
- Mentioned in the August 07, 2020 release notes
Generated from contracts/v2/download/disaster/recipients.md in the USAspending API repo.