USAspending API ReferenceIndependent
Try the API

Count of Agencies Receiving Disaster/Emergency Funding

POST/api/v2/disaster/agency/count/

This endpoint provides the count of Agencies which received disaster/emergency funding per the requested filters.

This endpoint returns a count of Agencies

Request

curl -X POST 'https://api.usaspending.gov/api/v2/disaster/agency/count/' \
  -H 'Content-Type: application/json' \
  -d '{
  "filter": {
    "def_codes": [
      "L",
      "M",
      "N"
    ]
  }
}'

Request body

  • filterobject · FilterRequired2 fields
    • def_codesarray of DEFCRequired

      List of Disaster Emergency Fund (DEF) Codes (DEFC) defined by legislation at the time of writing. When filtering on award_type_codes this will filter on File D records that have at least one File C with the provided DEFC and belong to CARES Act DEFC. A list of current DEFC can be found here.

    • award_type_codesarray of AwardTypeCodes

      If this parameter provided, count will be calculated form the distinct set of toptier agencies, whose subtier agencies funded awards linked to FinancialAccountsByAwards records (which are derived from DABS File C) related to the provided DEF codes.

      If this parameter is not provided count will be calculated from the distinct set of toptier agencies "owning" appropriations accounts used in funding this disaster (from FinancialAccountsByProgramActivityObjectClass records, which are derived from DABS File B).

      Allowed values
      • 02
      • 03
      • 04
      • 05
      • 06
      • 07
      • 08
      • 09
      • 10
      • 11
      • A
      • B
      • C
      • D
      • IDV_A
      • IDV_B_A
      • IDV_B_B
      • IDV_B_C
      • IDV_B
      • IDV_C
      • IDV_D
      • IDV_E
      • F001
      • F002
      • F003
      • F004
      • F005
      • F006
      • F007
      • F008
      • F009
      • F010

Try it

Runs against the live API. Responses are real data.

POST/api/v2/disaster/agency/count/

Response · 200

  • countnumberRequired
Example response
{
  "count": 5
}

Recent changes

Generated from contracts/v2/disaster/agency/count.md in the USAspending API repo.

Loading…