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": 2021,
    "results": [
        {
            "name": "Income Security",
            "children": [
                {
                    "name": "Food and nutrition assistance",
                    "obligated_amount": 105822466973.53,
                    "gross_outlay_amount": 79075913057.85
                },
                {
                    "name": "Housing assistance",
                    "obligated_amount": 15651213893.95,
                    "gross_outlay_amount": 4355080727.71
                },
                {
                    "name": "Federal employee retirement and disability",
                    "obligated_amount": 0.0,
                    "gross_outlay_amount": 1068783.76
                }
            ],
            "obligated_amount": 121473680867.48,
            "gross_outlay_amount": 83432062569.32
        },
        {
            "name": "Community and Regional Development",
            "children": [
                {
                    "name": "Area and regional development",
                    "obligated_amount": 35405644246.7,
                    "gross_outlay_amount": 2816058951.37
                },
                {
                    "name": "Community development",
                    "obligated_amount": 639257951.77,
                    "gross_outlay_amount": 111531494.67
                },
                {
                    "name": "Disaster relief and insurance",
                    "obligated_amount": 32476646.51,
                    "gross_outlay_amount": 26247719.28
                }
            ],
            "obligated_amount": 36077378844.98,
            "gross_outlay_amount": 2953838165.32
        },
        {
            "name": "Agriculture",
            "children": [
                {
                    "name": "Farm income stabilization",
                    "obligated_amount": 27794220467.39,
                    "gross_outlay_amount": 31629934253.35
                },
                {
                    "name": "Agricultural research and services",
                    "obligated_amount": 6529364999.03,
                    "gross_outlay_amount": 8276207405.92
                }
            ],
            "obligated_amount": 34323585466.42,
            "gross_outlay_amount": 39906141659.27
        },
        {
            "name": "Natural Resources and Environment",
            "children": [
                {
                    "name": "Conservation and land management",
                    "obligated_amount": 6434960954.28,
                    "gross_outlay_amount": 9319779745.86
                },
                {
                    "name": "Water resources",
                    "obligated_amount": 154535755.4,
                    "gross_outlay_amount": 321217964.09
                },
                {
                    "name": "Recreational resources",
                    "obligated_amount": 40759434.09,
                    "gross_outlay_amount": 48080919.86
                },
                {
                    "name": "Other natural resources",
                    "obligated_amount": 1672844.12,
                    "gross_outlay_amount": 1217796.23
                }
            ],
            "obligated_amount": 6631928987.89,
            "gross_outlay_amount": 9690296426.04
        },
        {
            "name": "Commerce and Housing Credit",
            "children": [
                {
                    "name": "Mortgage credit",
                    "obligated_amount": 2919470250.29,
                    "gross_outlay_amount": 1673289795.6
                }
            ],
            "obligated_amount": 2919470250.29,
            "gross_outlay_amount": 1673289795.6
        },
        {
            "name": "Energy",
            "children": [
                {
                    "name": "Energy supply",
                    "obligated_amount": 1124376100.04,
                    "gross_outlay_amount": 838902929.39
                }
            ],
            "obligated_amount": 1124376100.04,
            "gross_outlay_amount": 838902929.39
        },
        {
            "name": "International Affairs",
            "children": [
                {
                    "name": "International development and humanitarian assistance",
                    "obligated_amount": 1062681867.61,
                    "gross_outlay_amount": 1016581611.23
                }
            ],
            "obligated_amount": 1062681867.61,
            "gross_outlay_amount": 1016581611.23
        },
        {
            "name": "Health",
            "children": [
                {
                    "name": "Consumer and occupational health and safety",
                    "obligated_amount": 924867556.85,
                    "gross_outlay_amount": 885092323.19
                }
            ],
            "obligated_amount": 924867556.85,
            "gross_outlay_amount": 885092323.19
        },
        {
            "name": "General Government",
            "children": [
                {
                    "name": "General purpose fiscal assistance",
                    "obligated_amount": 195458861.48,
                    "gross_outlay_amount": 6339589.44
                }
            ],
            "obligated_amount": 195458861.48,
            "gross_outlay_amount": 6339589.44
        }
    ],
    "messages": [],
    "page_metadata": {
        "page": 1,
        "total": 9,
        "limit": 10,
        "next": null,
        "previous": null,
        "hasNext": false,
        "hasPrevious": false
    }
}