# Federal Recompete Finder — Expiring Contracts by NAICS (`recordfoundry/federal-contract-recompetes`) Actor

Federal contracts ending in the next 3–18 months by NAICS, PSC, state or agency: incumbent, agency, value, option runway, recompete signal with reasons, incumbent profile link. First 25 rows free, then $0.02/contract.

- **URL**: https://apify.com/recordfoundry/federal-contract-recompetes.md
- **Developed by:** [Record Foundry](https://apify.com/recordfoundry) (community)
- **Categories:** Lead generation, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 expiring contracts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Federal Contract Recompete Finder — Expiring Contracts by NAICS

Find U.S. federal contracts whose current period of performance ends in the months ahead. These are the contracts an agency must extend, re-award or let lapse. Filter by NAICS, product/service code (PSC), place of performance and awarding agency. Each row shows the incumbent business, the agency, the obligated and potential value, the option end date, the set-aside and a link to the official USAspending.gov award page. It also gives a **recompete signal** with plain-English reasons (option time left, follow-on under a vehicle, recent changes, DoD reporting delay) and a snapshot of each incumbent.

**The first 25 contracts in every run are free.**

### Who it's for

- **Small government contractors** building a pipeline of work that ends 3–18 months out.
- **BD and capture consultants** producing target lists of expiring work, incumbents and values for clients.
- **Teaming and subcontracting**: see who holds the work in your NAICS today and which vehicle it sits on.

### What you get

- **One row per contract**, earliest end date first, ready to export as CSV, Excel or JSON.
- **A recompete signal on every row** (`recompeteSignal`): one of *May extend via options*, *Follow-on may stay on vehicle*, *Recently modified*, *Likely recompete* or *Option status unknown*, with short reasons (`signalReasons`). Fixed rules on published data, no scores or probabilities (see [Recompete signals](#recompete-signals)).
- **Option runway**: current end date, potential end date if all options are exercised, `optionPeriodRemaining`, and `optionRunwayMonths` (whole months of option time left). Also months and days until the end date, set-aside type, extent competed and solicitation ID.
- **Incumbent and vehicle**: recipient name, UEI, parent company and a link to the incumbent's USAspending.gov recipient profile (`recipientProfileUrl`). For task/delivery orders, the parent IDV (`parentAwardId`), such as a GSA schedule or agency IDIQ.
- **A run summary** (key-value record `OUTPUT`): filters used, completeness, totals by agency, counts by recompete signal, an **incumbent snapshot** (top 25 incumbents with their contracts in the list, obligated and potential totals, earliest end date, top agencies, NAICS codes and profile link), counts by months-until-end, and coverage notes.

### Quick start

The input form is prefilled with an example: IT services (NAICS 541512) performed in Virginia, ending 3–18 months from today.

```json
{
  "naicsCodes": ["541512"],
  "placeOfPerformanceStates": ["VA"],
  "endsAfterMonths": 3,
  "endsBeforeMonths": 18
}
```

More examples:

```json
{ "naicsCodes": ["561720"], "placeOfPerformanceStates": ["TX"] }
```

```json
{ "naicsCodes": ["236220"], "minValue": 1000000, "maxResults": 2000 }
```

```json
{ "awardingAgencies": ["Department of Veterans Affairs"], "pscCodes": ["S2"], "includeIdvOrders": false }
```

### Input

| Field | Default | Meaning |
| --- | --- | --- |
| `naicsCodes` | — | 2, 4 or 6-digit NAICS codes. Shorter codes match every code beginning with them (`"5415"` covers 541511–541519). USAspending rejects 3- and 5-digit codes, so the Actor does too. |
| `pscCodes` | — | 1–4 character PSC codes (`"R425"`, `"DA01"`). Shorter codes match every code beginning with them (`"S2"` covers S201, S205, S208…). |
| `placeOfPerformanceStates` | all | 2-letter codes (`"VA"`, also DC, AS, GU, MP, PR, VI). Several states are combined with OR. Leave empty for all locations, including places of performance outside the U.S. |
| `awardingAgencies` | all | Top-level agency names as USAspending lists them (`"Department of Veterans Affairs"`) or their abbreviations (`"GSA"`), case-insensitive. Unknown names are rejected, with suggestions when a close match exists. |
| `endsAfterMonths` | 3 | The window starts this many months from the run date (UTC). |
| `endsBeforeMonths` | 18 | The window ends just before this many months from the run date. The window can span at most 24 months. |
| `minValue` | 100000 | Minimum **obligated to date** in USD (USAspending "Award Amount"). Use 0 for no minimum. Potential value is reported but not used for this filter. |
| `maxResults` | 200 | 1–2,000. Earliest-ending contracts are returned first. |
| `includeIdvOrders` | true | Include BPA calls and task/delivery orders placed under IDVs (IDIQs, GWACs, schedules, BPAs). Set to false for standalone purchase orders and definitive contracts only. |

Give at least one of `naicsCodes`, `pscCodes` or `awardingAgencies`. Filters combine with AND, and values within one filter combine with OR. Unknown fields and malformed values are rejected with a clear message before any contract data is fetched.

**Why orders are included by default:** in the Virginia IT test run, 176 of 199 expiring contracts (88%) were orders under an IDV. Excluding them would hide most of the market and its incumbents. Every row says whether it is an order (`isIdvOrder`) and names the parent vehicle (`parentAwardId`), so you can filter in your spreadsheet. Follow-on work for an order may be placed under the same vehicle, which can limit who may compete.

### Output

Each dataset row has these fields. Values not published by USAspending are `null`.

| Field | Meaning |
| --- | --- |
| `awardId` | Contract or order number (PIID) |
| `generatedInternalId`, `usaspendingUrl` | USAspending award key and official award page |
| `recipientName`, `recipientUei`, `parentRecipientName` | Incumbent business, its SAM.gov UEI and parent company |
| `awardingAgency`, `awardingSubAgency`, `fundingAgency` | Agencies as published |
| `naicsCode`, `naicsDescription`, `pscCode`, `pscDescription` | Classification codes |
| `description` | Award description (contact details removed, see Privacy) |
| `awardType`, `isIdvOrder`, `parentAwardId` | BPA CALL, PURCHASE ORDER, DELIVERY ORDER or DEFINITIVE CONTRACT; parent vehicle PIID for orders |
| `startDate`, `currentEndDate`, `potentialEndDate` | Period of performance (YYYY-MM-DD) |
| `optionPeriodRemaining` | `true` if the potential end date is after the current end date, so the agency could extend by exercising options |
| `daysUntilEnd`, `monthsUntilEnd` | From the run date to the current end date |
| `totalObligated`, `potentialValue` | Obligated to date, and base plus all options, in USD |
| `setAside`, `extentCompeted`, `solicitationId` | From the award's latest transaction |
| `placeOfPerformanceState`, `placeOfPerformanceCity` | Primary place of performance |
| `lastModifiedDate` | When the award record last changed |
| `detailsRetrieved`, `recipientWithheld` | Data-quality and privacy flags (see below) |
| `sourceRetrievedAt` | When this run collected the data (UTC) |
| `optionRunwayMonths` | Whole calendar months from `currentEndDate` to `potentialEndDate`, rounded down. 0 when they are equal or the potential end date is missing (then `optionPeriodRemaining` is `null`) |
| `recompeteSignal` | Primary recompete signal (see [Recompete signals](#recompete-signals)) |
| `signalReasons` | Short plain-English reasons: every rule that applies, the primary one first |
| `recipientProfileUrl` | The incumbent's USAspending.gov recipient profile page; `null` when the recipient is withheld |

Fields added in version 0.2 (the last four) come after the original fields; no field was renamed or removed.

#### Sample output

Rows from version 0.2 live runs on 2026-09-25 (USAspending data last updated 2026-09-25):

| Ends | Award ID | Incumbent | Agency / sub-agency | Type | Obligated | Potential value | Potential end | Recompete signal | Set-aside | Place |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 2026-12-27 | 75FCMC19F0001 | GENERAL DYNAMICS INFORMATION TECHNOLOGY, INC. | Health and Human Services / Centers for Medicare and Medicaid Services | Delivery order under HHSM500201600012I | $111,465,470.00 | $111,465,470.00 | 2026-12-27 | Follow-on may stay on vehicle | — | FAIRFAX, VA |
| 2026-12-28 | 1333BJ23C00280001 | BLACKWATCH INTERNATIONAL CORPORATION | Commerce / U.S. Patent and Trademark Office | Definitive contract | $50,224,893.60 | $68,661,345.54 | 2028-03-28 | May extend via options (15 months) | NO SET ASIDE USED. | MCLEAN, VA |
| 2026-12-29 | 70RCSJ25FR0000045 | DECISIONPOINT CORPORATION | Homeland Security / Office of Procurement Operations | Delivery order under 47QTCH18D0013 | $4,000,752.94 | $10,481,745.68 | 2028-09-29 | May extend via options (21 months) | — | ARLINGTON, VA |
| 2026-12-31 | 140D0424C0021 | METAPHASE CONSULTING LLC | Interior / Departmental Offices | Definitive contract | $3,485,436.04 | $6,822,874.34 | 2026-12-31 | Recently modified | 8(A) SOLE SOURCE | HERNDON, VA |
| 2026-12-31 | W9115122C0002 | CW RESOURCES, INC. | Defense / Department of the Army | Definitive contract | $15,568,733.99 | $16,066,887.22 | 2026-12-31 | Likely recompete | NO SET ASIDE USED. | FORT CAVAZOS, TX |
| 2027-02-28 | W912BV23P0050 | *withheld (sole proprietor)* | Defense / Department of the Army | Purchase order | $173,285.00 | $216,025.00 | 2028-02-29 | May extend via options (12 months) | SMALL BUSINESS SET ASIDE - TOTAL | POWDERLY, TX |

The Blackwatch, DecisionPoint and Army purchase-order rows have option time left, so the agency could extend them instead of recompeting. The General Dynamics order has no option time left, but a follow-on may be ordered under the same vehicle. The CW Resources contract is a standalone contract with no option time left and no change in the last 90 days, so it is labeled *Likely recompete*; its reasons also note the DoD reporting delay. The Metaphase contract also has no option time left, but its record changed 17 days before the run, so check what changed first.

One complete row as delivered (version 0.2 live run):

```json
{
  "awardId": "140D0424C0021",
  "generatedInternalId": "CONT_AWD_140D0424C0021_1406_-NONE-_-NONE-",
  "recipientName": "METAPHASE CONSULTING LLC",
  "recipientUei": "ZH8ACM4ZWDL7",
  "parentRecipientName": "METAPHASE CONSULTING LLC",
  "awardingAgency": "Department of the Interior",
  "awardingSubAgency": "Departmental Offices",
  "fundingAgency": "Department of Commerce",
  "naicsCode": "541512",
  "naicsDescription": "COMPUTER SYSTEMS DESIGN SERVICES",
  "pscCode": "DA01",
  "pscDescription": "IT AND TELECOM - BUSINESS APPLICATION/APPLICATION DEVELOPMENT SUPPORT SERVICES (LABOR)",
  "description": "WEBSITE SERVICES SUPPORT FOR THE BUREAU OF ECONOMIC ANALYSIS ESTIMATED INFORMATION TECHNOLOGY SYSTEM (BEA-EITS)",
  "awardType": "DEFINITIVE CONTRACT",
  "isIdvOrder": false,
  "parentAwardId": null,
  "startDate": "2024-01-01",
  "currentEndDate": "2026-12-31",
  "potentialEndDate": "2026-12-31",
  "optionPeriodRemaining": false,
  "daysUntilEnd": 97,
  "monthsUntilEnd": 3,
  "totalObligated": 3485436.04,
  "potentialValue": 6822874.34,
  "setAside": "8(A) SOLE SOURCE",
  "extentCompeted": "NOT COMPETED UNDER SAP",
  "solicitationId": "140D0424Q0005",
  "placeOfPerformanceState": "VA",
  "placeOfPerformanceCity": "HERNDON",
  "lastModifiedDate": "2026-09-08",
  "detailsRetrieved": true,
  "recipientWithheld": false,
  "usaspendingUrl": "https://www.usaspending.gov/award/CONT_AWD_140D0424C0021_1406_-NONE-_-NONE-",
  "sourceRetrievedAt": "2026-09-25T19:42:59+00:00",
  "optionRunwayMonths": 0,
  "recompeteSignal": "Recently modified",
  "signalReasons": [
    "Award record modified 2026-09-08 (17 days before this run): recent agency activity, check what changed",
    "No option time left: the potential end date is also 2026-12-31",
    "Standalone contract, not an order under an IDV"
  ],
  "recipientProfileUrl": "https://www.usaspending.gov/recipient/46ab4a7b-cf07-7227-8022-2024d8e16c57-C/latest"
}
```

#### Run summary (`OUTPUT`)

The summary covers exactly the rows delivered. It includes the filters and window used, totals by awarding agency, the top 25 incumbents by obligated value (grouped by UEI), counts by months until end, and counts of orders versus standalone contracts and of rows with option time remaining. It also records USAspending's data-update date and these completeness counts:

- `sourceRecordCount`: search rows read from USAspending.
- `matchedRecordCount`: contracts in the window that were collected.
- `deliveredRecordCount`: rows in your dataset.
- `truncatedAtMaxResults`, `completeThroughEndDate`, `nextUnreturnedEndDate`: whether the result cap cut the list, and up to which end date it is complete.

Added in version 0.2:

- `byRecompeteSignal`: contracts and obligated dollars for each recompete signal, in precedence order (every signal is listed, including zero counts).
- `incumbentSnapshot`: the top 25 business-entity incumbents by obligated value, grouped by UEI. Each entry has `contractCount` (contracts in this list), `totalObligated`, `potentialValue` (total potential), `earliestEndDate`, `topAgencies` (up to 3, by obligated), `naicsCodes`, `signalCounts` and `recipientProfileUrl`. Withheld recipients are never included.
- `counts.optionRunwayCount` (rows with at least one whole month of option time) and `counts.dodAwardCount` (DoD awards, see the reporting delay below).
- `delivery.freeCount` and `delivery.chargedCount`: how many delivered rows were free and how many were charged.

An incumbent snapshot entry from the Virginia IT test run:

```json
{
  "recipientName": "BOOZ ALLEN HAMILTON INC",
  "recipientUei": "JCBMLGPE6Z71",
  "parentRecipientName": "BOOZ ALLEN HAMILTON HOLDING CORPORATION",
  "contractCount": 1,
  "totalObligated": 154938140.8,
  "potentialValue": 419341814.4,
  "earliestEndDate": "2026-12-31",
  "topAgencies": [
    "National Science Foundation"
  ],
  "naicsCodes": [
    "541512"
  ],
  "signalCounts": {
    "May extend via options": 1
  },
  "recipientProfileUrl": "https://www.usaspending.gov/recipient/ffca72e5-fba2-798a-6969-2a6c45e9f985-C/latest"
}
```

### Recompete signals

Every row gets one `recompeteSignal` and a list of `signalReasons`. The signal comes from fixed rules on the published data. It is **not a prediction, probability or score**. Every rule that applies adds a reason, and the first applicable signal in this order becomes `recompeteSignal`:

| Precedence | Signal | Rule | What it means for you |
| --- | --- | --- | --- |
| 1 | **May extend via options** | `optionRunwayMonths` is 1 or more | The agency could extend the incumbent by exercising options instead of recompeting. The reason gives the months and the potential end date. |
| 2 | **Follow-on may stay on vehicle** | Order under an IDV (`isIdvOrder`) | A follow-on may be ordered under the same IDIQ, GWAC or schedule (`parentAwardId`), which limits who can compete. Check whether you hold or can team on that vehicle. |
| 3 | **Recently modified** | `lastModifiedDate` within 90 days of the run date | Recent agency activity: possibly an extension, an option exercise or new funding. Check the award history on USAspending.gov. |
| 4 | **Likely recompete** | Standalone contract, no option runway, no recent change | Nothing in the published data points to another path. Still not guaranteed: agencies may extend, cancel or consolidate. |
| 5 | **Option status unknown** | No potential end date published | Rare; award details were unavailable. |

"Likely recompete" is kept for the clean case on purpose. A standalone contract whose record changed recently is labeled *Recently modified*, and its reasons still say that no option time is left.

Option time of less than one whole month (for example a potential end date 29 days after the current one) counts as no option runway; the reason says "Option time left is under 1 month".

Reasons also flag:

- **Standalone contracts**: "Standalone contract, not an order under an IDV".
- **Department of Defense awards**: "DoD award: USAspending publishes DoD contract data with a 90-day delay, so recent changes may not appear yet". USAspending states that Department of Defense and U.S. Army Corps of Engineers procurement data is published in FPDS on a 90-day delay ([About the Data](https://www.usaspending.gov/data/about-the-data-download.pdf), pages 9 and 12; [Data Sources](https://www.usaspending.gov/data/data-sources-download.pdf), pages 5 and 11). This is a note, never the primary signal.

Example reasons from live rows:

```json
["Order under parent vehicle HHSM500201600012I: a follow-on may be ordered under the same IDIQ, GWAC or schedule, limiting who can compete",
 "No option time left: the potential end date is also 2026-12-27",
 "Award record modified 2026-09-15 (10 days before this run): recent agency activity, check what changed"]
```

### How complete are the results?

- **The whole window is searched.** USAspending's date filters only cover signing, action and modification dates. The Actor instead pages through contracts sorted by current end date, starting at the window start. In a cross-check against an independent search method, both returned the same 773 contracts (NAICS 541512, Virginia, 3–18 months).
- **Partial pages are caught.** In testing, USAspending sometimes returned a page with rows silently missing. The Actor reads every page twice and accepts it only when both reads match. It re-reads when they differ and fails the run rather than return a partial list. Each of three 2,000-row test runs caught and re-read 2 such pages.
- **The result cap is disclosed.** If more contracts match than `maxResults`, you get the earliest-ending ones. The run status and summary give the end date through which the list is complete (for example "complete for end dates through 2027-03-10"). To see later expirations, raise `maxResults` or `endsAfterMonths`.
- **Rows may number slightly fewer than the cap.** Contracts held by government entities are dropped after collection (see Coverage), and the summary counts them.

#### Verified live runs (2026-09-25)

Version 0.2, run through `main.py` with the Apify SDK, local storage and simulated pay-per-event pricing ($0.02 per `expiring-contract`):

| Input | Rows delivered | Free / charged | Recompete signals | Coverage | Runtime |
| --- | --- | --- | --- | --- | --- |
| NAICS 561720, TX, maxResults 60 | 49 | 25 / 24 | 31 options, 7 vehicle, 6 recently modified, 5 likely recompete | Entire window, 2026-12-25 to 2028-03-24 | 21.9 s |
| NAICS 541512, VA, maxResults 60 | 60 | 25 / 35 | 40 options, 18 vehicle, 2 recently modified, 0 likely recompete | Cap reached; complete through 2027-01-17 | 18.9 s |

Version 0.1:

| Input | Rows delivered | Coverage | Runtime |
| --- | --- | --- | --- |
| NAICS 541512, VA (defaults) | 199 | Cap reached; complete through 2027-03-10 | 33.4 s |
| NAICS 561720, TX (defaults) | 49 | Entire window, 2026-12-25 to 2028-03-24 | 11.5 s |
| NAICS 236220, all locations, minValue 1,000,000 | 199 | Cap reached; complete through 2027-01-03 | 67.9 s |
| Veterans Affairs, PSC S2, standalone only, maxResults 100 | 96 | Cap reached; complete through 2027-03-30 | 25.1 s |
| NAICS 236220, all locations, minValue 1,000,000, maxResults 2,000 | 1,989 | Cap reached; complete through 2027-09-16 | 472 s (earlier identical runs: 471 s and 691 s) |

Runtimes depend on how quickly USAspending responds. Repeated test runs of the four smaller inputs took 11–68 seconds, once 122 seconds. Runtime grows with the number of rows, because each contract needs one extra lookup for its potential value, option dates, parent company and set-aside. The full Actor, including the Apify SDK, peaked below 80 MB of memory on the 200-row Virginia input.

### Pricing

**First 25 contracts in every run are free; then $0.02 per contract. No matches, no charge.**

The first 25 rows of every run are delivered without a charge. Each row after that is charged once, as the `expiring-contract` event. A run that finds nothing, or fails, delivers no rows. If your maximum cost per run is reached, delivery stops with the earliest end dates delivered first; the free rows are always delivered. The run status says how many rows you received and how many were free, for example "Found 49 expiring contracts ending 2026-12-25 to 2028-03-24. The first 25 are free; 24 were charged."

### Coverage and limitations

- **What is searched:** prime contract awards in USAspending with award types A (BPA call), B (purchase order), C (delivery/task order) and D (definitive contract). IDV vehicles themselves (IDIQs, GWACs, schedules, BPAs) are not listed; their orders are. Subawards, grants and other assistance are not included.
- **Which end date:** the current period-of-performance end date as USAspending publishes it. Contracts without an end date are not listed.
- **Filters:** NAICS and PSC match the award-level codes USAspending reports. Place of performance is the award's primary place of performance. `minValue` compares obligated dollars, not potential value.
- **Business entities only:** recipients are limited to USAspending's "Business" recipient type. USAspending also tags some cities and counties that way, so recipients it flags as a government entity are dropped. In the Veterans Affairs test run, 4 of 100 were dropped. Recipients it does not flag as government, such as nonprofits, are kept.
- **Not a prediction:** an expiring contract is a likely but not guaranteed recompete. Agencies may extend, exercise options, cancel, or consolidate; verify on SAM.gov. `recompeteSignal` is a rule-based label from published fields, not a forecast. This Actor does not read SAM.gov solicitations or forecasts.
- **Reporting delays:** Department of Defense contract data reaches USAspending with a 90-day delay, so a recent DoD extension or option exercise may not show yet. `lastModifiedDate` records any change to the award record, including funding and administrative changes.
- **Data freshness:** every run reads live data. The summary records USAspending's own "last updated" date, which was the run date in all tests. If USAspending publishes an update mid-run, the run stops and asks you to rerun.
- **Source reliability:** USAspending sometimes stalls or times out. The Actor retries with increasing timeouts. If the source stays unavailable or inconsistent, the run fails with a clear message and delivers nothing.

### Data source and privacy

Sourced exclusively from official U.S. government open data (USAspending.gov). Records describe business entities; contains no personal contact data.

- The Actor returns only the fields listed above. It does not include officer or executive names, point-of-contact fields or recipient addresses, even where USAspending publishes them.
- Award descriptions are published free text, and in testing some named government staff. The Actor removes email addresses and phone numbers together with the clause around them. It also drops text after a point-of-contact label ("COR:", "POC:", "CO -", "Contracting Officer's Representative:" and similar) and a person's name at the very end of a description. Free text could still mention a person in some other form, so treat descriptions as published text.
- Some sole proprietorships are registered under the owner's personal name, as seen in testing. When USAspending classifies a recipient as a sole proprietorship with no separate legal-entity type, or its details could not be checked, the row keeps the contract but sets `recipientName`, `recipientUei`, `parentRecipientName` and `recipientProfileUrl` to null, with `recipientWithheld: true`. Withheld recipients are also left out of `topIncumbents` and `incumbentSnapshot`.
- `recipientProfileUrl` links to the business's public USAspending.gov recipient page, built from the recipient id USAspending publishes with the award. The Actor does not copy anything from that page.

This Actor is not affiliated with USAspending.gov or any U.S. government agency.

### Contact

Questions or requests: <matthew@goodlifegames.io>

Built and maintained with AI agents.

# Actor input Schema

## `naicsCodes` (type: `array`):

2, 4 or 6-digit NAICS codes. Shorter codes match every code that starts with them ("5415" covers 541511-541519). 3- and 5-digit codes are not supported by USAspending.

## `pscCodes` (type: `array`):

1-4 character PSC codes such as "R425" or "DA01". Shorter codes match every code that starts with them ("R4" covers R4xx). If you also give NAICS codes, a contract must match both.

## `placeOfPerformanceStates` (type: `array`):

2-letter codes (e.g. "VA", "TX"; also DC, AS, GU, MP, PR, VI). Leave empty for all locations, including places of performance outside the United States.

## `awardingAgencies` (type: `array`):

Top-level agency names as USAspending lists them (e.g. "Department of Veterans Affairs") or their abbreviations (e.g. "VA", "GSA"). Matched case-insensitively.

## `endsAfterMonths` (type: `integer`):

Start of the expiration window, in months from the run date (UTC).

## `endsBeforeMonths` (type: `integer`):

End of the expiration window (exclusive), in months from the run date. The window may span at most 24 months.

## `minValue` (type: `integer`):

Only contracts with at least this much obligated to date (USAspending "Award Amount"). Potential value is reported but not used for this filter. Use 0 for no minimum.

## `maxResults` (type: `integer`):

Earliest-ending contracts are returned first. If more match, the run says so and reports the end date through which results are complete.

## `includeIdvOrders` (type: `boolean`):

Include BPA calls and delivery/task orders placed under IDIQs, GWACs, schedules and BPAs (flagged isIdvOrder with the parent vehicle ID). Turn off to list only standalone purchase orders and definitive contracts.

## Actor input object example

```json
{
  "naicsCodes": [
    "541512"
  ],
  "placeOfPerformanceStates": [
    "VA"
  ],
  "endsAfterMonths": 3,
  "endsBeforeMonths": 18,
  "minValue": 100000,
  "maxResults": 200,
  "includeIdvOrders": true
}
```

# Actor output Schema

## `contracts` (type: `string`):

One row per contract, earliest current end date first, with a recompete signal and reasons. The first 25 rows of every run are free. Export as CSV, Excel or JSON.

## `summary` (type: `string`):

Filters used, counts, completeness, totals by agency, counts by recompete signal, top incumbents, the incumbent snapshot (top 25) and months-until-end buckets.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "naicsCodes": [
        "541512"
    ],
    "placeOfPerformanceStates": [
        "VA"
    ],
    "endsAfterMonths": 3,
    "endsBeforeMonths": 18
};

// Run the Actor and wait for it to finish
const run = await client.actor("recordfoundry/federal-contract-recompetes").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "naicsCodes": ["541512"],
    "placeOfPerformanceStates": ["VA"],
    "endsAfterMonths": 3,
    "endsBeforeMonths": 18,
}

# Run the Actor and wait for it to finish
run = client.actor("recordfoundry/federal-contract-recompetes").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "naicsCodes": [
    "541512"
  ],
  "placeOfPerformanceStates": [
    "VA"
  ],
  "endsAfterMonths": 3,
  "endsBeforeMonths": 18
}' |
apify call recordfoundry/federal-contract-recompetes --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,recordfoundry/federal-contract-recompetes"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/OBYMOPhlkB40pbDGN/builds/U7ly0UEhBeDxQhdJT/openapi.json
