Federal Accounts Landing Page
/api/v2/federal_accounts/This endpoint supports the federal account landing page, which provides a list of all federal accounts for which individual federal accounts pages are available on USAspending.gov.
This endpoint returns a list of federal accounts, their number, name, managing agency, and budgetary resources.
Request
curl -X POST 'https://api.usaspending.gov/api/v2/federal_accounts/' \
-H 'Content-Type: application/json' \
-d '{
"filters": {
"agency_identifier": "339",
"fy": "2018"
},
"sort": {
"direction": "asc",
"field": "account_name"
}
}'Request body
The filters object is shared by every search endpoint. The filter object explains each filter with examples.
filtersobject · AdvancedFilterObject2 fieldsThe filter takes a fiscal year, but if one is not provided, it defaults to the last certified fiscal year.
fystringProviding
fydoes not change the rows that are returned, instead, it limits thebudgetary_resourcesvalue to the fiscal year indicated. Federal accounts with no submissions for that fiscal year will return null.agency_identifierstring
sortobject · SortObject2 fieldsdirectionenum (string)The direction results are sorted by.
ascfor ascending,descfor descending.ascdesc
fieldstringThe field that you want to sort on.
limitnumberThe number of results to include per page.
pagenumberThe page of results to return based on the limit.
keywordstringThe keyword that you want to search on. Can be used to search by name, number, managing agency, and budgetary resources.
Try it
Runs against the live API. Responses are real data.
/api/v2/federal_accounts/Response · 200
previousnumberNullablecountnumberRequiredlimitnumberRequiredhasNextbooleanRequiredpagenumberRequiredhasPreviousbooleanRequirednextnumberRequiredNullablefystringRequiredresultsarray of FederalAccountListing7 fieldsaccount_namestringRequiredNullableName of the federal account.
nullwhen the name is not provided.account_numberstringRequiredNullableThe number for the federal account.
nullwhen no account number is provided.account_idnumberRequiredA unique identifier for the federal account
managing_agency_acronymstringRequiredagency_identifierstringRequiredbudgetary_resourcesnumberRequiredNullablemanaging_agencystringRequired
{
"count": 0,
"limit": 0,
"hasNext": false,
"page": 0,
"hasPrevious": false,
"next": null,
"fy": "",
"results": [
{
"account_name": null,
"account_number": null,
"account_id": 0,
"managing_agency_acronym": "",
"agency_identifier": "",
"budgetary_resources": null,
"managing_agency": ""
}
]
}Recent changes
- Mentioned in the April 21, 2021 release notes
- Mentioned in the April 5, 2021 release notes
- Mentioned in the April 20, 2020 release notes
- Mentioned in the September 11, 2018 release notes
Generated from contracts/v2/federal_accounts.md in the USAspending API repo.