Skip to main content
POST
/
api
/
usaspending
/
agencies
/usaspending/agencies
curl --request POST \
  --url https://api.anysite.io/api/usaspending/agencies \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "toptier_code": "<string>",
  "timeout": 300
}
'
[
  {
    "toptier_code": "<string>",
    "@type": "@usaspending_agency",
    "agency_id": 123,
    "name": "<string>",
    "abbreviation": "<string>",
    "mission": "<string>",
    "website": "<string>",
    "congressional_justification_url": "<string>",
    "icon_filename": "<string>",
    "about_agency_data": "<string>",
    "fiscal_year": 123,
    "subtier_agency_count": 0,
    "def_codes": [],
    "messages": []
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
toptier_code
string
required

Federal agency toptier code (leading zeros are significant)

Minimum string length: 1
Examples:

"012"

"097"

"086"

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500

Response

Successful Response

toptier_code
string
required
@type
string
default:@usaspending_agency
agency_id
integer | null
name
string | null
abbreviation
string | null
mission
string | null
website
string | null
congressional_justification_url
string | null
icon_filename
string | null
about_agency_data
string | null
fiscal_year
integer | null
subtier_agency_count
integer
default:0
def_codes
UsaspendingDefCode · object[]
messages
string[]