Skip to main content
POST
/
api
/
usaspending
/
agencies
/
search
/usaspending/agencies/search
curl --request POST \
  --url https://api.anysite.io/api/usaspending/agencies/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "count": 2,
  "timeout": 300,
  "keyword": "<string>"
}
'
[
  {
    "@type": "@usaspending_toptier_agency",
    "agency_id": 123,
    "toptier_code": "<string>",
    "abbreviation": "<string>",
    "agency_name": "<string>",
    "alias": "<string>",
    "congressional_justification_url": "<string>",
    "active_fy": "<string>",
    "active_fq": "<string>",
    "outlay_amount": 123,
    "obligated_amount": 123,
    "budget_authority_amount": 123,
    "current_total_budget_authority_amount": 123,
    "percentage_of_total_budget_authority": 123
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
count
integer
required

Maximum number of agencies to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
keyword
string | null

Filter agencies by name or abbreviation (case-insensitive)

Response

Successful Response

@type
string
default:@usaspending_toptier_agency
agency_id
integer | null
toptier_code
string | null
abbreviation
string | null
agency_name
string | null
alias
string | null
congressional_justification_url
string | null
active_fy
string | null
active_fq
string | null
outlay_amount
number | null
obligated_amount
number | null
budget_authority_amount
number | null
current_total_budget_authority_amount
number | null
percentage_of_total_budget_authority
number | null