REST API Reference
Programmatic access to federal contract opportunities, award history, vendor profiles, contracting officer patterns, and AI-powered GovCon analysis. Built for government contractors who need real procurement intelligence — not scraped SAM.gov data.
Authentication
All API requests require an API key passed in the X-API-Key request header. Keys are prefixed with bk_live_ for production.
Rate Limits
Rate limits are enforced per API key on a rolling 30-day window. The X-RateLimit-Remaining and X-RateLimit-Reset headers are included on every response.
Exceeding the monthly limit returns 429 Too Many Requests. Each list endpoint defaults to 25 results; increase with the limit param (max 100) to reduce call count for bulk operations.
Error Codes
All errors return a JSON body with an error string and a machine-readable code.
| HTTP Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid X-API-Key. Check that your key is correct and hasn't been revoked. |
| 429 | RATE_LIMIT_EXCEEDED | Monthly request quota exhausted. Upgrade to Platform or wait for reset. |
| 400 | VALIDATION_ERROR | A required parameter is missing or a value is out of the allowed range. |
| 404 | NOT_FOUND | The requested resource does not exist. |
| 500 | SERVER_ERROR | Unexpected server error. These are logged and investigated automatically. |
List Opportunities
Returns a paginated list of federal contract opportunities sourced from SAM.gov. Filter by NAICS, set-aside type, agency, notice type, deadline, and wired probability score. Results are ordered by most recently updated.
| Name | Type | Req | Description |
|---|---|---|---|
| naics | string | opt | 6-digit NAICS code (e.g. 541511) |
| set_aside | string | opt | Set-aside type: 8a, sdvosb, wosb, hubzone |
| agency_id | uuid | opt | Filter by awarding agency UUID |
| notice_type | string | opt | SAM.gov notice type: Solicitation, Sources Sought, Award |
| state | string | opt | 2-letter place of performance state (e.g. VA) |
| response_before | date | opt | ISO 8601 date — only return opps with deadline before this date |
| response_after | date | opt | ISO 8601 date — only return opps with deadline after this date |
| wired_min | float | opt | Minimum wired probability score 0.0–1.0 |
| drift_alert | boolean | opt | Pass true to return only opps with a requirement drift alert |
| limit | integer | opt | Results per page. Default 25, max 100. |
| offset | integer | opt | Pagination offset. Default 0, max 10000. |
Search Opportunities
Keyword search across opportunity titles and descriptions. Automatically uses semantic vector search when available, falling back to keyword matching. Returns the most relevant matches for your query.
| Name | Type | Req | Description |
|---|---|---|---|
| keyword | string | req | Search term — title and description are searched. Max 500 chars. |
| agency | string | opt | Partial agency name (e.g. Department of Veterans) |
| naics | string | opt | 6-digit NAICS code |
| set_aside | string | opt | Set-aside shorthand: 8a, sdvosb, wosb, hubzone |
| limit | integer | opt | Max 50. Default 25. |
| offset | integer | opt | Pagination offset. Default 0. |
Get Opportunity
Returns a single opportunity with full detail — including the linked agency, contracting office, contracting officer, and incumbent vendor profile.
| Name | Type | Req | Description |
|---|---|---|---|
| id | uuid | req | Opportunity UUID from the list or search response |
Related sub-endpoints on an opportunity:
P-Win Score
Returns a probability-of-win (P-Win) score for a specific opportunity, optionally personalized to your vendor's CAGE code. The score accounts for incumbent advantage, set-aside fit, historical win rates, and competition density.
| Name | Type | Req | Description |
|---|---|---|---|
| vendor_cage | string | opt | Your 5-character CAGE code. Omit for a generic competitive P-Win score. |
Semantic Search
Vector-embedding search over opportunity text. Pass a natural-language description of your capabilities or a capability statement excerpt — the API finds opportunities semantically similar to your input, not just keyword matches.
| Name | Type | Req | Description |
|---|---|---|---|
| text | string | req | Natural-language capability description or query. Max 8000 chars. |
| match_threshold | float | opt | Similarity cutoff 0.1–0.95. Default 0.75. Lower = more results. |
| limit | integer | opt | Max results. Default 10, max 50. |
| filters.naics | string | opt | Post-search NAICS filter applied to semantic results |
| filters.set_aside | string | opt | Post-search set-aside filter |
List Awards
Returns contract awards from USASpending data. Filter by vendor, agency, NAICS code, and award type. Useful for incumbent research, competitive analysis, and market sizing.
| Name | Type | Req | Description |
|---|---|---|---|
| vendor_id | uuid | opt | Filter awards by vendor UUID |
| agency_id | uuid | opt | Filter by awarding agency UUID |
| naics | string | opt | 6-digit NAICS code |
| award_type | string | opt | Contract type: A (BPA), B (Purchase Order), D (Delivery Order), IDV_A–IDV_E |
| limit | integer | opt | Default 25, max 100. |
| offset | integer | opt | Pagination offset. Default 0. |
Get Award
Returns a single contract award by PIID (Procurement Instrument Identifier) with full joined data including agency, vendor, contracting office, and contracting officer.
| Name | Type | Req | Description |
|---|---|---|---|
| piid | string | req | Contract PIID (e.g. VA7018D0057) |
List Vendors
Returns vendors ranked by total award value. Useful for building a competitive landscape view of who wins the most in federal contracting.
| Name | Type | Req | Description |
|---|---|---|---|
| limit | integer | opt | Default 25, max 100. |
| offset | integer | opt | Pagination offset. Default 0. |
Search Vendors
Search and filter the vendor database by name, NAICS codes, set-aside certifications, and agency focus. Use this to find teaming partners, competitors, or incumbent research targets.
| Name | Type | Req | Description |
|---|---|---|---|
| name | string | opt | Partial company name search (case-insensitive) |
| naics | string | opt | NAICS code — returns vendors with this code in their portfolio |
| set_aside | string | opt | Business type filter: SDVOSB, 8(a), WOSB, HUBZone |
| limit | integer | opt | Default 25, max 100. |
Get Vendor
Returns a complete vendor profile by CAGE code, including all NAICS codes, certifications, award history totals, and teaming data. Related sub-endpoints provide award history, contract vehicle memberships, and competitor analysis.
| Name | Type | Req | Description |
|---|---|---|---|
| cage | string | req | 5-character CAGE code |
Related sub-endpoints:
Full Contract History
Combined FAR contract history (from USASpending.gov) plus OTA (Other Transaction Authority) awards from DoD public announcements — in a single call. OTAs are outside FAR and invisible in standard USASpending queries.
| Name | Type | Req | Description |
|---|---|---|---|
| company_name | string | opt* | Company legal name. Name variations are searched automatically. |
| uei | string | opt* | SAM.gov UEI. More precise than name-based lookup. |
| fiscal_years | string | opt | Comma-separated fiscal years (e.g. 2024,2025,2026). Default is all three. |
* At least one of company_name or uei is required.
Search Officers
Search contracting officer profiles by name and agency. Returns activity metrics including active action count, average days-to-award, small business award percentage, and wired signal indicators — built by a former CO who knows what signals matter.
| Name | Type | Req | Description |
|---|---|---|---|
| q | string | opt | Partial name search (e.g. Carter) |
| agency | string | opt | Partial agency name filter |
| limit | integer | opt | Default 20, max 100. |
| page | integer | opt | Page number. Default 1. |
Get Officer
Returns a full contracting officer profile by UUID, including all behavioral metrics available. Use this to understand who you're dealing with before submitting a proposal.
| Name | Type | Req | Description |
|---|---|---|---|
| id | uuid | req | Contracting officer UUID from search response |
Sub-endpoints:
Award Patterns
Returns behavioral pattern analysis for a contracting officer — small business bias, sole-source propensity, FY-end surge behavior, protest history, and top vendor relationships. This is the intelligence a former CO knows to look for.
| Name | Type | Req | Description |
|---|---|---|---|
| id | uuid | req | Contracting officer UUID |
Market Share
Returns vendor market share rankings within a NAICS code and/or agency — showing who owns the space. Use this for price-to-win benchmarking and competitive landscape analysis.
| Name | Type | Req | Description |
|---|---|---|---|
| naics | string | opt | 6-digit NAICS code to scope the market |
| agency_id | uuid | opt | Filter to a specific agency |
| fy | integer | opt | Federal fiscal year (e.g. 2025) |
| limit | integer | opt | Top N vendors. Default 10. |
Ask Hamilton
Send a natural-language question to Hamilton — Blackfyre's AI GovCon advisor built by a former Contracting Officer. Hamilton has access to live procurement data and will route your question to the appropriate intelligence service. Ask about opportunities, vendors, regulations, pricing, strategy, or anything else GovCon.
| Name | Type | Req | Description |
|---|---|---|---|
| question | string | req | Your GovCon question. Natural language. |
| context | string | opt | Optional context — e.g. your capability statement, a solicitation excerpt, or your company profile snippet. |
| session_id | string | opt | Pass a consistent session ID to maintain conversation context across multiple turns. |