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": 80909722158.23,
                    "gross_outlay_amount": 73623016776.14
                },
                {
                    "name": "Housing assistance",
                    "obligated_amount": 12986116711.26,
                    "gross_outlay_amount": 3763721437.71
                },
                {
                    "name": "Federal employee retirement and disability",
                    "obligated_amount": 0.0,
                    "gross_outlay_amount": 967991.59
                }
            ],
            "obligated_amount": 93895838869.49,
            "gross_outlay_amount": 77387706205.44
        },
        {
            "name": "Agriculture",
            "children": [
                {
                    "name": "Farm income stabilization",
                    "obligated_amount": 30953240594.89,
                    "gross_outlay_amount": 36605911695.43
                },
                {
                    "name": "Agricultural research and services",
                    "obligated_amount": 4715039764.64,
                    "gross_outlay_amount": 6412025057.56
                }
            ],
            "obligated_amount": 35668280359.53,
            "gross_outlay_amount": 43017936752.99
        },
        {
            "name": "Community and Regional Development",
            "children": [
                {
                    "name": "Area and regional development",
                    "obligated_amount": 28620886939.49,
                    "gross_outlay_amount": 2843117480.2
                },
                {
                    "name": "Community development",
                    "obligated_amount": 487726658.11,
                    "gross_outlay_amount": 136317333.28
                },
                {
                    "name": "Disaster relief and insurance",
                    "obligated_amount": 97831253.3,
                    "gross_outlay_amount": 99918455.23
                }
            ],
            "obligated_amount": 29206444850.9,
            "gross_outlay_amount": 3079353268.71
        },
        {
            "name": "Natural Resources and Environment",
            "children": [
                {
                    "name": "Conservation and land management",
                    "obligated_amount": 6920792578.55,
                    "gross_outlay_amount": 8476461538.33
                },
                {
                    "name": "Water resources",
                    "obligated_amount": 107011006.65,
                    "gross_outlay_amount": 225029055.54
                },
                {
                    "name": "Recreational resources",
                    "obligated_amount": 43866373.15,
                    "gross_outlay_amount": 57927206.56
                },
                {
                    "name": "Other natural resources",
                    "obligated_amount": 513352.26,
                    "gross_outlay_amount": 326153.13
                }
            ],
            "obligated_amount": 7072183310.61,
            "gross_outlay_amount": 8759743953.56
        },
        {
            "name": "Energy",
            "children": [
                {
                    "name": "Energy supply",
                    "obligated_amount": 3834416184.0,
                    "gross_outlay_amount": 3722533526.58
                }
            ],
            "obligated_amount": 3834416184.0,
            "gross_outlay_amount": 3722533526.58
        },
        {
            "name": "Commerce and Housing Credit",
            "children": [
                {
                    "name": "Mortgage credit",
                    "obligated_amount": 3038894477.47,
                    "gross_outlay_amount": 1753390953.25
                }
            ],
            "obligated_amount": 3038894477.47,
            "gross_outlay_amount": 1753390953.25
        },
        {
            "name": "Health",
            "children": [
                {
                    "name": "Consumer and occupational health and safety",
                    "obligated_amount": 1025853823.04,
                    "gross_outlay_amount": 983079136.78
                }
            ],
            "obligated_amount": 1025853823.04,
            "gross_outlay_amount": 983079136.78
        },
        {
            "name": "International Affairs",
            "children": [
                {
                    "name": "International development and humanitarian assistance",
                    "obligated_amount": 474974175.33,
                    "gross_outlay_amount": 1308670821.77
                }
            ],
            "obligated_amount": 474974175.33,
            "gross_outlay_amount": 1308670821.77
        },
        {
            "name": "General Government",
            "children": [
                {
                    "name": "General purpose fiscal assistance",
                    "obligated_amount": 223532298.06,
                    "gross_outlay_amount": 226461602.46
                }
            ],
            "obligated_amount": 223532298.06,
            "gross_outlay_amount": 226461602.46
        }
    ],
    "messages": [],
    "page_metadata": {
        "page": 1,
        "total": 9,
        "limit": 10,
        "next": null,
        "previous": null,
        "hasNext": false,
        "hasPrevious": false
    }
}