Obtain the count of budget functions for a specific agency in a single fiscal year based on whether or not that budget function has ever been submitted in File B.

Documentation for this endpoint can be found here.

GET /api/v2/agency/012/budget_function/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Cache-Trace: no-cache
Content-Type: application/json
Vary: Accept

{
    "toptier_code": "012",
    "fiscal_year": 2021,
    "results": [
        {
            "name": "Income Security",
            "children": [
                {
                    "name": "Food and nutrition assistance",
                    "obligated_amount": 25269090612.17,
                    "gross_outlay_amount": 7304149805.77
                },
                {
                    "name": "Housing assistance",
                    "obligated_amount": 3377277519.32,
                    "gross_outlay_amount": 778387264.0
                },
                {
                    "name": "Federal employee retirement and disability",
                    "obligated_amount": 0.0,
                    "gross_outlay_amount": 245883.03
                }
            ],
            "obligated_amount": 28646368131.49,
            "gross_outlay_amount": 8082782952.8
        },
        {
            "name": "Agriculture",
            "children": [
                {
                    "name": "Farm income stabilization",
                    "obligated_amount": 8526998020.69,
                    "gross_outlay_amount": 12162510876.31
                },
                {
                    "name": "Agricultural research and services",
                    "obligated_amount": 1392199075.66,
                    "gross_outlay_amount": 2411313399.23
                }
            ],
            "obligated_amount": 9919197096.35,
            "gross_outlay_amount": 14573824275.54
        },
        {
            "name": "Community and Regional Development",
            "children": [
                {
                    "name": "Area and regional development",
                    "obligated_amount": 8608148875.25,
                    "gross_outlay_amount": 513518665.11
                },
                {
                    "name": "Community development",
                    "obligated_amount": 154837538.82,
                    "gross_outlay_amount": 16328924.52
                },
                {
                    "name": "Disaster relief and insurance",
                    "obligated_amount": 3055797.84,
                    "gross_outlay_amount": -1321.0
                }
            ],
            "obligated_amount": 8766042211.91,
            "gross_outlay_amount": 529846268.63
        },
        {
            "name": "Natural Resources and Environment",
            "children": [
                {
                    "name": "Conservation and land management",
                    "obligated_amount": 1641964525.08,
                    "gross_outlay_amount": 3025607073.55
                },
                {
                    "name": "Water resources",
                    "obligated_amount": 30619781.84,
                    "gross_outlay_amount": 99486627.78
                },
                {
                    "name": "Recreational resources",
                    "obligated_amount": 9451423.55,
                    "gross_outlay_amount": 12495976.08
                },
                {
                    "name": "Other natural resources",
                    "obligated_amount": 125175.01,
                    "gross_outlay_amount": 291344.32
                }
            ],
            "obligated_amount": 1682160905.48,
            "gross_outlay_amount": 3137881021.73
        },
        {
            "name": "Commerce and Housing Credit",
            "children": [
                {
                    "name": "Mortgage credit",
                    "obligated_amount": 528558788.63,
                    "gross_outlay_amount": 198136498.69
                }
            ],
            "obligated_amount": 528558788.63,
            "gross_outlay_amount": 198136498.69
        },
        {
            "name": "International Affairs",
            "children": [
                {
                    "name": "International development and humanitarian assistance",
                    "obligated_amount": 348590919.87,
                    "gross_outlay_amount": 381061224.56
                }
            ],
            "obligated_amount": 348590919.87,
            "gross_outlay_amount": 381061224.56
        },
        {
            "name": "Health",
            "children": [
                {
                    "name": "Consumer and occupational health and safety",
                    "obligated_amount": 190065833.59,
                    "gross_outlay_amount": 234380104.71
                }
            ],
            "obligated_amount": 190065833.59,
            "gross_outlay_amount": 234380104.71
        },
        {
            "name": "Energy",
            "children": [
                {
                    "name": "Energy supply",
                    "obligated_amount": 96267504.85,
                    "gross_outlay_amount": 21810384.35
                }
            ],
            "obligated_amount": 96267504.85,
            "gross_outlay_amount": 21810384.35
        },
        {
            "name": "General Government",
            "children": [
                {
                    "name": "General purpose fiscal assistance",
                    "obligated_amount": 299630.07,
                    "gross_outlay_amount": 2132226.7
                }
            ],
            "obligated_amount": 299630.07,
            "gross_outlay_amount": 2132226.7
        }
    ],
    "messages": [],
    "page_metadata": {
        "page": 1,
        "total": 9,
        "limit": 10,
        "next": null,
        "previous": null,
        "hasNext": false,
        "hasPrevious": false
    }
}