# USAspending Expiring Contracts & Recompete Scraper (`code54dev/expiring-federal-contracts`) Actor

Scrape USAspending.gov for federal contracts expiring in the next 3–18 months by NAICS, PSC, agency or keyword. Each contract comes with incumbent, end dates, ceiling, unexercised options, competition details and a recompete signal. Free, official USAspending API, no key.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

**USAspending Expiring Contracts & Recompete Scraper** finds U.S. federal contracts that are about to expire, so you can see a recompete coming months before the RFP is posted. Filter USAspending.gov award data by NAICS, PSC, agency or keyword and an end-date window (for example, 3–18 months out), then export every matching contract with its incumbent, end dates, ceiling, unexercised options and a recompete signal as JSON, CSV or Excel. It is free to use, runs on the official USAspending.gov API, and needs no API key.

### What data does this USAspending scraper extract?

For each expiring federal contract:

- the **incumbent** (name, UEI, parent, small-business flag)
- **current end date** and **potential end date including options**
- obligated amount, **ceiling (base + all options)** and **unexercised option value**
- competition: extent competed, number of offers, set-aside, solicitation procedure
- parent IDV (to spot task orders under a multiple-award vehicle)
- a **recompete signal**: `likely_recompete` (the final period ends in your window) or `option_decision` (an option could extend it)
- a direct USAspending.gov link

Source: official **USAspending.gov** API (FPDS data). No API key, no scraping of logged-in pages.

### Who uses expiring federal contract data?

- Small and mid-size government contractors building a capture pipeline
- BD consultants and proposal shops prospecting for clients
- Teaming and subcontracting scouts looking for incumbents to approach
- AI agents, via Apify MCP (`call-actor`)

### How to find expiring federal contracts

1. Enter one or more NAICS codes, PSC codes, agencies or keywords.
2. Set the end-date window in months (`minMonths` and `maxMonths`) and an optional minimum amount.
3. Run the Actor and download the results, or schedule it monthly to watch your market.

#### Example input

```json
{"naics": ["541810", "541613"], "minMonths": 3, "maxMonths": 18, "minAmount": 250000, "maxResults": 200}
```

#### Example output (one item)

```json
{"awardId":"75F40124F19003","incumbent":"TRUE NORTH COMMUNICATIONS INC","awardingSubAgency":"Food and Drug Administration",
 "naics":"541810","currentEndDate":"2028-01-11","potentialEndDate":"2028-01-11","obligatedAmount":77060488.0,
 "baseAndAllOptionsCeiling":77060488.0,"unexercisedOptionValue":0.0,"extentCompeted":"FULL AND OPEN COMPETITION",
 "parentIdvType":"IDC","recompeteSignal":"likely_recompete","usaspendingUrl":"https://www.usaspending.gov/award/..."}
```

### FAQ

#### Is this recompete finder free?

Yes. The Actor is free; you only use your normal Apify platform credit, and Apify plans include monthly free credit.

#### How do I spot a recompete before the RFP?

Look for contracts marked `likely_recompete`: their final period of performance ends inside your window. Contracts marked `option_decision` are worth watching too, because agencies sometimes recompete instead of exercising an option.

#### Does an end date guarantee a new solicitation?

No. These are FPDS award records. Work can be bridged, extended, moved onto another vehicle, or cancelled. Always check SAM.gov for the actual solicitation.

#### How do I profile the incumbent?

Pass the incumbent's UEI to [Federal Contractor / Incumbent Lookup by UEI](https://apify.com/code54dev/federal-incumbent-lookup).

### Related Code54 Actors

- [USAspending Expiring Contracts & Recompete Scraper](https://apify.com/code54dev/expiring-federal-contracts): federal contracts ending in the next 3–18 months, with incumbent, ceiling, options and a recompete signal.
- [Federal Contractor / Incumbent Lookup by UEI](https://apify.com/code54dev/federal-incumbent-lookup): a 5-year USAspending profile of any contractor by UEI or company name, plus their contracts expiring soon.
- [Grants.gov Scraper: Nonprofit Grant Deadlines](https://apify.com/code54dev/grants-gov-opportunity-feed): open and forecasted federal grants with deadlines, award amounts and eligibility.

***

Free recompete alerts: https://expiringaccounts.com

Need a custom data tool? Code54 builds them: https://code54.dev

*Product of Code54 LLC, 2108 N St, Suite #18005, Sacramento, CA 95816. Data: USAspending.gov / Grants.gov (U.S. government works, public domain). Not affiliated with any U.S. government agency. Questions: support@code54.dev*

# Actor input Schema

## `naics` (type: `array`):

6-digit NAICS codes, e.g. 541810 (advertising). Leave empty to use keywords/PSC only.

## `psc` (type: `array`):

Product/Service Codes, e.g. R426.

## `agencies` (type: `array`):

Exact USAspending top-tier names, e.g. 'Department of Defense'.

## `keywords` (type: `array`):

Free-text keywords matched against award descriptions.

## `minMonths` (type: `integer`):

Ends no sooner than (months).

## `maxMonths` (type: `integer`):

Ends no later than (months).

## `minAmount` (type: `integer`):

Minimum obligated amount (USD).

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

Max results.

## `enrich` (type: `boolean`):

Enrich (options, ceiling, competition, recompete signal).

## Actor input object example

```json
{
  "naics": [
    "541810",
    "541613"
  ],
  "minMonths": 0,
  "maxMonths": 18,
  "minAmount": 100000,
  "maxResults": 100,
  "enrich": true
}
```

# Actor output Schema

## `results` (type: `string`):

All result items (JSON/CSV/Excel via the dataset API).

# 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 = {
    "naics": [
        "541810",
        "541613"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("code54dev/expiring-federal-contracts").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 = { "naics": [
        "541810",
        "541613",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("code54dev/expiring-federal-contracts").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 '{
  "naics": [
    "541810",
    "541613"
  ]
}' |
apify call code54dev/expiring-federal-contracts --silent --output-dataset

```

## MCP server setup

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

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/xQSwQQEEUaMG3HY2j/builds/trrFMbNnHNUJQULaE/openapi.json
