Bulk Award Download
/api/v2/bulk_download/awards/This endpoint is used by the Custom Award Data Download page.
This route sends a request to the backend to begin generating a zipfile of award data in CSV form for download.
Request
curl -X POST 'https://api.usaspending.gov/api/v2/bulk_download/awards/' \
-H 'Content-Type: application/json' \
-d '{
"filters": {
"prime_award_types": [
"A",
"B",
"C",
"D",
"IDV_A",
"IDV_B",
"IDV_B_A",
"IDV_B_B",
"IDV_B_C",
"IDV_C",
"IDV_D",
"IDV_E",
"02",
"03",
"04",
"05",
"10",
"06",
"07",
"08",
"09",
"11",
"-1"
],
"date_type": "action_date",
"date_range": {
"start_date": "2019-10-01",
"end_date": "2020-09-30"
},
"agencies": [
{
"type": "funding",
"tier": "subtier",
"name": "Animal and Plant Health Inspection Service",
"toptier_name": "Department of Agriculture"
}
]
},
"file_format": "csv"
}'Request body
The filters object is shared by every search endpoint. The filter object explains each filter with examples.
filtersobject · FiltersRequired10 fieldsagenciesarray of AgencyRequired4 fieldsnamestringRequiredtierenum (string)Requiredtoptiersubtier
typeenum (string)Requiredfundingawarding
toptier_namestringProvided when the
namebelongs to a subtier agency
prime_award_typesarray of stringdate_rangeobject · TimePeriodRequired2 fieldsObject with start and end dates
start_datestringRequiredend_datestringRequired
date_typeenum (string)Requiredaction_datelast_modified_date
keywordstringplace_of_performance_locationsarray of Location7 fieldscountrystringRequiredstatestringcountystringcitystringdistrict_originalstringA 2 character code indicating the congressional district
-
When provided, a
statemust always be provided as well. -
When provided, a
countymust never be provided. -
When provided,
countrymust always be "USA". -
When provided,
district_currentmust never be provided.
-
district_currentstringA 2 character code indicating the current congressional district
-
When provided, a
statemust always be provided as well. -
When provided, a
countymust never be provided. -
When provided,
countrymust always be "USA". -
When provided,
district_originalmust never be provided.
-
zipstring
place_of_performance_scopeenum (string)domesticforeign
recipient_locationsarray of Location7 fieldscountrystringRequiredstatestringcountystringcitystringdistrict_originalstringA 2 character code indicating the congressional district
-
When provided, a
statemust always be provided as well. -
When provided, a
countymust never be provided. -
When provided,
countrymust always be "USA". -
When provided,
district_currentmust never be provided.
-
district_currentstringA 2 character code indicating the current congressional district
-
When provided, a
statemust always be provided as well. -
When provided, a
countymust never be provided. -
When provided,
countrymust always be "USA". -
When provided,
district_originalmust never be provided.
-
zipstring
recipient_scopeenum (string)domesticforeign
sub_award_typesarray of string
columnsarray of stringfile_formatenum (string)The format of the file(s) in the zip file containing the data.
csvtsvpstxt
Try it
Runs against the live API. Responses are real data.
/api/v2/bulk_download/awards/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 (file_name is timestamp followed by
_transactionsor_awards).file_urlstringRequiredThe URL for the file.
download_requestobjectRequiredThe JSON object used when processing the download.
{
"status_url": "https://api.usaspending.gov/api/v2/download/status?file_name=All_PrimeTransactions_2020-09-16_H15M20S52934397.zip",
"file_name": "All_PrimeTransactions_2020-09-16_H15M20S52934397.zip",
"file_url": "https://files.usaspending.gov/generated_downloads/dev/All_PrimeTransactions_2020-09-16_H15M20S52934397.zip",
"download_request": {
"columns": [],
"download_types": [
"prime_awards"
],
"file_format": "csv",
"filters": {
"agencies": [
{
"name": "Animal and Plant Health Inspection Service",
"tier": "subtier",
"toptier_name": "Department of Agriculture",
"type": "funding"
}
],
"prime_and_sub_award_types": {
"prime_awards": [
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"A",
"B",
"C",
"D",
"IDV_A",
"IDV_B",
"IDV_B_A",
"IDV_B_B",
"IDV_B_C",
"IDV_C",
"IDV_D",
"IDV_E",
"-1"
],
"sub_awards": []
},
"time_period": [
{
"date_type": "action_date",
"end_date": "2020-09-30",
"start_date": "2019-10-01"
}
]
},
"request_type": "award"
}
}Recent changes
- DEV-15240: Update API contracts with new Assistance Type codes
- Mentioned in the July 19, 2023 release notes
- Mentioned in the September 21, 2020 release notes
- Mentioned in the September 08, 2020 release notes
Generated from contracts/v2/bulk_download/awards.md in the USAspending API repo.