Federal account profiles
Spending, object classes, and program activities for each federal account.
Open a row for parameters and ready-to-run samples. The full reference has every field and a live console.
POSTFederal 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.
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"
}
}'GETFederal Accounts Landing Page/api/v2/federal_accounts/{account_number}/
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.
curl 'https://api.usaspending.gov/api/v2/federal_accounts/011/'POSTObject Classes Total/api/v2/federal_accounts/{federal_account_code}/object_classes/total
This endpoint returns an array of object classes obligation, code, and name for the specified federal account
curl -X POST 'https://api.usaspending.gov/api/v2/federal_accounts/431-0500/object_classes/total' \
-H 'Content-Type: application/json' \
-d '{
"filters": {
"time_period": [
{
"start_date": "2019-10-01",
"end_date": "2020-09-30"
}
],
"program_activity": [
"001"
]
}
}'GETProgram Activities/api/v2/federal_accounts/{federal_account_code}/program_activities/
This route returns program activities that the specified federal account has allotted money toward.
curl 'https://api.usaspending.gov/api/v2/federal_accounts/431-0500/program_activities/'POSTProgram Activities Total/api/v2/federal_accounts/{federal_account_code}/program_activities/total
This endpoint returns an array of each program activity's obligation, code, name, and type for the specified federal account
curl -X POST 'https://api.usaspending.gov/api/v2/federal_accounts/431-0500/program_activities/total' \
-H 'Content-Type: application/json' \
-d '{
"filters": {
"time_period": [
{
"start_date": "2019-10-01",
"end_date": "2020-09-30"
}
],
"program_activity": [
"0001"
]
}
}'GETAvailable Object Classes/api/v2/federal_accounts/{federal_account_id}/available_object_classes
This route returns object classes that the specified federal account has allotted money toward.
curl 'https://api.usaspending.gov/api/v2/federal_accounts/5/available_object_classes'GETList of Available Program Activities/api/v2/federal_accounts/{federal_account_id}/available_program_activities
This endpoint supports the Federal Account page and allows for listing all Program Activities with activity by the Federal Account.
curl 'https://api.usaspending.gov/api/v2/federal_accounts/5/available_program_activities'GETFiscal Year Snapshot/api/v2/federal_accounts/{federal_account_id}/fiscal_year_snapshot/
This route sends a request to the backend to retrieve budget information for a federal account.
curl 'https://api.usaspending.gov/api/v2/federal_accounts/6000/fiscal_year_snapshot/'GETFiscal Year Snapshot/api/v2/federal_accounts/{federal_account_id}/fiscal_year_snapshot/{fiscal_year}/
This route sends a request to the backend to retrieve budget information for a federal account.
curl 'https://api.usaspending.gov/api/v2/federal_accounts/6000/fiscal_year_snapshot/2018/'GETFederal Obligations/api/v2/federal_obligations/
This endpoint is used to power USAspending.gov's agency profile pages.
curl 'https://api.usaspending.gov/api/v2/federal_obligations/?fiscal_year=2017&funding_agency_id=456'GETAgency Profile/api/v2/financial_balances/agencies/
These endpoints are used to power USAspending.gov's agency profile pages.
curl 'https://api.usaspending.gov/api/v2/financial_balances/agencies/?fiscal_year=2017&funding_agency_id=456'GETMajor Object Classes/api/v2/financial_spending/major_object_class/
These endpoints are used to power USAspending.gov's agency profile pages.
curl 'https://api.usaspending.gov/api/v2/financial_spending/major_object_class/?fiscal_year=2017&funding_agency_id=456'GETMinor Object Classes/api/v2/financial_spending/object_class/
These endpoints are used to power USAspending.gov's agency profile pages.
curl 'https://api.usaspending.gov/api/v2/financial_spending/object_class/?fiscal_year=2017&funding_agency_id=456&major_object_class_code=30'