# Federal Contract Leads (USASpending) (`leadforge-data/federal-contract-leads`) Actor

Newly awarded US federal contracts from the public USASpending.gov API, filterable by NAICS, agency, state, amount and date, with an incremental new-only mode.

- **URL**: https://apify.com/leadforge-data/federal-contract-leads.md
- **Developed by:** [LeadForge Data](https://apify.com/leadforge-data) (community)
- **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

## Federal Contract Leads (USASpending)

Returns recently made U.S. federal contract awards (award ID, recipient name and UEI, amount, agency, NAICS/PSC codes, place-of-performance state, dates and a USASpending.gov link) from the public USASpending.gov API, filtered by NAICS code, awarding agency, state, award date and amount. No API key or login is needed.

### When to use

- You need companies that recently won federal contracts in an industry (NAICS), agency or state — e.g. for subcontracting, supplier or B2B sales prospecting, or spending analysis.
- You want a scheduled feed of newly reported awards (`sinceDate: "auto"`).

### When not to use

- You need **open solicitations / bids** to respond to — this returns awarded contracts only (see SAM.gov for opportunities).
- You need grants, loans or other non-contract assistance.
- You need contact details (email/phone) — USASpending does not publish them.
- You need complete real-time data — awards appear with a reporting lag of days to weeks.
- You need a consumer report or eligibility decision (see FCRA notice below).

### Example input

```json
{ "naicsCodes": ["236220"], "states": ["TX"], "dateFrom": "2026-09-01", "minAmount": 100000, "maxItems": 50 }
```

### Example output (one record per award)

```json
{
  "source": "usaspending",
  "recordType": "award",
  "id": "47PD5226F0535",
  "title": "UNITED STATES SECRET SERVICE (USSS) MCALLEN FIELD OFFICE, LAUREL PARK PLAZA 1100 E. LAUREL AVENUE, MCALLEN, TEXAS 78501",
  "agency": "General Services Administration",
  "subAgency": "Public Buildings Service",
  "recipientName": "PATTON CONTRACTORS INC",
  "recipientUei": "JVC8LSNKKTA3",
  "amount": 330532.44,
  "naicsCode": "236220",
  "naicsDescription": "COMMERCIAL AND INSTITUTIONAL BUILDING CONSTRUCTION",
  "pscCode": "Z2AA",
  "state": "TX",
  "awardDate": "2026-09-28",
  "postedOrStartDate": "2026-10-14",
  "endOrDeadlineDate": "2027-04-07",
  "lastModified": "2026-09-28 15:09:54",
  "awardType": "DELIVERY ORDER",
  "url": "https://www.usaspending.gov/award/CONT_AWD_47PD5226F0535_4740_47PH0825D0009_4740"
}
```

### Input parameters

| Parameter | Type | Default | Allowed values / units | Meaning |
|---|---|---|---|---|
| `naicsCodes` | array of strings | empty = all | 6-digit NAICS codes | Industries to include |
| `agencies` | array of strings | empty = all | Top-tier agency names as spelled on USASpending.gov | Awarding agencies |
| `states` | array of strings | empty = all | 2-letter state codes | Place-of-performance states |
| `dateFrom` | string | 30 days ago | `YYYY-MM-DD` | Start of base obligation date range |
| `dateTo` | string | today | `YYYY-MM-DD` | End of range (inclusive) |
| `sinceDate` | string | none | `YYYY-MM-DD` or `"auto"` | Date overrides `dateFrom`; `"auto"` = incremental mode (below) |
| `minAmount` / `maxAmount` | integer | none | US dollars | Reported total award amount bounds |
| `awardTypes` | array of strings | `["A","B","C","D"]` | `A` BPA call, `B` purchase order, `C` delivery order, `D` definitive contract | Contract award types |
| `maxItems` | integer | `100` | 1–100000 records | Output cap |
| `lookbackDays` | integer | `14` | ≥0 days | Only with `"auto"`: re-check window for late-reported awards |

### Output fields

| Field | Type | Meaning |
|---|---|---|
| `source` / `recordType` | string | `"usaspending"` / `"award"` |
| `id` | string | Award ID (PIID) |
| `title` | string | Award description |
| `agency` / `subAgency` | string | Awarding agency / sub-agency |
| `recipientName` / `recipientUei` | string | Awardee name and Unique Entity ID (may be a sole proprietor) |
| `amount` | number | Reported award amount, USD (not money paid) |
| `naicsCode` / `naicsDescription` / `pscCode` | string | Industry and product/service codes |
| `state` | string | Place-of-performance state |
| `awardDate` | string `YYYY-MM-DD` | Base obligation date (when the award was made) |
| `postedOrStartDate` / `endOrDeadlineDate` | string `YYYY-MM-DD` | Period of performance start / end |
| `lastModified` | string | Last modified timestamp in USASpending |
| `awardType` | string | e.g. `DELIVERY ORDER` |
| `url` | string | USASpending.gov award page |

### Incremental mode (`sinceDate: "auto"`)

Schedule the actor daily or weekly with `sinceDate` set to `auto`. Each run looks back `lookbackDays` before the previous auto run and skips awards already returned by earlier auto runs, so you mostly get only new awards. In this mode awards are processed oldest-first by award date; if `maxItems` is hit the window is not advanced, so the remainder is delivered on the next run. The state is kept in a named key-value store `federal-contract-leads-state` in your own Apify account; delete it to start over. Different filter sets share this state, so use one input per account for incremental runs.

### Limitations — please read

- Data comes from public records exactly as federal agencies report them to USASpending.gov. **We do not guarantee completeness or accuracy.** Some awards are reported late, corrected later, or never appear (e.g. classified or below reporting thresholds).
- **Reporting lag:** awards often appear days to weeks after they were signed (DoD data is published with an additional delay). Recent date ranges will look thinner than they eventually will be.
- Dates filter on the base obligation date, not the period-of-performance start date, so a record's start date can fall outside your range.
- Amounts are reported award amounts, not money actually paid.
- These are awarded contracts, not open solicitations/bids.
- Contact details are not included; USASpending does not publish them.
- If the API errors or its response structure changes, the run fails instead of returning empty results.

### Pricing

Currently free to use (Apify platform usage applies per Apify's terms). Any future pricing change will be announced in advance per Apify Store rules.

### Data source & terms

Source: USAspending.gov public API. USASpending.gov is a U.S. government website; its data is public. This actor is not affiliated with or endorsed by the U.S. government.

### Data & compliance notice

**Data & compliance notice.** All data is compiled from public government records (USAspending.gov) and is provided "as is" without warranty of accuracy or completeness. Some records may identify individual sole proprietors. You are solely responsible for how you use this data, including compliance with CAN-SPAM, the TCPA and the National Do Not Call Registry, state telemarketing laws, and privacy laws such as the CCPA/CPRA. Do not use this data for unsolicited robocalls/texts, harassment, or any purpose prohibited by law or by the source agency. This actor is not affiliated with or endorsed by any government agency.

Not for use as a consumer report or for credit, employment, insurance, or housing eligibility decisions under the FCRA.

# Actor input Schema

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

Array of strings, each a 6-digit NAICS code (e.g. "236220" = commercial building construction, "541512" = computer systems design). Optional. Default: empty = all industries.

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

Array of strings. Awarding agency top-tier names exactly as USASpending.gov spells them, e.g. "Department of Defense", "Department of Veterans Affairs". Optional. Default: empty = all agencies.

## `states` (type: `array`):

Array of strings, 2-letter US state/territory codes for place of performance (e.g. "TX", "VA"). Optional. Default: empty = all states.

## `dateFrom` (type: `string`):

String, date in YYYY-MM-DD format. Start of the range on the award's base obligation date (when the award was originally made). Modifications of older awards are not included. Default: 30 days before today.

## `dateTo` (type: `string`):

String, date in YYYY-MM-DD format. End of the range (inclusive), same base-obligation-date meaning. Default: today.

## `sinceDate` (type: `string`):

String. Optional, no default. Either a date in YYYY-MM-DD format (overrides dateFrom), or the literal value "auto" for scheduled incremental runs: the window starts lookbackDays before the previous auto run and awards already returned by earlier auto runs are skipped. State is kept in the named key-value store 'federal-contract-leads-state' in the caller's account and is shared by all inputs; the first auto run uses the 30-day default window.

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

Integer, US dollars. Optional, no default (no minimum). Returns only awards whose reported total award amount is at least this value.

## `maxAmount` (type: `integer`):

Integer, US dollars. Optional, no default (no maximum). Returns only awards whose reported total award amount is at most this value.

## `awardTypes` (type: `array`):

Array of strings. Allowed values: "A" = BPA call, "B" = purchase order, "C" = delivery order, "D" = definitive contract. Default: \["A", "B", "C", "D"]. Grants, loans and IDV parent vehicles are not returned.

## `maxItems` (type: `integer`):

Integer, number of output records. Range 1 to 100000. Default: 100.

## `lookbackDays` (type: `integer`):

Integer, days. Minimum 0. Default: 14. Used only when sinceDate is "auto": the window re-checks this many days before the previous auto run to catch late-reported awards; already-returned awards are skipped.

## Actor input object example

```json
{
  "naicsCodes": [
    "236220"
  ],
  "awardTypes": [
    "A",
    "B",
    "C",
    "D"
  ],
  "maxItems": 100,
  "lookbackDays": 14
}
```

# Actor output Schema

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

All award records (one item per award).

# 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": [
        "236220"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("leadforge-data/federal-contract-leads").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": ["236220"] }

# Run the Actor and wait for it to finish
run = client.actor("leadforge-data/federal-contract-leads").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": [
    "236220"
  ]
}' |
apify call leadforge-data/federal-contract-leads --silent --output-dataset

```

## MCP server setup

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

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/KfK6ia0UVqYEHeCdt/builds/Mj2nwBUCibcY0PbV5/openapi.json
