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/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Cache-Trace: no-cache
Content-Type: application/json
Vary: Accept

{
    "toptier_code": "012",
    "fiscal_year": 2020,
    "results": [
        {
            "name": "Income Security",
            "children": [
                {
                    "name": "Food and nutrition assistance",
                    "obligated_amount": 247013823762.25,
                    "gross_outlay_amount": 200563854472.64
                },
                {
                    "name": "Housing assistance",
                    "obligated_amount": 22786462334.01,
                    "gross_outlay_amount": 9387557927.09
                },
                {
                    "name": "Federal employee retirement and disability",
                    "obligated_amount": 0.0,
                    "gross_outlay_amount": 2466589.36
                }
            ],
            "obligated_amount": 269800286096.26,
            "gross_outlay_amount": 209953878989.09
        },
        {
            "name": "Agriculture",
            "children": [
                {
                    "name": "Farm income stabilization",
                    "obligated_amount": 44753011776.99,
                    "gross_outlay_amount": 52773211893.03
                },
                {
                    "name": "Agricultural research and services",
                    "obligated_amount": 20005057862.74,
                    "gross_outlay_amount": 17099925998.85
                }
            ],
            "obligated_amount": 64758069639.73,
            "gross_outlay_amount": 69873137891.88
        },
        {
            "name": "Community and Regional Development",
            "children": [
                {
                    "name": "Area and regional development",
                    "obligated_amount": 41469194700.53,
                    "gross_outlay_amount": 6577428717.64
                },
                {
                    "name": "Community development",
                    "obligated_amount": 863200845.65,
                    "gross_outlay_amount": 311072037.83
                },
                {
                    "name": "Disaster relief and insurance",
                    "obligated_amount": 105526858.81,
                    "gross_outlay_amount": 107043903.27
                }
            ],
            "obligated_amount": 42437922404.99,
            "gross_outlay_amount": 6995544658.74
        },
        {
            "name": "Natural Resources and Environment",
            "children": [
                {
                    "name": "Conservation and land management",
                    "obligated_amount": 18333185550.86,
                    "gross_outlay_amount": 19525885200.12
                },
                {
                    "name": "Water resources",
                    "obligated_amount": 468797811.81,
                    "gross_outlay_amount": 539537086.9
                },
                {
                    "name": "Recreational resources",
                    "obligated_amount": 136169211.0,
                    "gross_outlay_amount": 149920516.14
                },
                {
                    "name": "Other natural resources",
                    "obligated_amount": 3899143.97,
                    "gross_outlay_amount": 1285470.53
                }
            ],
            "obligated_amount": 18942051717.64,
            "gross_outlay_amount": 20216628273.69
        },
        {
            "name": "Energy",
            "children": [
                {
                    "name": "Energy supply",
                    "obligated_amount": 11122163722.71,
                    "gross_outlay_amount": 10804360445.12
                }
            ],
            "obligated_amount": 11122163722.71,
            "gross_outlay_amount": 10804360445.12
        },
        {
            "name": "Commerce and Housing Credit",
            "children": [
                {
                    "name": "Mortgage credit",
                    "obligated_amount": 5639408630.94,
                    "gross_outlay_amount": 3975612796.47
                }
            ],
            "obligated_amount": 5639408630.94,
            "gross_outlay_amount": 3975612796.47
        },
        {
            "name": "Health",
            "children": [
                {
                    "name": "Consumer and occupational health and safety",
                    "obligated_amount": 2446664988.56,
                    "gross_outlay_amount": 2425952929.59
                }
            ],
            "obligated_amount": 2446664988.56,
            "gross_outlay_amount": 2425952929.59
        },
        {
            "name": "International Affairs",
            "children": [
                {
                    "name": "International development and humanitarian assistance",
                    "obligated_amount": 2004180623.46,
                    "gross_outlay_amount": 2254600645.87
                }
            ],
            "obligated_amount": 2004180623.46,
            "gross_outlay_amount": 2254600645.87
        },
        {
            "name": "General Government",
            "children": [
                {
                    "name": "General purpose fiscal assistance",
                    "obligated_amount": 532807394.81,
                    "gross_outlay_amount": 529264458.34
                }
            ],
            "obligated_amount": 532807394.81,
            "gross_outlay_amount": 529264458.34
        }
    ],
    "messages": [],
    "page_metadata": {
        "page": 1,
        "total": 9,
        "limit": 10,
        "next": null,
        "previous": null,
        "hasNext": false,
        "hasPrevious": false
    }
}