Nexus Tools / Data guides

US federal awards as JSON or CSV: the USAspending API, its 10,000-result window, a Python example and a free sample

How to pull federal contract and grant awards from USAspending yourself, which limits and errors to expect (including a type-code change that started this month), and when a normalized feed is worth paying for.

Updated: November 2026. API behaviour below was tested live on 5 November 2026.

The short version

1. The USAspending API

Documentation: api.usaspending.gov/docs/endpoints. The API contracts live in the open-source repository fedspendingtransparency/usaspending-api. The base URL is https://api.usaspending.gov, anonymous, JSON in and out. We found no documented rate limit and no rate-limit headers; calls take 1.5 to 5 seconds, so pace yourself anyway.

Main endpoints we used:

EndpointWhat it does
POST /api/v2/search/spending_by_award/Search awards. Body: filters, fields, sort, order, limit, page.
POST /api/v2/search/spending_by_award_count/Counts per category for the same filters. Cheap, use it to size a query.
GET /api/v2/awards/<generated_internal_id>/One award in full detail (competition, set-aside, parent contract, options value).
GET /api/v2/awards/last_updated/Date of the last data refresh. It returned 11/04/2026 on 5 November.

Limits we hit, with the exact errors

What "date" means: the date_type trap

time_period takes a date_type: action_date (the default: any transaction in the window, so it also returns modifications of awards signed years ago), new_awards_only, date_signed or last_modified_date. If you want "new contracts this week", use new_awards_only, otherwise old contracts keep reappearing every time they are modified.

The Department of Defense lag

DoD contract data is published with a delay of about 90 days, so DoD barely appears in recent windows. Counts of new DoD contract awards from the count endpoint on 5 November 2026:

Window (new awards, DoD)Contracts
16 to 23 July 202677,543
24 to 31 July 20261,084
1 to 8 August 2026103
1 to 8 September 20264
1 to 8 October 20260
29 October to 5 November 20260

For the same last week, all agencies together had 7,569 new contract awards. So a "last 7 days" run is a civilian-agency picture, and anything you compute about total federal obligations is biased unless you account for this. Check the window against awards/last_updated and against DoD separately.

New in October 2026: assistance type codes changed

This one costs you silently. The award-type groups returned by the API now include F001 to F010 codes, and awards made since 1 October 2026 use them. Counting 22 October to 5 November: ["F001","F002"] returned 1,599 grants and ["F003","F004"] 2,946 loans, while the old codes ["02","03","04","05"] and ["07","08"] returned zero. For September 2026 it is the other way round (20,389 grants under the old codes). Contracts and IDVs keep their A to D and IDV_* codes. If your code has the old list hard-coded, include both lists in the same request (they are in the same group, so no 422).

Field shapes

2. DIY: contract awards to CSV in Python

This script counts first, then pages through the newest contract actions of the last week with an obligation of at least 250,000 USD, and writes a CSV. Tested on 5 November 2026: the count said 1,949 contracts, the loop (limited to 3 pages for the demo) wrote 300 rows. It needs pip install requests.

import csv
import time
from datetime import date, timedelta

import requests

BASE = "https://api.usaspending.gov/api/v2"
FIELDS = ["Award ID", "Recipient Name", "Recipient UEI", "Awarding Agency", "Awarding Sub Agency",
          "Description", "Award Amount", "Base Obligation Date", "Last Modified Date",
          "NAICS", "PSC", "generated_internal_id"]          # the sort field must be in this list
FILTERS = {
    "award_type_codes": ["A", "B", "C", "D"],               # ONE group only: contracts (mixing groups = HTTP 422)
    "time_period": [{"start_date": (date.today() - timedelta(days=7)).isoformat(),
                     "end_date": date.today().isoformat(),
                     "date_type": "action_date"}],
    "award_amounts": [{"lower_bound": 250000}],
}


def post(path, body):
    for attempt in range(5):
        r = requests.post(f"{BASE}{path}", json=body, timeout=60)
        if r.status_code in (429, 500, 502, 503, 504):
            time.sleep(2 ** attempt)
            continue
        r.raise_for_status()                                 # 422 = bad limit or mixed award groups
        return r.json()
    raise RuntimeError("USAspending unavailable")


counts = post("/search/spending_by_award_count/", {"filters": FILTERS})["results"]
print("matches per category:", counts)                      # check this BEFORE paging: > 10,000 needs date windows

rows, page = [], 1
while page <= 3:                                             # 3 pages x 100 rows for the demo; hasNext ends at page 100
    data = post("/search/spending_by_award/", {
        "filters": FILTERS, "fields": FIELDS, "sort": "Last Modified Date", "order": "desc",
        "limit": 100, "page": page})                         # limit above 100 = HTTP 422
    rows += data["results"]
    if not data["page_metadata"]["hasNext"]:
        break
    page += 1
    time.sleep(0.5)                                          # be polite; no rate limit is documented

with open("usaspending_awards.csv", "w", newline="", encoding="utf-8") as f:
    w = csv.DictWriter(f, fieldnames=FIELDS, extrasaction="ignore")
    w.writeheader()
    for r in rows:
        r["NAICS"] = (r.get("NAICS") or {}).get("code")      # NAICS and PSC come back as objects
        r["PSC"] = (r.get("PSC") or {}).get("code")
        w.writerow(r)
print(len(rows), "awards")

3. When the Actor saves time

For a one-off export the script above is enough and free. The Apify Actor USAspending Federal Awards (by Nexus Scrapers) wraps the same official API. It pays off when you would otherwise maintain that code:

Pricing is pay per result; the Actor page shows the current price.

Limits: one category per run (the API's rule), no sub-awards, no recipient profiles, no bulk-archive downloads for full-year dumps, and the Department of Defense lag above applies to the Actor too. Foreign places of performance are not filterable. The Actor's assistance categories were updated on 5 November 2026 to send the new F-codes as well as the old ones; contracts and IDVs were never affected.

4. Real sample: 20 normalized records

These 20 records were produced on 5 November 2026 by running the Actor's own code locally on live API responses (no Apify platform involved): 14 contract awards of at least 250,000 USD (at most two per agency, last modified on 2 November 2026) and 6 grants or cooperative agreements from two agencies, last modified on 3 November 2026, all signed between 2022 and 2025 (a modification refreshes the modified date). They are the first matches in that order, not hand-picked for quality. Loans are not included, because recipients of small-business loans are often sole traders named after a person. A scrub pass over every text field found no e-mail address or phone number to remove.

Download: sample.json (full records, UTF-8) and sample.csv (flattened, lists joined with | , opens in Excel). Free to use under the notes in section 5. Note that "Obligated" is money committed so far, not the contract ceiling.

AwardCategory / typeAwarding agencyRecipientDescriptionObligated USDModified
36C25627N0231contracts / Delivery OrderDepartment of Veterans Affa…Alesia Architecture Pc580-26-403 ae replace roads and sidewal…471,0012026-11-02
75R60226F34034contracts / Delivery OrderDepartment of Health and Hu…Looper Consulting LlcOfam78c (forhp) hrsa-26-037-rural commu…365,4172026-11-02
693JF721F000078contracts / Delivery OrderDepartment of TransportationGuidehouse Inc.Temporary full-time contractor support…4,777,5092026-11-02
80AFRC21C0001contracts / Definitive ContractNational Aeronautics and Sp…Asrc Federal System Solutions LlcResearch facilities and engineering sup…65,752,7412026-11-02
80ARC026F7005contracts / Delivery OrderNational Aeronautics and Sp…Inuteq, LlcTechnical services task order under nas…2,839,1962026-11-02
89303925CEM000058contracts / Definitive ContractDepartment of EnergyUnitech Services Group, Inc.The united states department of energy,…7,480,0002026-11-02
47PK1724F0034contracts / Delivery OrderGeneral Services Administra…Legend Construction And Painting…Dcma - 2nd floor tenant improvements2,111,6052026-11-02
89233124CNA000330contracts / Definitive ContractDepartment of EnergyMontech IncEntry control and protective services (…1,816,0512026-11-02
36C26122P0080contracts / Purchase OrderDepartment of Veterans Affa…Crosstown Courier Service IncMedical courier services1,931,6092026-11-02
75F40124F19030contracts / Bpa CallDepartment of Health and Hu…Westat, Inc.Cder-ond-24-c-1627 - pregnancy exposure…477,8372026-11-02
140P2125F0178contracts / Bpa CallDepartment of the InteriorVanasse Hangen Brustlin IncProvide technical, administrative, and…490,6092026-11-02
91990021F0387contracts / Delivery OrderDepartment of EducationWestat, Inc.Department of educations ies requires o…2,999,9052026-11-02
47PM0024C0001contracts / Definitive ContractGeneral Services Administra…Clark Construction Group LlcIra: provide labor, materials, supervis…616,833,3572026-11-02
693KA922F00145contracts / Bpa CallDepartment of TransportationBellamy Management Services LlcEfast pa 22-063-nv administrative suppo…1,936,7202026-11-02
1934942-31-25grants / GrantNational Endowment for the…Coalition For African Americans I…Purpose: to support a master class seri…33,6962026-11-03
1927853-62-24grants / GrantNational Endowment for the…Baltimore Office Of Promotions &…Purpose: to support a grant program for…32,3552026-11-03
1903690-22-C-22grants / Cooperative AgreementNational Endowment for the…Mid-America Arts AlliancePurpose: to support the implementation…1,453,7292026-11-03
AO222501X443G028grants / GrantDepartment of AgricultureUniversity Of Alaska FairbanksHelping tribal communities start new ga…730,5852026-11-03
AP24WSNWRC00C026grants / Cooperative AgreementDepartment of AgricultureUniversity Of GeorgiaThe purpose of this award is to conduct…247,7642026-11-03
AP24PPQFO000C072grants / Cooperative AgreementDepartment of AgricultureDepartment Of Agriculture & Consu…1. award purpose: the primary purpose o…258,6662026-11-03

One contract award record, trimmed to the main fields:

{
  "sourceId": "CONT_AWD_693JF721F000078_6938_47QRAA19D0085_4732",
  "url": "https://www.usaspending.gov/award/CONT_AWD_693JF721F000078_6938_47QRAA19D0085_4732",
  "noticeType": "contract-award",
  "noticeTypeCode": "C",
  "contractNature": "services",
  "title": "TEMPORARY FULL-TIME CONTRACTOR SUPPORT FOR THE MARITIME ADMINISTRATION OFFICE OF BUDGET POSITION TITLE: BUDGET & PROGRAM ANALYST NUMBER OF POSITIONS: THREE (3)…",
  "buyer": {
    "name": "Department of Transportation",
    "country": "US",
    "city": null,
    "nutsCode": null,
    "buyerType": "central-government"
  },
  "publicationDate": "2026-11-02",
  "awardInfo": {
    "winners": [
      {
        "name": "GUIDEHOUSE INC.",
        "country": "US"
      }
    ],
    "awardedValue": {
      "amount": 4777508.57,
      "currency": "USD"
    },
    "awardDate": "2021-09-30"
  },
  "placeOfPerformance": {
    "country": "US",
    "city": "WASHINGTON",
    "nutsCode": null
  },
  "usaAwardId": "693JF721F000078",
  "usaAwardCategory": "contracts",
  "usaAwardType": "DELIVERY ORDER",
  "usaAwardingSubAgency": "Maritime Administration",
  "usaRecipientUei": "N9NJK877QJK9",
  "usaNaics": {
    "code": "541611",
    "description": "ADMINISTRATIVE MANAGEMENT AND GENERAL MANAGEMENT CONSULTING SERVICES"
  },
  "usaPsc": {
    "code": "R408",
    "description": "SUPPORT- PROFESSIONAL: PROGRAM MANAGEMENT/SUPPORT"
  },
  "usaPeriodOfPerformance": {
    "startDate": "2021-09-30",
    "endDate": "2026-11-28",
    "lastDateToOrder": null
  },
  "usaLastModified": "2026-11-02 22:03:29"
}

5. Data licence and terms

USAspending.gov is the official US federal spending website, run under the DATA Act. We found no licence or terms statement on api.usaspending.gov itself, and the site is a JavaScript application, so we could not read its notices in a script. What we could verify: the API's source repository is released under CC0 1.0, and the records are federal spending data published for public reuse. Works created by US federal employees as part of their duties are in the public domain under 17 U.S.C. 105, but data about awards also comes from recipients and agencies' systems; if your use is commercial or you republish at scale, read the About page and the site's data notes, and credit "USAspending.gov" as the source. This is a summary, not legal advice.

Personal data: recipients are mostly organisations, but individuals and sole traders can be recipients (loans, some assistance). The Actor does not copy street addresses or executive officer names and pay; our sample contains organisations only.

Links