Blog · 2026-09-30

Government Contract API: Federal Contracts as JSON (2026)

Government Contract API: Federal Contracts as JSON (2026)
Open bids on one side, awarded money on the other. One key reads both.

The US government tells you what it wants to buy and what it already bought. Both are public. Neither is easy to pull as clean JSON.

A government contract api turns federal procurement data into structured JSON: open solicitations you can still bid on, and awards that were already handed out. This guide compares the real options for 2026, edgrapi, GovCon API, the official SAM.gov and USAspending APIs, and paid platforms like HigherGov, so you pick the right one before you write a line of code. It sits inside the wider map of free government data APIs, narrowed to contracts.

Key takeaway: A government contract API returns federal procurement data as JSON: open opportunities from SAM.gov and awarded spending from USAspending. Both are public and free, but they live in two systems with two auth models, and a personal SAM.gov key caps you near 10 requests a day. GovCon API has the broadest contract datasets; Edgrapi's /v1/opportunities and /v1/awards carry bids, awards, and grants plus SEC data on one key.

The data is free. The pain is that it lives in two separate systems with two different auth models, and one of them caps you at ten requests a day.

What is a government contract api?

A government contract api is a service that returns federal procurement data as JSON: contract opportunities open for bid and contract awards already made. It saves you from scraping SAM.gov, parsing FPDS records, or stitching two government systems together by hand. The best ones normalize both sides, open bids and awarded dollars, into flat records you can filter by agency, recipient, NAICS code, or date.

Two federal systems hold the data. SAM.gov lists what the government wants to buy. USAspending.gov reports what it already bought, pulling from the Federal Procurement Data System.

An API sits on top of one or both and hands you rows instead of raw filings. The good ones give you the same shape for a bid and an award, so you write one parser, not two.

The scale is the reason this matters. SAM.gov posts every federal contract opportunity over $25,000, and roughly $700 billion a year in contract spend flows through federal procurement. That is a lot of bids and awards to track by hand.

The reason people pay for an API is not the data itself. It is free. The reason is the plumbing: pagination, retries, two auth schemes, and SAM.gov's request cap that stops a naive script cold.

Is there a free government contract api?

Yes, several. USAspending.gov is completely free and keyless for award data, no login and no rate-limit registration, covering every prime federal contract and grant since fiscal year 2008. SAM.gov offers a free opportunities API too, but a personal key is capped at about 10 requests a day. Third-party APIs like edgrapi and GovCon API add free trials or metered free tiers on top of the same public data.

Here is the honest catch with the free official route.

USAspending is free but lagged. Its data trails SAM.gov by 2 to 4 weeks, and Department of Defense awards carry a reporting delay of around 90 days, per government-data guides like the USAspending guide from GovCon API.

SAM.gov is free but throttled. A personal key allows roughly 10 requests a day, and an entity-registered key gets 1,000, according to SAM.gov's public opportunities API docs. One search plus reading each notice can burn through that in minutes.

So "free" is real. It just comes with a lag on one side and a request wall on the other.

That wall is the single most common reason developers reach for a wrapper. You do not hit 10 requests a day building anything real, you hit it testing. An entity-registered key helps, but registering an entity to raise a dev limit is a heavy lift for a side project.

SAM.gov opportunities versus USAspending awards
SAM.gov holds open opportunities you can bid on; USAspending holds awards already made. Two systems, two moments in a contract.

SAM.gov vs USAspending: which one do you actually need?

Use SAM.gov for open opportunities and USAspending for awarded money. SAM.gov is where the government posts every contract opportunity over $25,000, so it answers "what can I bid on right now." USAspending reports contracts, grants, loans, and direct payments already awarded, so it answers "who won, how much, and from which agency." Chasing new work needs SAM.gov; researching winners and market size needs USAspending.

Think of it as two moments in one contract's life.

SAM.gov is the before. Solicitations, presolicitations, sources-sought notices, and award notices. It needs a free API key.

USAspending is the after. The obligated dollars, the recipient, the agency, the place of performance. It needs no key at all.

The frustrating part is that these two systems do not talk to each other. A solicitation on SAM.gov and the eventual award on USAspending are linked by nothing convenient, which is exactly why wrapper APIs that carry both on one key exist.

There is a third system worth knowing: Grants.gov, for federal grant funding rather than contracts. If your work touches assistance funding and not just procurement, that is a separate feed again, which is why edgrapi carries opportunities, awards, and grants as one trio.

If you only need one side, go straight to the official source. If you need both, or you want them shaped the same way, that is where a single normalized key earns its cost.

Fields returned by the opportunities and awards endpoints
Flat JSON fields, the same shape for a bid and an award.

How do you get federal contract data as JSON?

Call the endpoint with a filter and read the rows. With edgrapi, /v1/opportunities returns SAM.gov solicitations as flat JSON and /v1/awards returns USAspending awards, both on the same key. Each opportunity carries the notice id, title, solicitation number, NAICS code, set-aside, place of performance, and the sam.gov link. Each award carries the recipient, amount, agency, dates, and the usaspending.gov link.

Here is an awards call, filtered to one recipient.

GET https://api.edgrapi.com/v1/awards?category=contracts&recipient=Lockheed
Authorization: Bearer YOUR_KEY

{
  "scope": "federal spending awards (USAspending.gov)",
  "category": "contracts", "count": 20, "has_next": true,
  "awards": [
    {
      "award_id": "...", "recipient": "LOCKHEED MARTIN CORPORATION",
      "amount": 3200000000.0, "awarding_agency": "Department of Defense",
      "award_type": "Definitive Contract",
      "place_of_performance_state": "TX",
      "usaspending_url": "https://www.usaspending.gov/award/..."
    }
  ]
}

The opportunities side works the same way, with date and NAICS filters instead of recipient.

GET https://api.edgrapi.com/v1/opportunities?naics=541511&set_aside=SBA
Authorization: Bearer YOUR_KEY

{
  "scope": "federal contract opportunities (SAM.gov)",
  "count": 20, "total": 82,
  "opportunities": [
    {
      "notice_id": "...", "title": "...",
      "solicitation_number": "...", "posted_date": "2026-09-22",
      "type": "Solicitation", "naics_code": "541511",
      "set_aside": "Total Small Business", "response_deadline": "2026-10-15",
      "place_of_performance": {"state": "VA"},
      "ui_link": "https://sam.gov/opp/..."
    }
  ]
}

A live call to /v1/opportunities in a default 30-day window returned 24,981 open notices. Filtered to software development (NAICS 541511), it returned 82. That filtering is the whole point, since ten thousand notices is noise and eighty-two in your lane is a work queue.

Empty results are free on edgrapi, so probing a narrow filter costs you nothing. That matters when you are testing set-aside and NAICS combinations to find the ones that actually return work.

You can also skip the code. edgrapi runs a Model Context Protocol server, so an AI assistant like Claude can call the awards and opportunities tools directly and pull the data in a chat.

Which government contract api is best for developers?

For raw breadth of contract datasets, GovCon API leads; for open bids plus awarded money plus SEC data on one key, edgrapi fits; for the free authoritative source, go straight to SAM.gov and USAspending. The right pick depends on how much of the procurement surface you need and whether you want federal filings alongside it. Paid platforms like HigherGov add state and local coverage but are priced for teams, not solo builders.

Here is the honest field. Everyone reads the same public federal data, so the columns that matter are coverage, price, and packaging.

ProviderData scopeOpportunities + awards?Free tierBest for
edgrapiOpportunities, awards, grants + SEC filings, one keyYes, plus grantsYes, metered, empty freeBids + awards + SEC on one key, AI agents
GovCon API10 datasets: FPDS, subawards, protests, wage rates, forecastsYes, plus 8 more14-day trial, 50/dayFull federal procurement surface
SAM.gov + USAspendingThe official source of truthYes, but two systemsFree, keyless (USAspending)Zero budget, raw and authoritative
HigherGovFederal + 7,000 state/local/education agenciesYes, plus SLEDLimitedSLED coverage and analytics
Apify scrapersScraped SAM/USAspendingVaries by actorPay per runOne-off pulls, no SLA needed

Here is the short read on each, without the marketing.

None of these is a scam, and none wins every lane. GovCon API is genuinely the broadest contract specialist. Its 10 datasets include bid protests, wage determinations, and procurement forecasts that edgrapi does not carry, at $19 a month for 1,000 requests an hour. If you need the full procurement surface, it is the strongest pick.

HigherGov is the move when you need state, local, and education data, not just federal. It covers 65M+ awards across 7,000+ agencies with API access from around $500 a year, per fed-spend's platform comparison. That is a team tool, not a weekend-project tool.

The raw official APIs are still the honest baseline. SAM.gov and USAspending are free and authoritative, and if you only need one side and can live with two auth models, they are hard to argue against. You just own the plumbing.

Apify actors sit at the other end. They are pay-per-run scrapers of the same SAM and USAspending data, fine for a one-off pull, but there is no support line when a scrape breaks.

edgrapi's lane is narrower and more specific. It carries the gov-funding trio, opportunities plus awards plus grants, on one key, and that same key also pulls SEC filings, 13F holdings, and congressional trades. It is federal-only, and it does not have protests, wage rates, or forecasts. Pick it when you want bids, awards, and SEC data behind a single key, not when you need the widest contract dataset.

What can you build with a government contract api?

The three most common builds are a bid-finder, a competitor-tracker, and a market-sizer. A bid-finder polls /v1/opportunities for your NAICS codes and set-asides and alerts you to new solicitations. A competitor-tracker watches /v1/awards filtered to a rival's name to see what they win. A market-sizer totals awards by agency or NAICS to estimate how big a slice of federal spending a category really is.

The bid-finder is the one most small contractors actually need.

Set your NAICS codes once, filter by set-aside if you qualify as small business or 8(a), and let the feed surface new notices the day they post. That beats logging into SAM.gov and re-running the same search by hand.

Bizdev teams underrate the competitor-tracker. Filter /v1/awards to a rival's recipient name and you see every contract they win, the agency, the dollar amount, and the place of performance. Run it weekly and you have a map of where a competitor is growing before it shows up anywhere else.

The market-sizer is where the awards side shines. One query I ran through the awards endpoint surfaced a single $51 billion Department of Defense contract action to Humana Government Business, which tells you fast how concentrated some agency spend is.

Total a category by NAICS or agency and you get a defensible number for a pitch deck. "The federal market for this is roughly X billion, and these five recipients hold most of it" beats a hand-wave, and it comes straight from obligated-dollar records.

The newest build is an agent. Wire the endpoints to an MCP server and you can ask an assistant "which agencies bought the most cybersecurity last quarter" and get an answer from live federal data, not a guess.

That agent build is why one key across opportunities, awards, and SEC filings is more useful than it sounds. An assistant answering "who won this contract, and are they a public company worth researching" needs both the award and the 10-K, and pulling them through one tool is a lot simpler than wiring up three.

How to choose a government contract API
Match the API to what your project actually needs.

How do you choose a government contract api?

Choose by coverage and budget. If you need the full contract surface, bid protests and wage rates and forecasts, pick GovCon API. If you need state and local data and analytics, pick HigherGov. If you want open bids, awards, grants, and SEC filings on one key, pick edgrapi. If your budget is zero and you can handle two systems and SAM.gov's request cap, go straight to the official APIs.

Run it as a quick decision tree.

- Need the whole federal procurement surface, including protests and forecasts? GovCon API. - Need state, local, and education spending plus analytics? HigherGov or GovSpend. - Want opportunities, awards, grants, and SEC data on one key, or building an AI agent? edgrapi. - Zero budget and fine with two auth models? Raw SAM.gov plus USAspending.

Do not over-buy. Most builders reach for an $8,500-a-year platform when a $19 API or a free official endpoint answers their one question. And do not under-buy either: scraping SAM.gov around a 10-a-day cap to save a few dollars usually costs more in maintenance than a metered key ever would.

And treat every number as government-reported data, not gospel. Amounts are obligations as agencies filed them, delays and restatements happen, and none of this is legal or procurement advice.

Start with the question, not the platform

The best government contract api is the one that answers your one question with the least glue code. Write it down first: find bids, track a competitor, or size a market. Then match it to the table above. If you want open opportunities and awarded spending on a single key, with SEC data alongside, read the edgrapi docs and pull your first federal contract record today.

Frequently asked questions

What is a government contract api?

A government contract api is a service that returns federal procurement data as JSON: open contract opportunities you can bid on and contract awards already made. It normalizes data from SAM.gov and USAspending.gov, so you filter by agency, recipient, NAICS code, or date instead of scraping two separate government systems by hand.

Is there a free government contract api?

Yes. USAspending.gov is free and keyless for award data covering every federal contract since fiscal year 2008. SAM.gov's opportunities API is free but a personal key is capped near 10 requests a day. Third-party options like edgrapi and GovCon API add free trials or metered free tiers over the same public data.

How do I get SAM.gov contract opportunities as JSON?

Call SAM.gov's Contract Opportunities API with a free API key, or use a wrapper. With edgrapi, a GET to /v1/opportunities returns SAM solicitations as flat JSON with notice id, title, solicitation number, NAICS, set-aside, place of performance, and the sam.gov link. Filter by date, NAICS, state, or set-aside. Empty results are free.

What is the difference between SAM.gov and USAspending?

SAM.gov lists open contract opportunities, what the government wants to buy, and needs a free API key. USAspending reports awards already made, what it already bought, and is keyless. SAM.gov is for finding bids; USAspending is for researching winners and market size. USAspending data lags SAM by 2 to 4 weeks.

How much federal contract data can I access through an API?

A lot. SAM.gov posts every opportunity over $25,000, and a single 30-day window can hold tens of thousands of open notices. USAspending covers every prime federal contract, grant, and loan since fiscal year 2008. The limit is not the data, it is the request cap on a personal SAM.gov key, near 10 a day.

Can an AI agent pull government contract data on its own?

Yes. edgrapi and GovCon API both run Model Context Protocol servers, so an assistant like Claude or a Claude Code agent can call opportunities and awards tools directly and fetch federal contract data inside a conversation. You connect it with one config block; discovery is open and tool calls use your API key.

Get a free API key