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": 159644331944.76,
                    "gross_outlay_amount": 124546409472.52
                },
                {
                    "name": "Housing assistance",
                    "obligated_amount": 35435763719.31,
                    "gross_outlay_amount": 10995970991.55
                },
                {
                    "name": "Federal employee retirement and disability",
                    "obligated_amount": 0.0,
                    "gross_outlay_amount": 2176899.63
                }
            ],
            "obligated_amount": 195080095664.07,
            "gross_outlay_amount": 135544557363.7
        },
        {
            "name": "Community and Regional Development",
            "children": [
                {
                    "name": "Area and regional development",
                    "obligated_amount": 77794951577.46,
                    "gross_outlay_amount": 7199592954.91
                },
                {
                    "name": "Community development",
                    "obligated_amount": 1405944253.4,
                    "gross_outlay_amount": 297385844.2
                },
                {
                    "name": "Disaster relief and insurance",
                    "obligated_amount": 79730508.43,
                    "gross_outlay_amount": 70175724.57
                }
            ],
            "obligated_amount": 79280626339.29,
            "gross_outlay_amount": 7567154523.68
        },
        {
            "name": "Agriculture",
            "children": [
                {
                    "name": "Farm income stabilization",
                    "obligated_amount": 49172930687.16,
                    "gross_outlay_amount": 53050968627.2
                },
                {
                    "name": "Agricultural research and services",
                    "obligated_amount": 15549597596.66,
                    "gross_outlay_amount": 17156821189.24
                }
            ],
            "obligated_amount": 64722528283.82,
            "gross_outlay_amount": 70207789816.44
        },
        {
            "name": "Natural Resources and Environment",
            "children": [
                {
                    "name": "Conservation and land management",
                    "obligated_amount": 14152207924.96,
                    "gross_outlay_amount": 17787782600.34
                },
                {
                    "name": "Water resources",
                    "obligated_amount": 440599390.31,
                    "gross_outlay_amount": 618301731.25
                },
                {
                    "name": "Recreational resources",
                    "obligated_amount": 95440842.73,
                    "gross_outlay_amount": 99404845.69
                },
                {
                    "name": "Other natural resources",
                    "obligated_amount": 5679178.97,
                    "gross_outlay_amount": 2824596.88
                }
            ],
            "obligated_amount": 14693927336.97,
            "gross_outlay_amount": 18508313774.16
        },
        {
            "name": "Commerce and Housing Credit",
            "children": [
                {
                    "name": "Mortgage credit",
                    "obligated_amount": 7182802569.52,
                    "gross_outlay_amount": 4576606344.83
                }
            ],
            "obligated_amount": 7182802569.52,
            "gross_outlay_amount": 4576606344.83
        },
        {
            "name": "Energy",
            "children": [
                {
                    "name": "Energy supply",
                    "obligated_amount": 3268197534.5,
                    "gross_outlay_amount": 2660758552.3
                }
            ],
            "obligated_amount": 3268197534.5,
            "gross_outlay_amount": 2660758552.3
        },
        {
            "name": "Health",
            "children": [
                {
                    "name": "Consumer and occupational health and safety",
                    "obligated_amount": 1907455277.16,
                    "gross_outlay_amount": 1841274377.9
                }
            ],
            "obligated_amount": 1907455277.16,
            "gross_outlay_amount": 1841274377.9
        },
        {
            "name": "International Affairs",
            "children": [
                {
                    "name": "International development and humanitarian assistance",
                    "obligated_amount": 1507421280.0,
                    "gross_outlay_amount": 1658491255.29
                }
            ],
            "obligated_amount": 1507421280.0,
            "gross_outlay_amount": 1658491255.29
        },
        {
            "name": "General Government",
            "children": [
                {
                    "name": "General purpose fiscal assistance",
                    "obligated_amount": 422657530.1,
                    "gross_outlay_amount": 425410246.09
                }
            ],
            "obligated_amount": 422657530.1,
            "gross_outlay_amount": 425410246.09
        }
    ],
    "messages": [],
    "page_metadata": {
        "page": 1,
        "total": 9,
        "limit": 10,
        "next": null,
        "previous": null,
        "hasNext": false,
        "hasPrevious": false
    }
}