USAspending API ReferenceIndependent
Try the API

List Agencies

POST/api/v2/bulk_download/list_agencies/

This route returns one of three result set flavors. For "account_agencies" requests it returns a list of all toptier agencies with at least one DABS submission. For "award_agencies" requests it returns a list of all user selectable flagged toptier agencies with at least one subtier agency. For specific agency requests it returns a list of all user selectable flagged subtier agencies.

Request

curl -X POST 'https://api.usaspending.gov/api/v2/bulk_download/list_agencies/' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "award_agencies",
  "agency": 0
}'

Request body

  • typeenum (string)Required
    Allowed values
    • account_agencies
    • award_agencies
  • agencynumber

Try it

Runs against the live API. Responses are real data.

POST/api/v2/bulk_download/list_agencies/

Response · 200

  • agenciesobjectRequired2 fields
    • cfo_agenciesarray of AgencyRequired3 fields
      • toptier_codestringRequired
      • namestringRequired
      • toptier_agency_idnumberRequired
    • other_agenciesarray of AgencyRequired3 fields
      • toptier_codestringRequired
      • namestringRequired
      • toptier_agency_idnumberRequired
  • sub_agenciesarray of SubAgencyRequired1 field
    • subtier_agency_namestringRequired
Example response
{
  "agencies": {
    "cfo_agencies": [
      {
        "toptier_code": "",
        "name": "",
        "toptier_agency_id": 0
      }
    ],
    "other_agencies": [
      {
        "toptier_code": "",
        "name": "",
        "toptier_agency_id": 0
      }
    ]
  },
  "sub_agencies": [
    {
      "subtier_agency_name": ""
    }
  ]
}

Recent changes

Generated from contracts/v2/bulk_download/list_agencies.md in the USAspending API repo.

Loading…