USAspending.gov Budget Functions API

Federal budget functional classification reference data.

Documentation

Specifications

OpenAPI Specification

usaspending-budget-functions-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: USAspending Agency Budget Functions 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: Budget Functions
  description: Federal budget functional classification reference data.
paths:
  /budget_functions/list_budget_functions/:
    get:
      operationId: listBudgetFunctions
      tags:
      - Budget Functions
      summary: List budget functions
      description: Returns all federal budget functions, ordered by title.
      responses:
        '200':
          description: List of budget functions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/BudgetFunction'
  /budget_functions/list_budget_subfunctions/:
    get:
      operationId: listBudgetSubfunctions
      tags:
      - Budget Functions
      summary: List budget subfunctions
      description: Returns all federal budget subfunctions, optionally scoped to a parent budget function.
      parameters:
      - name: budget_function
        in: query
        required: false
        description: Budget function code to scope the subfunction list to.
        schema:
          type: string
      responses:
        '200':
          description: List of budget subfunctions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/BudgetSubfunction'
components:
  schemas:
    BudgetFunction:
      type: object
      properties:
        budget_function_code:
          type: string
        budget_function_title:
          type: string
    BudgetSubfunction:
      type: object
      properties:
        budget_subfunction_code:
          type: string
        budget_subfunction_title:
          type: string