Federal Spending API Sneak Peak

Becky Sweger
rebecca.sweger@gsa.gov
@bendystraw

$4,000,000,000,000

Spending Lifecycle as API Endpoints

  • Accounts: Track money related to specific pool of funding allocated by Congress
  • Awards: Grants, contracts, payments to individuals, loans
  • Transactions: Spending-related action against a specific award

Complex Filters

Find awards where the FAIN is NOT NULL where the recipient was located in SD, FL, TX, VA or the awarding agency was the Small Business Administration.

{
    "page": 1,
    "limit": 2,
    "order": ["id"],
    "filters": [
        { 
            "field": "fain",
            "operation": "is_null",
            "value": false
        },
        {
            "combine_method": "OR",
            "filters": [
                {
                    "field": "recipient__location__location_state_code",
                    "operation": "in",
                    "value": ["SD", "FL", "TX", "VA"]
                },
                {
                    "field": "awarding_agency__toptier_agency__name",
                    "operation": "equals",
                    "value": "SMALL BUSINESS ADMINISTRATION"
                }
            ]
        }
        ]
}

In [ ]:

Aggregate Filters

For transactions of type A, B, C, or D, sum transaction obligated amounts by action date year. Order the result by year.

{
    "field": "federal_action_obligation",
    "group": "action_date",
    "date_part": "year",
    "aggregate": "sum",
    "order": ["item"],
    "filters": [
        { 
            "field": "type",
            "operation": "in",
            "value": ["A", "B", "C", "D"]
        }
     ]
}

Help Wanted

Links

Sources

Thank You!

rebecca.sweger@gsa.gov
@bendystraw