# USAspending Federal Spending API: Contracts & Grants (`yourevenings/usaspending-federal-awards`) Actor

Search USAspending federal spending: awarded US contracts, grants, loans and other awards by keyword, recipient, agency, NAICS, PSC, state or date. Organisation recipients only. Official USAspending.gov API, no key.

- **URL**: https://apify.com/yourevenings/usaspending-federal-awards.md
- **Developed by:** [Your Evenings](https://apify.com/yourevenings) (community)
- **Categories:** Lead generation, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 award returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## USAspending Federal Spending API: Contracts & Grants

**USAspending Federal Spending API: Contracts & Grants** returns awarded US federal contracts, grants, loans and other spending from the official USAspending.gov API as clean JSON rows, with **no API key needed**. Search by keyword, recipient name or Unique Entity ID (UEI), awarding agency, NAICS or PSC code, place-of-performance state, date or amount.

Turn on **monitor mode** and schedule the Actor daily to get only awards you haven't seen before, or whose amount or last-modified date has changed.

**Organisation recipients only.** Awards whose recipient is an individual, a sole proprietorship or a redacted personal recipient (for example `INDIVIDUAL RECIPIENT` or `REDACTED DUE TO PII`) are skipped and not charged. The run reports how many were skipped.

> **Not an official USAspending product.** This Actor is independent and is not affiliated with or endorsed by the U.S. Department of the Treasury or the Bureau of the Fiscal Service. It uses the public USAspending.gov API at api.usaspending.gov. The data may be used for commercial or non-commercial purposes, subject to the [Limitation on Permissible Use of Dun & Bradstreet, Inc. Data](https://www.usaspending.gov/db_info). DUNS numbers and street addresses are not returned.

**Who it's for:** Bid and market-research teams at public-sector suppliers, journalists and data teams tracking federal contractors, and compliance teams checking a supplier's award history.

### Why use this USAspending federal spending API?

- **Official public data, no key.** Rows come straight from the USAspending.gov API, which is open to everyone.
- **Organisation recipients only.** Individual, sole-proprietor and redacted personal recipients are left out before you are charged.
- **Filters are applied before you're charged.** You pay only for award rows that are returned. Status rows (no matches, skipped individuals, unknown agency, search limit and so on) are free.
- **Dates roll forward.** `awardedWithinDays` counts back from each run, so a saved, scheduled task always covers the latest days.
- **Polite to the source.** Requests are paced (one at a time, at least half a second apart) and retried after rate-limit or server errors.

### How do I search USAspending federal awards? Quick start

Press **Start** with the prefilled input, or paste this into the **JSON** view of the Input tab. It searches contracts and grants whose latest action date falls in the last 30 days and that mention semiconductor.

```json
{
  "awardTypes": ["contracts", "grants"],
  "keywords": ["semiconductor"],
  "awardedWithinDays": 30,
  "maxResults": 25
}
```

In a local test run on 15 November 2026 it returned 14 awards (12 contracts and 2 grants) in 0.6 seconds. The default date window uses each award's latest transaction date, so a long-running contract can appear even when its original obligation date is earlier. One cooperative agreement whose obligation date also fell in that window, shortened:

```json
{"awardType": "COOPERATIVE AGREEMENT", "awardId": "DEAR0002199", "recipientName": "XSCAPE PHOTONICS INC.", "recipientUei": "CHA2WRBRFDF5", "awardingAgency": "Department of Energy", "amountUsd": 19885227, "currency": "USD", "baseObligationDate": "2026-10-29", "startDate": "2026-10-29", "endDate": "2029-10-28", "assistanceListingNumber": "81.135", "placeOfPerformanceState": "CA", "officialUrl": "https://www.usaspending.gov/award/ASST_NON_DEAR0002199_089"}
```

Recent NASA contracts:

```json
{
  "awardTypes": ["contracts"],
  "awardingAgencies": ["NASA"],
  "awardedWithinDays": 30,
  "maxResults": 25
}
```

In a local test run on 15 November 2026 it resolved `NASA` to the National Aeronautics and Space Administration and returned 25 contracts, including a BPA call to Quintron Systems, LLC (award `80TECH27FA027`, $75,000).

Awards to a known organisation, by Unique Entity ID:

```json
{
  "awardTypes": ["contracts", "grants"],
  "recipientUei": "CHA2WRBRFDF5",
  "awardedWithinDays": 30,
  "maxResults": 25
}
```

### Use cases

- **Supplier award history.** Look up a contractor or grantee by UEI or legal name and export their recent federal awards, amounts and agencies.
- **Market scan by industry.** Follow a NAICS or PSC code, or a keyword such as semiconductor, to see who is winning work and where it is performed.
- **Agency watch.** Restrict the search to an awarding agency (for example NASA or the Department of Energy) and schedule monitor mode so only new or changed awards come back.
- **State snapshot.** Filter by place-of-performance state to see federal spending landing in that state.
- **Awarded work, not open bids.** Use this Actor for money already awarded. Open solicitations and forecasts are a different official source (SAM.gov and Grants.gov).

### Input

| Field | What it does |
| --- | --- |
| `awardTypes` | One or more of `contracts`, `idvs`, `grants`, `loans`, `direct_payments`, `other`. Defaults to contracts and grants. The official API searches one type group at a time; this Actor runs one search per group and merges the results. |
| `keywords` | Words or phrases searched in USAspending award text. |
| `recipientName` | Recipient organisation name. |
| `recipientUei` | 12-character SAM.gov Unique Entity ID. If both a UEI and a name are set, the search uses the UEI and then keeps only awards whose recipient name also matches. |
| `awardingAgencies` | Agency names or abbreviations as they appear on USAspending.gov (`NASA`, `VA`, `Department of Energy`). Unknown names get a free status row. |
| `naicsCodes` | NAICS codes or prefixes, for contracts and IDVs. |
| `pscCodes` | Product or Service codes, for contracts and IDVs. |
| `states` | 2-letter USPS codes for place of performance (`CA`, `TX`). |
| `awardedWithinDays` | Latest action date in the last N days (default 30). Set `0` for no rolling window. Ignored when `awardedSince` is set. |
| `awardedSince` / `awardedUntil` | Inclusive `YYYY-MM-DD` window. The search API covers 1 October 2007 onwards. |
| `dateType` | Which date the window uses: `action_date` (latest transaction, default), `date_signed`, `last_modified_date`, or `new_awards_only`. |
| `minAmountUsd` | Minimum obligated amount, in US dollars. |
| `maxResults` | Stop after this many organisation-recipient awards (default 25; `0` means no row cap). |
| `monitorMode` | Remember what was returned and, on later runs, return only new awards or awards whose last-modified date or amount has changed. |
| `emitBaselineOnFirstRun` | Off: the first monitor run only records what exists (no rows, no charges). |
| `stateStoreName` | Named key-value store for monitor state. Use a different name for each saved search. |

### Output

Each returned row is one award, with:

- Award id and official USAspending URL
- Award category and type (for example Purchase Order or Cooperative Agreement)
- Recipient organisation name and UEI (no DUNS, no street address)
- Awarding and funding agency and sub-agency
- Amount and outlays in USD
- Base obligation date, start and end dates, and last-modified date
- NAICS or assistance listing, when the source publishes one
- Place of performance (city, state, country, not street or ZIP)
- Short description (email addresses and US-format phone numbers are replaced with placeholders)
- Licence and attribution on every row

**Status** rows (`status`, free): `no_matches`, `skipped_individuals`, `unknown_agency`, `scan_limit`, `invalid_input`, `source_error`, `time_limit` or `budget_reached`, each with a plain-English `message`.

The **SUMMARY** record in the default key-value store lists the filters used, how many awards were read and returned, how many individual or redacted recipients were skipped, request counts and the run time. The dataset has views for Overview and Status rows.

### Data source, licence and attribution

| | |
| --- | --- |
| Source | Official USAspending.gov API (`api.usaspending.gov`) only. The website is not scraped. |
| Licence | The Bureau of the Fiscal Service allows the data to be copied, adapted, redistributed and used for commercial or non-commercial purposes, subject to the [Limitation on Permissible Use of Dun & Bradstreet, Inc. Data](https://www.usaspending.gov/db_info). |
| Attribution | Source: USAspending.gov, U.S. Department of the Treasury, Bureau of the Fiscal Service. Not endorsed by the Bureau of the Fiscal Service. Recipient legal names may include D\&B Open Data; DUNS numbers and street addresses are not included. |

### Organisation recipients only

Rows hold organisation award data: legal names, UEIs, agencies, amounts, dates, industry or assistance codes and place of performance. Awards are skipped, never charged, and counted in a free `skipped_individuals` status row when any of these is true:

- The recipient name is one of USAspending's official placeholders for a person or a redacted or aggregated group of people, including `INDIVIDUAL RECIPIENT`, `PRIVATE INDIVIDUAL`, `REDACTED DUE TO PII`, `MULTIPLE RECIPIENTS`, `MULTIPLE FOREIGN RECIPIENTS` and `MISCELLANEOUS FOREIGN AWARDEES`.
- The recipient's business types include `individuals` or `sole_proprietorship`.
- Recipient names shaped like "LAST, FIRST" with no company word (for example Inc or LLC) are skipped as likely individuals.

A company's legal name can still include a person's name, as registered. Officer names, emails and other personal identifiers are not requested or returned. Email addresses and US-format phone numbers found in award text are replaced with placeholders.

### Limits

- No API key. Requests are sent one at a time, at least half a second apart, with retries after HTTP 429 or server errors.
- The search API pages 100 awards at a time and covers 1 October 2007 onwards. For earlier years, use the Custom Award Download on USAspending.gov; this Actor does not use the bulk download API.
- The official API allows only one award-type group in each request. Selecting both contracts and grants runs two searches and merges the results, newest last-modified date first.
- The default date window is the latest transaction (`action_date`), not always the original award date. `baseObligationDate` on a row can be earlier.
- Individual, sole-proprietor and redacted personal recipients are skipped and not charged. The scan limit is off in monitor mode, including silent first monitor runs that only record what exists. On other runs, the Actor stops after reading the result limit plus 1,000 awards in total, and adds a free `scan_limit` row. Narrow the filters to reach more organisation awards.
- DUNS numbers and street addresses are not returned.
- You are charged per award row returned. Status rows and skipped individual recipients are free. Prices are on the Actor's Pricing tab.

### FAQ

#### Do I need a USAspending API key?

No. The official API is public and does not require authorisation. This Actor calls `api.usaspending.gov` only.

#### Does this include open bids or only awarded spending?

Only awarded spending (and other published federal awards) from USAspending.gov. Open solicitations, set-asides and grant forecasts are not in this dataset.

#### Why are some awards missing when I search for grants or direct payments?

If the money went to a person, USAspending often publishes a placeholder name such as `INDIVIDUAL RECIPIENT` or `REDACTED DUE TO PII`. Those rows are skipped and not charged. In a local test run on 15 November 2026, a grants search for the recipient name `INDIVIDUAL RECIPIENT` (1 January to 15 November 2026) read 682 awards, returned none, and reported them all in a free `skipped_individuals` status row.

#### What does "awarded in the last 30 days" actually use?

By default, the window is USAspending's `action_date`: the award's latest transaction. A contract that started years ago can still appear if it had a recent modification. Each row also has `baseObligationDate`, `startDate`, `endDate` and `lastModifiedDate` so you can tell them apart. Set `dateType` to `date_signed` or `new_awards_only` if you only want awards whose base transaction falls in the window.

#### Can I look up a company by DUNS number?

No. This Actor accepts and returns the SAM.gov Unique Entity ID (UEI) only. DUNS numbers are D\&B data and are not included.

#### How does monitor mode work?

The Actor stores the awards it has already returned (by USAspending award key, last-modified date and amount) for 400 days. On later runs it returns only awards it has not seen, or whose last-modified date or amount has changed. Use a different `stateStoreName` for each saved search. Status rows are free; the monitor event is charged only when at least one new or changed award is returned.

#### Is this the official legal record of an award?

No. It is a convenient view of the public USAspending.gov API. For the official award record, use the `officialUrl` on each row.

### Built with

[Apify](https://apify.com) Actor. Source data: [USAspending.gov](https://www.usaspending.gov).

# Changelog

This Actor's version history is a separate document: https://apify.com/yourevenings/usaspending-federal-awards/changelog.md

# Actor input Schema

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

One or more of <code>contracts</code>, <code>idvs</code>, <code>grants</code>, <code>loans</code>, <code>direct_payments</code>, <code>other</code>. Contracts are purchase orders, delivery orders, definitive contracts and BPA calls. IDVs are government-wide and indefinite-delivery vehicles (GWAC, FSS, BPA, BOA, IDC). The official API searches one type group at a time; this Actor runs one search per selected group and merges the results. Defaults to contracts and grants.

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

Words or phrases to search in the award description and other USAspending text fields. Leave empty for all awards that match the other filters.

## `recipientName` (type: `string`):

Search for a recipient organisation by name. Combined with a Unique Entity ID if both are set: the search uses the UEI, then only awards whose recipient name also matches are kept.

## `recipientUei` (type: `string`):

12-character SAM.gov Unique Entity ID of the recipient organisation, for example <code>YNEDGLKHU789</code>. DUNS numbers are not accepted or returned.

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

Awarding agency names or abbreviations as they appear on USAspending.gov, for example <code>NASA</code>, <code>Department of Veterans Affairs</code> or <code>VA</code>. Unknown names get a free status row. Leave empty for all agencies.

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

North American Industry Classification System codes, or prefixes, for contract and IDV awards. For example <code>334</code> (computer and electronic manufacturing) or <code>541512</code>.

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

Product or Service codes for contract and IDV awards, for example <code>6515</code> or <code>D399</code>.

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

2-letter USPS state codes for the place of performance, for example <code>CA</code> or <code>TX</code>. Leave empty for all states and countries.

## `awardedWithinDays` (type: `integer`):

Only awards whose action date (or the date type you choose) falls in the last N days. Set 0 for no rolling window. Ignored when 'Awarded since' is set. The USAspending search API covers 1 October 2007 onwards.

## `awardedSince` (type: `string`):

Optional start date. Overrides 'Awarded within the last N days'. Earliest date the search API accepts is 2007-10-01.

## `awardedUntil` (type: `string`):

Optional end date. Defaults to today when a start date or rolling window is set.

## `dateType` (type: `string`):

Which USAspending date the window applies to. <code>action_date</code> is the latest transaction on the award; <code>date_signed</code> is the base transaction; <code>new_awards_only</code> keeps awards whose base transaction falls in the window.

## `minAmountUsd` (type: `number`):

Only awards whose obligated amount is at least this many US dollars. Leave empty for no minimum.

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

Stop after this many organisation-recipient awards. 0 means no row cap (the run still stops at the time limit or if too many matching rows are individuals). You are charged per award returned, not for skipped individual recipients or status rows.

## `monitorMode` (type: `boolean`):

Remember what was returned and, on later runs, return only awards not returned before, or whose last-modified date or amount has changed. Schedule the Actor (for example daily) to get alerts.

## `emitBaselineOnFirstRun` (type: `boolean`):

Off: the first monitor run only records what exists (no rows, no charges); later runs return new or changed awards.

## `stateStoreName` (type: `string`):

Named key-value store that holds what was already returned. Use a different name for each saved search you monitor.

## Actor input object example

```json
{
  "awardTypes": [
    "contracts",
    "grants"
  ],
  "keywords": [
    "semiconductor"
  ],
  "awardedWithinDays": 30,
  "dateType": "action_date",
  "maxResults": 25,
  "monitorMode": false,
  "emitBaselineOnFirstRun": true,
  "stateStoreName": "usaspending-awards-monitor"
}
```

# Actor output Schema

## `overview` (type: `string`):

Overview view of the dataset.

## `status` (type: `string`):

Status rows (free) view of the dataset.

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

SUMMARY record: filters used, matches, skipped individual recipients, request counts and timings.

# 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 = {
    "awardTypes": [
        "contracts",
        "grants"
    ],
    "keywords": [
        "semiconductor"
    ],
    "awardedWithinDays": 30,
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("yourevenings/usaspending-federal-awards").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 = {
    "awardTypes": [
        "contracts",
        "grants",
    ],
    "keywords": ["semiconductor"],
    "awardedWithinDays": 30,
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("yourevenings/usaspending-federal-awards").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 '{
  "awardTypes": [
    "contracts",
    "grants"
  ],
  "keywords": [
    "semiconductor"
  ],
  "awardedWithinDays": 30,
  "maxResults": 25
}' |
apify call yourevenings/usaspending-federal-awards --silent --output-dataset

```

## MCP server setup

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

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/dgNe1cgAdbvmfj6bk/builds/MvKl8mXvYdMZKai4U/openapi.json
