openapi: 3.0.3 info: title: USAspending Agency 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: Agency description: Per-agency profile, budget, and award data. paths: /agency/{toptier_code}/: parameters: - $ref: '#/components/parameters/ToptierCode' - $ref: '#/components/parameters/FiscalYear' get: operationId: getAgencyOverview tags: - Agency summary: Agency overview description: Returns basic profile information for the agency for the fiscal year specified. responses: '200': description: Agency overview. content: application/json: schema: $ref: '#/components/schemas/AgencyOverview' '404': $ref: '#/components/responses/NotFound' components: responses: NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: DEFC: type: object properties: code: type: string description: Disaster Emergency Fund Code. public_law: type: string title: type: string nullable: true disaster: type: string nullable: true urls: type: array items: type: string nullable: true AgencyOverview: type: object properties: fiscal_year: type: integer toptier_code: type: string name: type: string abbreviation: type: string nullable: true agency_id: type: integer mission: type: string nullable: true website: type: string nullable: true congressional_justification_url: type: string nullable: true subtier_agency_count: type: integer def_codes: type: array items: $ref: '#/components/schemas/DEFC' messages: type: array items: type: string Error: type: object properties: detail: type: string parameters: ToptierCode: name: toptier_code in: path required: true description: The toptier code of an agency (CGAC or FREC), 3-4 numeric characters. schema: type: string example: '020' 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