USAspending API ReferenceIndependent
Try the API

List Federal Accounts by Sub-Component

GET/api/v2/agency/{toptier_code}/sub_components/{bureau_slug}/

Returns a list of Federal Accounts in the Agency's appropriations for a single fiscal year, filtered on the given Sub-Component

Request

curl 'https://api.usaspending.gov/api/v2/agency/086/sub_components/bureau_of_the_census/'

Path parameters

  • toptier_codestringRequired

    The toptier code of an agency (could be a CGAC or FREC) so only numeric character strings of length 3-4 are accepted.

    Example 086

  • bureau_slugstringRequired

    Example bureau_of_the_census

Query parameters

  • fiscal_yearstring

    The desired appropriations fiscal year. Defaults to the current FY.

  • agency_typeenum (string)

    Indicated if the data should be pulled from the awarding agency or the funding agency

    Allowed values
    • awarding
    • funding

    Default awarding

  • orderenum (string)

    Indicates what direction results should be sorted by. Valid options include asc for ascending order or desc for descending order.

    Allowed values
    • desc
    • asc

    Default desc

  • sortenum (string)

    Optional parameter indicating what value results should be sorted by.

    Allowed values
    • name
    • `id` Federal Account Number
    • total_obligations
    • total_budgetary_resources

    Default total_budgetary_resources

  • pagestring

    The page number that is currently returned.

    Default 1

  • limitstring

    How many results are returned.

    Default 10

Try it

Runs against the live API. Responses are real data.

GET/api/v2/agency/086/sub_components/bureau_of_the_census/

Response · 200

  • toptier_codestringRequired
  • bureau_slugstringRequired
  • fiscal_yearnumberRequired
  • totalsobject · TotalObjectRequired3 fields
    • total_budgetary_resourcesnumberRequired
    • total_obligationsnumberRequired
    • total_outlaysnumberRequired
  • page_metadataobject · PageMetadataRequired7 fields

    Information used for pagination of results.

    • pagenumberRequired
    • totalnumberRequired
    • limitnumberRequired
    • nextnumberRequiredNullable
    • previousnumberRequiredNullable
    • hasNextbooleanRequired
    • hasPreviousbooleanRequired
  • resultsarray of FederalAccountRequired4 fields
    • namestringRequired
    • idstringRequired
    • total_budgetary_resourcesnumberRequired
    • total_obligationsnumberRequired
  • messagesarray of stringRequired

    An array of warnings or instructional directives to aid consumers of this endpoint with development and debugging.

Example response
{
    "toptier_code": "073",
    "bureau_slug": "bureau_of_the_census",
    "fiscal_year": 2018,
    "totals": {
        "total_budgetary_resources": 400000,
        "total_obligations": 200000.72,
        "total_outlays": 393012.0   
    }                                      
    "page_metadata": {
        "page": 1,
        "total": 1,
        "limit": 2,
        "next": 2,
        "previous": null,
        "hasNext": true,
        "hasPrevious": false,
    },
    "results": [
        {
            "name": "Salaries and Expenses",
            "id": "123-4567",
            "total_budgetary_resources": 400000,
            "total_obligations": 200000.72,
            "total_outlays": 393012.0                
        }
    ],
    "messages": []
}

Recent changes

No contract changes to this endpoint since October 2024. The changelog covers every endpoint.

Generated from contracts/v2/agency/toptier_code/sub_components/bureau_slug.md in the USAspending API repo.

Loading…