← DocsPro feature

How to use the ContractRadar API

Call contract search directly from a script or server instead of through the web app. Requires a Pro subscription.

Beta

The response shape may change without notice — there is no versioning promise yet. Tell us what you’re building at hi@contractradar.io; that decides whether this becomes a stable API.

Getting a token

  1. Go to your profile API Access.
  2. Click Generate token.
  3. Copy it — it’s shown once and can’t be retrieved again.

The token reads search as you. Treat it like a password: keep it on a server or in a secrets store, never in a browser or a public repo. If one was ever sent over plain http://, regenerate it.

Making a request

Send the token as a bearer token against GET /api/v1/posts:

curl -H "Authorization: Bearer crk_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  "https://contractradar.io/api/v1/posts?q=electrical+wiring&state=TX&pageSize=10"

Query parameters

All optional.

ParameterTypeNotes
qstringKeyword, matched semantically. Truncated to 200 characters; 400 above 2000.
statestring, repeatableTwo-letter code, e.g. state=TX&state=NM.
pageintegerDefault 1. Clamped to a minimum of 1.
pageSizeintegerDefault 20. Clamped to 1–100.
postTypestringContract or Subcontract.
coverageTypestring, repeatableFederal, State, City, County, or Regional.
sortstringrelevance, posted_desc, posted_asc, deadline_asc, deadline_desc, name_asc, or name_desc. relevance needs q.
postedAfter / postedBefore / deadlineAfter / deadlineBeforedateyyyy-MM-dd, or the literal today. Nothing else.
tagstring, repeatableA Key:Value pair, e.g. tag=Set-Aside:8A. Repeat it to filter on several values.

Only sort and the date parameters reject a bad value with a 400. An unrecognised postType, coverageType, state or tag is silently ignored — the filter just doesn’t apply, so a typo looks like too many results rather than an error.

Response shape

{
  "items": [
    {
      "id": "8f14e45f-ceea-467e-bd3e-8f1f4c0e1234",
      "externalId": "SAM-2026-00123",
      "title": "Electrical wiring upgrade — Building 4",
      "agency": "General Services Administration",
      "placeOfPerformanceState": "TX",
      "postedDate": "2026-09-10T00:00:00Z",
      "responseDeadline": "2026-10-01T00:00:00Z",
      "postType": "Contract",
      "contractSource": "SamGov",
      "contractSourceShortLabel": "Fed",
      "contractSourceFullLabel": "Federal Contract",
      "contractSourceAbbreviation": "FED",
      "contractSourcePortalName": "SAM.gov",
      "description": "Upgrade of electrical distribution systems...",
      "link": "https://sam.gov/opp/abc123/view",
      "linksToListingPageOnly": false,
      "tags": [{ "key": "Set-Aside", "value": "WOSB" }]
    }
  ],
  "totalCount": 42,
  "totalPages": 3,
  "page": 1,
  "pageSize": 20,
  "totalIsCapped": false
}

tags is always an array, never null. postType and contractSource serialize as strings, not integers.

FieldNotes
idThe ContractRadar post ID.
externalIdThe source portal’s own solicitation ID.
titleContract title.
agencyPosting agency, or null.
placeOfPerformanceStateTwo-letter state code, or null.
postedDateISO 8601 UTC.
responseDeadlineISO 8601 UTC, or null when the source gives none.
postTypeContract or Subcontract.
contractSourceThe source pipeline, e.g. SamGov.
contractSourceShortLabel / contractSourceFullLabel / contractSourceAbbreviationDisplay forms of contractSource — short label, longer display label, and a ≤3-char badge code.
contractSourcePortalNameThe portal’s brand name, e.g. SAM.gov.
descriptionFree text, or null.
linkThe original posting, or a portal listing page — see linksToListingPageOnly.
linksToListingPageOnlyTrue when the portal has no per-solicitation deep link, so link points at a search page.
tagsPipeline-specific { key, value } pairs — set-asides, commodity codes, and similar.
totalCountTotal matching results, or the cap when totalIsCapped is true.
totalPagesTotal pages at the requested pageSize.
page / pageSizeThe resolved (clamped) values used for this response.
totalIsCappedTrue when a keyword search hit the candidate cap, so totalCount is that cap.

Errors

StatusMeaning
400A parameter failed validation — a bad date, an unrecognised sort, or q over 2000 characters.
401The token is missing, malformed, or revoked.
429Rate limited. Honour the Retry-After header (seconds).

If your subscription lapses the token keeps working, falling back to the free daily search quota. Generate, regenerate, or revoke it from your profile.

Ready to try it?

Create a free account and start searching government contracts, or jump straight to the app.