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": 259770934487.36,
                    "gross_outlay_amount": 221753730680.75
                },
                {
                    "name": "Housing assistance",
                    "obligated_amount": 37594348781.1,
                    "gross_outlay_amount": 14252288422.25
                },
                {
                    "name": "Federal employee retirement and disability",
                    "obligated_amount": 0.0,
                    "gross_outlay_amount": 3139528.82
                }
            ],
            "obligated_amount": 297365283268.46,
            "gross_outlay_amount": 236009158631.82
        },
        {
            "name": "Agriculture",
            "children": [
                {
                    "name": "Farm income stabilization",
                    "obligated_amount": 53198494244.29,
                    "gross_outlay_amount": 60497370747.99
                },
                {
                    "name": "Agricultural research and services",
                    "obligated_amount": 25690300419.71,
                    "gross_outlay_amount": 21431648411.07
                }
            ],
            "obligated_amount": 78888794664.0,
            "gross_outlay_amount": 81929019159.06
        },
        {
            "name": "Community and Regional Development",
            "children": [
                {
                    "name": "Area and regional development",
                    "obligated_amount": 72330824713.5,
                    "gross_outlay_amount": 10287956943.46
                },
                {
                    "name": "Community development",
                    "obligated_amount": 1480038934.23,
                    "gross_outlay_amount": 490051595.14
                },
                {
                    "name": "Disaster relief and insurance",
                    "obligated_amount": 178166225.54,
                    "gross_outlay_amount": 162870617.23
                }
            ],
            "obligated_amount": 73989029873.27,
            "gross_outlay_amount": 10940879155.83
        },
        {
            "name": "Natural Resources and Environment",
            "children": [
                {
                    "name": "Conservation and land management",
                    "obligated_amount": 22620172071.33,
                    "gross_outlay_amount": 21722040061.51
                },
                {
                    "name": "Water resources",
                    "obligated_amount": 710916059.31,
                    "gross_outlay_amount": 597968022.41
                },
                {
                    "name": "Recreational resources",
                    "obligated_amount": 159586414.37,
                    "gross_outlay_amount": 173221805.08
                },
                {
                    "name": "Other natural resources",
                    "obligated_amount": 6075389.11,
                    "gross_outlay_amount": 1531701.64
                }
            ],
            "obligated_amount": 23496749934.12,
            "gross_outlay_amount": 22494761590.64
        },
        {
            "name": "Energy",
            "children": [
                {
                    "name": "Energy supply",
                    "obligated_amount": 21445950246.06,
                    "gross_outlay_amount": 20904376246.12
                }
            ],
            "obligated_amount": 21445950246.06,
            "gross_outlay_amount": 20904376246.12
        },
        {
            "name": "Commerce and Housing Credit",
            "children": [
                {
                    "name": "Mortgage credit",
                    "obligated_amount": 10626998601.87,
                    "gross_outlay_amount": 7702749302.3
                }
            ],
            "obligated_amount": 10626998601.87,
            "gross_outlay_amount": 7702749302.3
        },
        {
            "name": "International Affairs",
            "children": [
                {
                    "name": "International development and humanitarian assistance",
                    "obligated_amount": 3473319609.69,
                    "gross_outlay_amount": 3893970352.94
                }
            ],
            "obligated_amount": 3473319609.69,
            "gross_outlay_amount": 3893970352.94
        },
        {
            "name": "Health",
            "children": [
                {
                    "name": "Consumer and occupational health and safety",
                    "obligated_amount": 2666587333.94,
                    "gross_outlay_amount": 2625736020.3
                }
            ],
            "obligated_amount": 2666587333.94,
            "gross_outlay_amount": 2625736020.3
        },
        {
            "name": "General Government",
            "children": [
                {
                    "name": "General purpose fiscal assistance",
                    "obligated_amount": 535979139.67,
                    "gross_outlay_amount": 531988772.55
                }
            ],
            "obligated_amount": 535979139.67,
            "gross_outlay_amount": 531988772.55
        }
    ],
    "messages": [],
    "page_metadata": {
        "page": 1,
        "total": 9,
        "limit": 10,
        "next": null,
        "previous": null,
        "hasNext": false,
        "hasPrevious": false
    }
}