BidHatch API: open federal contracts, pay per call

Search every open U.S. federal contract opportunity in SAM.gov's public Contract Opportunities data (solicitations, quote requests, sources sought, presolicitations, special notices). There are about 9,000+ open at any time, refreshed every morning. You can filter by NAICS, state, set-aside, PSC, agency, keyword and deadline.

It's built for AI agents and scripts. There's no signup and no API key: each call costs $0.02 in USDC on Base, paid with the open x402 standard (HTTP 402).

Endpoints

GET /api/v1/bids: $0.02 / call
Search. Up to 100 records per call, each with title, solicitation #, agency/office, type, posted date, deadline (UTC), NAICS, PSC, set-aside, place of performance, the contracting officer's public contact, a description excerpt (2,000 chars max), the SAM.gov link and BidHatch trade tags.
GET /api/v1/sample: free
3 recent open opportunities in exactly the paid response shape, so you can test parsing first.
GET /api/v1/stats: free
Counts by state, notice type and set-aside, so you can check a query is worth paying for.
GET /api/v1/awards: $0.03 / call
Federal contract award history from USAspending.gov public data (FPDS prime awards, refreshed daily): who won, for how much, when and for which agency. Use it to find incumbents, past prices and competitors before bidding. Coverage: trade-service NAICS codes (trucking 4841xx/4842xx, 488510, courier 4921xx/4922xx, janitorial/landscaping/pest 5617xx, electrical 238210, HVAC/plumbing 238220, 238990, equipment repair 811310), awards with activity since Oct 1, 2024. Filters: naics, psc, state, agency (part of the name), recipient (contractor name or UEI), q (keywords), since/until (award start date), min_amount, limit (1-100), offset, sort (amount|date). With no filters you get the largest covered awards. Each record: award ID, recipient, UEI, amount, outlays, start/end, agency/sub-agency, award type, description, NAICS, PSC, place of performance and a USAspending link, plus count, total and average award amount for your filter.
GET /api/v1/awards-sample: free
3 recent janitorial awards in exactly the paid awards shape.

Machine-readable docs: /openapi.json ยท /.well-known/x402 ยท /llms.txt

Query parameters (all optional)

Payment for /api/v1/awards works exactly the same way, with amount 30000 (0.03 USDC).

Bad parameters get a 400 before any payment is asked for. If our database query fails after you pay, the payment is not settled, so you're not charged.

How payment works

  1. Call GET /api/v1/bids?.... You get 402 Payment Required with an x402 v2 PaymentRequired object, in the PAYMENT-REQUIRED header (base64) and in the JSON body. It asks for scheme exact, network eip155:8453 (Base), asset USDC 0x8335โ€ฆ2913, amount 20000 (0.02 USDC), payTo 0x0a56c3405674A582514989ba0ecBAf9aA1Bc9E35.
  2. Your x402 client signs an EIP-3009 USDC authorization from your wallet and retries with the PAYMENT-SIGNATURE header. The legacy v1 X-PAYMENT header is also accepted.
  3. A public x402 facilitator (PayAI, with xpay as fallback) checks the authorization. We run your query, then the facilitator settles the payment onchain, straight to the payTo address above. You get 200 with the data and a PAYMENT-RESPONSE header holding the transaction hash.

Gas is paid by the facilitator. BidHatch never holds your funds or any keys.

Try it

curl -s https://bidhatch.pages.dev/api/v1/sample
curl -i "https://bidhatch.pages.dev/api/v1/bids?naics=561720&state=TX&setaside=SBA"   # 402 + payment requirements

# TypeScript agent (x402 v2 client libraries)
import { wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
// ...create an x402Client with your own Base signer, then:
const res = await fetchWithPayment("https://bidhatch.pages.dev/api/v1/bids?naics=561720&state=TX");
console.log(await res.json());

Data and limits

The source is SAM.gov's public Contract Opportunities bulk data file (sam.gov/data-services), downloaded once a day. Award notices, justifications and expired notices are removed, and amendments are deduplicated (latest version kept). Descriptions are excerpts, so attachments and full text are on the linked SAM.gov notice, which is always the source of truth. BidHatch is independent and not affiliated with SAM.gov or GSA.

Humans looking for trade bids: see the daily trade listings.