DEV Community

Loomwise
Loomwise

Posted on

Who Just Won That Federal Contract? Pull New Government Contract Awards from FPDS in Python (No API Key)

SAM.gov tells you what the government wants to buy. It doesn't tell you who won. Once a contract is signed, the award goes into the Federal Procurement Data System (FPDS), the official record of every federal contract action, run by GSA. FPDS has a public ATOM feed that needs no API key and no login.

For a lot of businesses the award is the better lead:

  • Subcontractors and suppliers. A prime that just won a $1.4M HVAC job at a VA hospital needs electricians, equipment and materials now.
  • Teaming partners. Firms that keep winning in your NAICS code are the ones to team with on the next bid.
  • B2B sales. Staffing, bonding, insurance, payroll and software vendors want companies that just landed new government revenue.
  • Market research. Who wins in your niche, from which agencies, and for how much.

About 2,300 new awards (base awards, not modifications) are signed on a typical weekday.

The query

The FPDS feed takes a Lucene-style query string. These fields do most of the work:

Field Example Meaning
SIGNED_DATE [2026/10/28,2026/11/04] Date range the award was signed
MODIFICATION_NUMBER 0 Only new awards, not modifications
VENDOR_ADDRESS_STATE_CODE TX Winner's state
PRINCIPAL_NAICS_CODE 23* NAICS prefix (wildcards work)
TYPE_OF_SET_ASIDE SDVOSBC Set-aside code
OBLIGATED_AMOUNT [100000,] Dollar range

One gotcha: if you repeat a field (VENDOR_ADDRESS_STATE_CODE:TX VENDOR_ADDRESS_STATE_CODE:OK), the values are ANDed, so you get nothing back. Run one query per value instead.

The feed returns 10 entries per page. Page through it with start=0, 10, 20... until a page comes back empty.

The script

Here are new construction awards (NAICS 23) to Texas companies in the last 7 days:

import requests, xml.etree.ElementTree as ET
from datetime import date, timedelta

NS = {"a": "http://www.w3.org/2005/Atom", "ns1": "https://www.fpds.gov/FPDS"}
end = date.today(); start = end - timedelta(days=7)
q = (f"SIGNED_DATE:[{start:%Y/%m/%d},{end:%Y/%m/%d}] MODIFICATION_NUMBER:0 "
     "VENDOR_ADDRESS_STATE_CODE:TX PRINCIPAL_NAICS_CODE:23*")   # new construction awards to Texas companies

def text(node, path):
    el = node.find(path, NS)
    return el.text.strip() if el is not None and el.text else None

rows, offset = [], 0
while True:
    r = requests.get("https://www.fpds.gov/ezsearch/FEEDS/ATOM",
                     params={"FEEDNAME": "PUBLIC", "q": q, "start": offset}, timeout=60)
    entries = ET.fromstring(r.content).findall("a:entry", NS)
    if not entries:
        break
    for e in entries:
        award = e.find(".//ns1:award", NS)
        if award is None:
            award = e.find(".//ns1:IDV", NS)
        if award is None:
            continue
        rows.append({
            "winner": text(award, ".//ns1:vendorName"),
            "amount": float(text(award, ".//ns1:obligatedAmount") or 0),
            "signed": (text(award, ".//ns1:signedDate") or "")[:10],
            "agency": (award.find(".//ns1:contractingOfficeAgencyID", NS).get("name") or "").title(),
            "naics": text(award, ".//ns1:principalNAICSCode"),
            "city": text(award, ".//ns1:vendorLocation/ns1:city"),
            "what": text(award, ".//ns1:descriptionOfContractRequirement"),
        })
    offset += 10

print(len(rows), "new construction awards to Texas companies in the last 7 days")
for x in sorted(rows, key=lambda x: -x["amount"])[:10]:
    print(f'{x["amount"]:>12,.0f}  {x["signed"]}  {x["winner"]} ({x["city"]})  {x["agency"]}  NAICS {x["naics"]}')
Enter fullscreen mode Exit fullscreen mode

Output on Nov 4, 2026:

10 new construction awards to Texas companies in the last 7 days
   3,295,000  2026-11-03  GENTRY CONTROLS & CONSULTING LLC (LAGO VISTA)  Usda, Departmental Administration  NAICS 238210
   1,418,449  2026-10-30  DBC-MCA JV, LLC (SAN ANTONIO)  Veterans Affairs, Department Of  NAICS 238220
     416,784  2026-10-28  OMEGA BELT BUILT JOINT VENTURE, LLC (SAN ANTONIO)  Smithsonian Institution  NAICS 236220
     110,150  2026-11-01  HEALING HANDS HEALING HEARTS L.L.C. (AUSTIN)  Veterans Affairs, Department Of  NAICS 238990
      69,324  2026-10-28  PATTON CONTRACTORS INC (FORT WORTH)  Public Buildings Service  NAICS 236220
      60,498  2026-11-02  VALCORP ENTERPRISES LLC (HALTOM CITY)  Veterans Affairs, Department Of  NAICS 238220
       6,750  2026-10-30  SUPERIOR ELEVATOR SERVICES, L.L.C. (PLANO)  Federal Prison System / Bureau Of Prisons  NAICS 236220
       ...
Enter fullscreen mode Exit fullscreen mode

Some awards show $0 obligated. These are usually IDIQ or schedule contracts, where the money is obligated later through task orders. Filter on amount > 0 if you only want funded work.

Things to watch

  • Sole proprietors. Some awards go to individuals, such as a self-employed contractor or a researcher. If you're building a B2B list, drop records whose vendor name looks like a person's name and has no LLC/Inc/Corp-style marker.
  • Contracting officer emails. The raw XML includes the names and emails of the government staff who entered the record. You don't need them for a lead list, so leave them out.
  • Reporting lag. Agencies have a few days to report, and DoD awards are published with a 90-day delay. Run with a rolling 7-day window and dedupe on the award ID.
  • Feed changes. GSA has announced that it is moving FPDS reporting into SAM.gov. If the ATOM feed goes away, USAspending.gov's spending_by_award API (also keyless) carries the same awards, just more slowly.

The no-code version

If you don't want to maintain the parser, paging, name filtering and fallback yourself, I packaged all of it as an Apify Actor: Federal Contract Awards. Each award comes back as one flat record with the winner, UEI, CAGE code, amount, agency, contracting office, NAICS/PSC with descriptions, set-aside, competition type, the winner's business address and phone, small-business/veteran/women-owned/8(a)/HUBZone flags, and a USAspending link. Filter by state, NAICS, set-aside, agency, keyword and amount, then export to CSV or Excel or schedule it daily. It costs $0.90 per 1,000 awards, and Apify's free plan covers about 5,500 a month.

It pairs with the SAM.gov opportunities scraper: opportunities show what's open, and awards show who won it.

A free sample CSV is at loomwise.app/data/government-contract-awards.

Top comments (0)