Quickstart
The USAspending API is open. Send a request and you get data back. This page gets you from nothing to a real search in three steps.
Base URL https://api.usaspending.gov. Every endpoint lives under /api/v2/.
No key, no sign-up. JSON in, JSON out. GET for lookups by ID or code, POST for anything that takes a filter object.
1. Make a GET request
Ask for award totals for the Department of the Treasury (agency code 020) in the current fiscal year. This is the call behind the award summary on its agency profile.
curl 'https://api.usaspending.gov/api/v2/agency/020/awards/'You get back one small object. This is the example from the API contract:
{
"toptier_code": "020",
"fiscal_year": 2021,
"latest_action_date": "2021-09-14T00:00:00",
"transaction_count": 2,
"obligations": 90000,
"messages": []
}Live numbers will differ. The data updates daily.
2. Search with a filter object
Search endpoints take a POST body with a filters object. This one finds the five largest Department of Energy contracts in fiscal year 2026, the same way Advanced Search does.
curl -X POST 'https://api.usaspending.gov/api/v2/search/spending_by_award/' \
-H 'Content-Type: application/json' \
-d '{
"filters": {
"award_type_codes": [
"A",
"B",
"C",
"D"
],
"time_period": [
{
"start_date": "2025-10-01",
"end_date": "2026-09-30"
}
],
"agencies": [
{
"type": "awarding",
"tier": "toptier",
"name": "Department of Energy"
}
]
},
"fields": [
"Award ID",
"Recipient Name",
"Award Amount",
"Awarding Agency"
],
"sort": "Award Amount",
"order": "desc",
"limit": 5,
"page": 1
}'The filter object page lists every filter. The Advanced Search guide shows how the site combines this call with counts and charts.
3. Try it here
Change the agency code or fiscal year and send it. Requests go to the live API.
Try it
Runs against the live API. Responses are real data.
/api/v2/agency/020/awards/