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": 108086707983.05,
                    "gross_outlay_amount": 103688064760.79
                },
                {
                    "name": "Housing assistance",
                    "obligated_amount": 16329487037.72,
                    "gross_outlay_amount": 4043741864.35
                },
                {
                    "name": "Federal employee retirement and disability",
                    "obligated_amount": 0.0,
                    "gross_outlay_amount": 1494812.82
                }
            ],
            "obligated_amount": 124416195020.77,
            "gross_outlay_amount": 107733301437.96
        },
        {
            "name": "Agriculture",
            "children": [
                {
                    "name": "Farm income stabilization",
                    "obligated_amount": 37032882045.32,
                    "gross_outlay_amount": 42936930899.98
                },
                {
                    "name": "Agricultural research and services",
                    "obligated_amount": 6356029547.05,
                    "gross_outlay_amount": 9928911408.45
                }
            ],
            "obligated_amount": 43388911592.37,
            "gross_outlay_amount": 52865842308.43
        },
        {
            "name": "Community and Regional Development",
            "children": [
                {
                    "name": "Area and regional development",
                    "obligated_amount": 39001928914.64,
                    "gross_outlay_amount": 2680814052.22
                },
                {
                    "name": "Community development",
                    "obligated_amount": 703090410.47,
                    "gross_outlay_amount": 96006457.47
                },
                {
                    "name": "Disaster relief and insurance",
                    "obligated_amount": 24197822.95,
                    "gross_outlay_amount": 15064624.13
                }
            ],
            "obligated_amount": 39729217148.06,
            "gross_outlay_amount": 2791885133.82
        },
        {
            "name": "Natural Resources and Environment",
            "children": [
                {
                    "name": "Conservation and land management",
                    "obligated_amount": 6712688449.09,
                    "gross_outlay_amount": 11592830573.13
                },
                {
                    "name": "Water resources",
                    "obligated_amount": 149045344.51,
                    "gross_outlay_amount": 386410051.65
                },
                {
                    "name": "Recreational resources",
                    "obligated_amount": 41296735.71,
                    "gross_outlay_amount": 53086449.53
                },
                {
                    "name": "Other natural resources",
                    "obligated_amount": 1371720.64,
                    "gross_outlay_amount": 1255508.51
                }
            ],
            "obligated_amount": 6904402249.95,
            "gross_outlay_amount": 12033582582.82
        },
        {
            "name": "Commerce and Housing Credit",
            "children": [
                {
                    "name": "Mortgage credit",
                    "obligated_amount": 2542777291.67,
                    "gross_outlay_amount": 1118373283.71
                }
            ],
            "obligated_amount": 2542777291.67,
            "gross_outlay_amount": 1118373283.71
        },
        {
            "name": "Health",
            "children": [
                {
                    "name": "Consumer and occupational health and safety",
                    "obligated_amount": 992956603.84,
                    "gross_outlay_amount": 1024990574.73
                }
            ],
            "obligated_amount": 992956603.84,
            "gross_outlay_amount": 1024990574.73
        },
        {
            "name": "International Affairs",
            "children": [
                {
                    "name": "International development and humanitarian assistance",
                    "obligated_amount": 881639233.61,
                    "gross_outlay_amount": 637931989.85
                }
            ],
            "obligated_amount": 881639233.61,
            "gross_outlay_amount": 637931989.85
        },
        {
            "name": "Energy",
            "children": [
                {
                    "name": "Energy supply",
                    "obligated_amount": 822030860.26,
                    "gross_outlay_amount": 501002173.72
                }
            ],
            "obligated_amount": 822030860.26,
            "gross_outlay_amount": 501002173.72
        },
        {
            "name": "General Government",
            "children": [
                {
                    "name": "General purpose fiscal assistance",
                    "obligated_amount": 1578957.79,
                    "gross_outlay_amount": 8585089.62
                }
            ],
            "obligated_amount": 1578957.79,
            "gross_outlay_amount": 8585089.62
        }
    ],
    "messages": [],
    "page_metadata": {
        "page": 1,
        "total": 9,
        "limit": 10,
        "next": null,
        "previous": null,
        "hasNext": false,
        "hasPrevious": false
    }
}