關鍵字 / Keywords: 美國聯邦 機關 部會 預算 支出 obligation outlay budget budgetary_resources FY toptier_code agency DOD DOE NASA GSA Treasury USASpending federal spending rollup
Scope: one federal agency's per-FY budgetary rollup — total budgetary resources · obligated · outlayed · by-period breakdown.
Endpoint: GET https://api.usaspending.gov/api/v2/agency/{toptier_code}/budgetary_resources/ (with fallback resolution via GET https://api.usaspending.gov/api/v2/references/toptier_agencies/ when the caller passes an agency name substring)
Args:
toptier_code: 3-4-digit federal toptier_code
(e.g. "097" DOD, "089" Energy, "075" HHS,
"1500" Justice sub). Also accepts an agency name
substring or abbreviation ("Department of Defense",
"DOD", "NASA") — resolved via the toptier reference
list on first use.
fiscal_year: restrict to a single FY (default: all FYs since
data started ~FY17).
Returns dict {toptier_code, agency_name, fiscal_year_filter, agency_data_by_year: [{fiscal_year, agency_budgetary_resources, agency_total_obligated, agency_total_outlayed, total_budgetary_resources, agency_obligation_by_period: [{period, obligated}, ...]}, ...]}.
License: "Creative Commons Zero v1.0 Universal (CC0-1.0)".
Rate-limited to ~5 req/sec.