Government — entry 090 of 90
USAspending.gov
USAspending.gov's API is the federal government's official system of record for where US taxpayer money goes — contracts, grants, loans, and direct payments broken down by agency, recipient, and location, going back over a decade. It's fully keyless and returns JSON; most endpoints are POST requests carrying a JSON filter body rather than plain query-string GETs. The same API powers the public USAspending.gov search and visualization tools.
USAspending.gov's API is the federal government's official system of record for where US taxpayer money goes — contracts, grants, loans, and direct payments broken down by agency, recipient, and location. Unlike most of this quartet, its core search endpoints are POST requests carrying a JSON filter body rather than query-string GETs, mirroring the same API the public USAspending.gov site itself calls.
GreatAPIs Score
Auth quickstart
- No API key required — the docs state plainly that "endpoints do not currently require any authorization." There's no published rate limit anywhere in the endpoint reference; the only documented HTTP statuses are 200 (success), 400 (malformed request), and 500 (server error).
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Search awards by type and time period
POSThttps://api.usaspending.gov/api/v2/search/spending_by_award/
Content-Type: application/json
{
"filters": {
"award_type_codes": ["A", "B", "C", "D"],
"time_period": [{ "start_date": "2024-01-01", "end_date": "2024-01-31" }]
},
"fields": ["Award ID", "Recipient Name", "Award Amount"],
"page": 1,
"limit": 1,
"sort": "Award Amount",
"order": "desc"
}{
"spending_level": "awards",
"limit": 1,
"results": [
{
"internal_id": 307885715,
"Award ID": "HT940216C0001",
"Recipient Name": "HUMANA GOVERNMENT BUSINESS INC",
"Award Amount": 51269205263.03,
"generated_internal_id": "CONT_AWD_HT940216C0001_9700_-NONE-_-NONE-"
}
],
"page_metadata": { "page": 1, "hasNext": true },
"messages": [
"For searches, time period start and end dates are currently limited to an earliest date of 2007-10-01. For data going back to 2000-10-01, use either the Custom Award Download feature on the website or one of our download or bulk_download API endpoints as listed on https://api.usaspending.gov/docs/endpoints. "
]
}Developer reference
https://api.usaspending.gov/api/v2Gotchas & limits
- `time_period` filters silently cap at 2007-10-01 — a live 2026-07-26 probe against `/search/spending_by_award/` returned this exact `messages` array warning that anything earlier needs the Custom Award Download feature or the `download`/`bulk_download` endpoints instead, not a validation error.
- Most of the useful search surface is POST, not GET — `spending_by_award`, `spending_by_award_count`, and `spending_over_time` all take their filters as a JSON request body (`Content-Type: application/json`), while simpler lookups like `/api/v2/references/agency/{id}/` stay plain GET.
- Fields you didn't ask for still come back: the `results` array always carries `internal_id` and `generated_internal_id` alongside whatever you listed in `fields` (both visible in the response above). They're useful as stable keys for pagination and dedup, but budget for them when sizing responses.
- `page_metadata.hasNext` is the reliable way to detect more pages — confirmed live on 2026-07-26, a request with `limit: 1` returned `hasNext: true`, so it reflects the full result set rather than just the current page size.
- CORS is wide open — `access-control-allow-origin: *`, confirmed live on 2026-07-26 with an explicit `Origin` header on the POST above — so it's safe to call directly from browser JavaScript without a proxy.