USAspending.gov Federal Accounts API

Federal account and Treasury Account Symbol (TAS) data.

Documentation

Specifications

OpenAPI Specification

usaspending-federal-accounts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: USAspending Agency Federal Accounts API
  description: The USAspending API provides free, public, unauthenticated access to U.S. federal spending data - contracts, grants, loans, direct payments, and other financial assistance awards, plus agency budgets, federal account (Treasury Account Symbol) data, recipient profiles, and disaster/emergency (including COVID-19) relief spending. USAspending.gov is operated by the Treasury Department's Bureau of the Fiscal Service to implement the DATA Act's federal spending transparency mandate. Most search and listing endpoints accept a POST with a JSON body describing filters, fields, sort, and pagination, because filter combinations are too complex for query strings; simpler single-resource lookups use GET with path parameters. This document is a representative, hand-authored subset of the full API grounded directly in the official API Blueprint contracts published in the usaspending-api GitHub repository - it is not a complete mirror of every endpoint and field.
  version: v2
  contact:
    name: USAspending.gov / Bureau of the Fiscal Service
    url: https://www.usaspending.gov
  license:
    name: Open source (CC0 / public domain, U.S. Government work)
    url: https://github.com/fedspendingtransparency/usaspending-api/blob/master/LICENSE.md
servers:
- url: https://api.usaspending.gov/api/v2
  description: Production (no authentication required)
tags:
- name: Federal Accounts
  description: Federal account and Treasury Account Symbol (TAS) data.
paths:
  /federal_accounts/{account_number}/:
    parameters:
    - $ref: '#/components/parameters/AccountNumber'
    - $ref: '#/components/parameters/FiscalYear'
    get:
      operationId: getFederalAccount
      tags:
      - Federal Accounts
      summary: Federal account detail
      description: Returns the agency identifier, account code, title, bureau, and aggregated obligated / outlay / budgetary-resources totals for the given federal account and its child Treasury Account Symbols (TAS).
      responses:
        '200':
          description: Federal account detail with child Treasury Accounts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FederalAccount'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    FiscalYear:
      name: fiscal_year
      in: query
      required: false
      description: The desired "as of" fiscal year. Defaults to the current fiscal year.
      schema:
        type: integer
        example: 2026
    AccountNumber:
      name: account_number
      in: path
      required: true
      description: The Federal Account symbol (Agency Code-Main Account Code).
      schema:
        type: string
        example: 011-1022
  schemas:
    TreasuryAccount:
      type: object
      properties:
        name:
          type: string
        code:
          type: string
        obligated_amount:
          type: number
        gross_outlay_amount:
          type: number
        budgetary_resources_amount:
          type: number
    FederalAccount:
      type: object
      properties:
        fiscal_year:
          type: string
        id:
          type: integer
        agency_identifier:
          type: string
        main_account_code:
          type: string
        federal_account_code:
          type: string
        account_title:
          type: string
        parent_agency_toptier_code:
          type: string
        parent_agency_name:
          type: string
        bureau_name:
          type: string
        bureau_slug:
          type: string
        total_obligated_amount:
          type: number
          nullable: true
        total_gross_outlay_amount:
          type: number
          nullable: true
        total_budgetary_resources:
          type: number
          nullable: true
        children:
          type: array
          items:
            $ref: '#/components/schemas/TreasuryAccount'
    Error:
      type: object
      properties:
        detail:
          type: string