Twinkle HubTwinkle Hub
Sign in

📌 2026-08-17 added: ⚖️ Taiwan statute time machine — historical article text · revision history · full-text search · citation graph (935 datasets · 35,454+ rows)

View full changelog →

US federal agency FY budgetary rollup

us_get_agency_spending

TW-specificMIT

**關鍵字 / 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.

Input schema

{
  "properties": {
    "toptier_code": {
      "title": "Toptier Code",
      "type": "string"
    },
    "fiscal_year": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Fiscal Year"
    }
  },
  "required": [
    "toptier_code"
  ],
  "title": "us_get_agency_spendingArguments",
  "type": "object"
}

How to call

Once your Twinkle Hub MCP client is configured, your agent will see us_get_agency_spending. Just ask it to call — example:

# Ask Claude / any MCP client:
請用 us_get_agency_spending 處理 "…"。

# It will call:
us_get_agency_spending(input="…")

Haven't set up a client yet?

Claude Desktop in 3 minutes — download the .mcpb and double-click, or see docs for other clients.

See user docs