# USAspending Federal Awards Scraper – Contracts & Grants (`devteamdrew/usaspending-awards`) Actor

Export US federal contract, IDV, grant, loan and direct payment awards from USAspending.gov: recipient, UEI, amount, outlays, awarding agency, NAICS, PSC, assistance listing, dates and place of performance. Filter by keyword, agency, recipient, state, NAICS, amount and date. Official API, no key.

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

## Pricing

Pay per event

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 Awards Scraper – Contracts & Grants

Export US federal contract, IDV, grant, loan and direct payment awards from USAspending.gov: recipient, UEI, amount, outlays, awarding agency, NAICS, PSC, assistance listing, dates and place of performance. Filter by keyword, agency, recipient, state, NAICS, amount and date. Official API, no key.

**USAspending Awards Scraper** by Moxie: fast, reliable and polite, built on official/public data sources.

### What can it do?

- Competitor and teaming research: who wins which federal contracts, with UEI and amounts
- Sales prospecting: recently awarded primes to pitch subcontracting or services to
- Market sizing by NAICS, PSC, agency and state
- Grant research: who receives which assistance listings
- Pair with SAM.gov opportunities: see who won similar past work before you bid

### Data source

The official USAspending.gov API (`api.usaspending.gov`, `spending_by_award` search) run by the US Treasury's Bureau of the Fiscal Service. US government open data, no login, no key.

### Features

- **Pay only for results** (pay-per-event pricing, no monthly rental)
- **Incremental mode**: scheduled runs return only items you haven't received before
- **LLM-ready output**: optional compact Markdown per item for RAG / AI agents
- **Polite rate limiting** with automatic retries and backoff
- Clean, flat JSON you can export as CSV, Excel, JSON or via API

### Input example

```json
{
  "awardCategories": [
    "contracts"
  ],
  "naicsCodes": [
    "5415"
  ],
  "dateType": "date_signed",
  "lastDays": 14,
  "minAmount": 100000,
  "maxItems": 20
}
```

### Output example

```json
{
  "id": "CONT_AWD_70SBUR27F00000004_7003_70SBUR23A00000003_7003",
  "awardId": "70SBUR27F00000004",
  "url": "https://www.usaspending.gov/award/CONT_AWD_70SBUR27F00000004_7003_70SBUR23A00000003_7003",
  "category": "contracts",
  "awardType": "BPA CALL",
  "recipientName": "GOVPLACE, LLC",
  "recipientUei": "JMVMGGNJGA29",
  "recipientAddress": "7315 WISCONSIN AVE STE 400E, BETHESDA, MD, 20814",
  "recipientLocation": {
    "city": "BETHESDA",
    "state": "MD",
    "zip": "20814",
    "country": "USA"
  },
  "amount": 24500000,
  "totalOutlays": null,
  "loanSubsidyCost": null,
  "description": "THIS REQUIREMENT PROVIDES COMMERCIAL CLOUD HOSTING SERVICES FOR USCIS MISSION-CRITICAL SYSTEMS, FOR INFRASTRUCTURE AS A SERVICE (IAAS), PLATFORM AS A SERVICE (PAAS) AND SOFTWARE AS A SERVICE (SAAS). POP 11/1/2026-05/31/2027.",
  "signedDate": "2026-10-29",
  "startDate": "2026-11-01",
  "endDate": "2027-05-31",
  "lastModified": "2026-10-29 15:18:03",
  "awardingAgency": "Department of Homeland Security",
  "awardingSubAgency": "U.S. Citizenship and Immigration Services",
  "fundingAgency": "Department of Homeland Security",
  "naicsCode": "541519",
  "naicsDescription": "OTHER COMPUTER RELATED SERVICES",
  "pscCode": "DA01",
  "pscDescription": "IT AND TELECOM - BUSINESS APPLICATION/APPLICATION DEVELOPMENT SUPPORT SERVICES (LABOR)",
  "assistanceListings": [],
  "placeOfPerformance": {
    "city": "BETHESDA",
    "state": "MD",
    "zip": "20814",
    "country": "USA"
  }
}
```

### Pricing

| Event | Free plan | Bronze | Silver | Gold |
|---|---|---|---|---|
| Federal award (`result`) | $0.002 | $0.0018 | $0.0016 | $0.0014 |
| Actor start | $0.003 per run | $0.003 | $0.003 | $0.003 |

Paid Apify plans get automatic discounts (Bronze -10%, Silver -20%, Gold -30%) on results.

**Example:** 1,000 results ≈ $2.00 + $0.003 start fee. Apify platform usage is included in the price.

Benchmark: parseforge (39 users), ryanclinton (16 users) and copious_atoll (13 users) offer USAspending actors (Apify Store, 6 Nov 2026).

### Use via API or MCP

```bash
curl -X POST "https://api.apify.com/v2/acts/devteamdrew~usaspending-awards/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' -d '{"awardCategories": ["contracts"], "naicsCodes": ["5415"], "dateType": "date_signed", "lastDays": 14, "minAmount": 100000, "maxItems": 20}'
```

AI agents (Claude, Cursor, etc.) can call this actor through the Apify MCP server: add `https://mcp.apify.com/?actors=devteamdrew/usaspending-awards` as an MCP server.

### FAQ

**Do I need an API key?**\
No. USAspending.gov is a free, keyless US government API.

**Why are grants older than contracts?**\
Agencies report assistance awards to USAspending in batches, typically a few weeks behind; contracts flow from FPDS within days. Use a longer window (e.g. 90 days) for grants.

**What amount is returned?**\
`amount` is the award's total obligated amount (loan face value for loans); `totalOutlays` is money actually paid out, where reported.

**How do I get only new awards?**\
Set the date filter to `date_signed` and sort by `newest`, or use incremental mode on a schedule.

**Can I schedule it?**\
Yes. Use Apify Schedules together with incremental mode to receive only new items.

**Something broke?**\
Open an issue on the actor's Issues tab; we monitor nightly and usually fix within 24 hours.

### Ready-made examples

Open one of these pre-filled tasks and click Try for free:

- [Track new federal IT contract awards](https://apify.com/devteamdrew/usaspending-awards/examples/new-federal-it-contract-awards)
- [See the largest US federal contracts this month](https://apify.com/devteamdrew/usaspending-awards/examples/largest-federal-contracts-last-30-days)

### Related actors

- [Bluesky Scraper – Posts, Profiles & Search](https://apify.com/devteamdrew/bluesky-scraper)
- [UK Companies House Scraper – Companies & Directors](https://apify.com/devteamdrew/companies-house-scraper)
- [UK Planning Applications Scraper – 400+ Councils & Postcodes](https://apify.com/devteamdrew/uk-planning-applications)
- [Hacker News Scraper – Stories, Comments & Jobs](https://apify.com/devteamdrew/hacker-news-scraper)
- [npm Package Scraper – Downloads & Dependencies](https://apify.com/devteamdrew/npm-package-scraper)
- [GitHub Trending Scraper – Repos, Stars & Developers](https://apify.com/devteamdrew/github-trending-scraper)
- [Mastodon Scraper – Fediverse Hashtags, Accounts & Trends](https://apify.com/devteamdrew/mastodon-scraper)
- [Lemmy Scraper – Posts, Comments & Communities (Fediverse)](https://apify.com/devteamdrew/lemmy-scraper)
- [SEC EDGAR Scraper – 10-K, 8-K & Form D Funding Filings](https://apify.com/devteamdrew/sec-edgar-scraper)
- [arXiv Scraper – Paper Search, Abstracts & Authors](https://apify.com/devteamdrew/arxiv-scraper)
- [UK Government Tenders Scraper – Contracts Finder, Find a Tender](https://apify.com/devteamdrew/uk-public-tenders)
- [UK CQC Care Homes & Providers Scraper – Ratings & Care Leads](https://apify.com/devteamdrew/uk-cqc-care-providers)
- [SAM.gov Scraper – Federal Contract Opportunities, No API Key](https://apify.com/devteamdrew/sam-gov-opportunities)
- [UK Operator Licence Scraper – HGV & Bus Operators (DVSA VOL)](https://apify.com/devteamdrew/uk-operator-licences)
- [EU Tenders Scraper – TED Public Procurement Notices](https://apify.com/devteamdrew/eu-ted-tenders)

### Legal and GDPR

This actor only collects publicly available data from official or open APIs and respects their rate limits and terms of use.

***

See real sample rows, FAQs and ready-made feeds at [rowsift.co.uk](https://rowsift.co.uk/usaspending-awards/?utm_source=apify\&utm_medium=readme\&utm_campaign=usaspending-awards\&utm_content=footer). Free walkthrough of the official API (no Apify account needed): [USAspending Awards Scraper API guide](https://rowsift.co.uk/guides/usaspending-api/?utm_source=apify\&utm_medium=readme\&utm_campaign=usaspending-awards\&utm_content=guide).

# Actor input Schema

## `awardCategories` (type: `array`):

Contracts (definitive contracts, purchase and delivery orders), IDVs (GWACs, IDIQs, BPAs), grants, direct payments, loans, other assistance.

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

Full-text keywords searched by USAspending across award descriptions, recipients and codes, e.g. `cybersecurity`, `broadband`.

## `recipients` (type: `array`):

Recipient name or UEI contains, e.g. `Lockheed`, `N3PBJAVNKF61`.

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

Top-tier agency names or abbreviations, e.g. `Department of Defense`, `DOD`, `NASA`, `HHS`, `Veterans Affairs`.

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

Contracts/IDVs only: NAICS codes or prefixes, e.g. `541512`, `5415`, `23`.

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

Contracts/IDVs only: Product Service Codes, e.g. `D399`, `R425`.

## `assistanceListings` (type: `array`):

Grants/assistance only: assistance listing numbers, e.g. `93.243`, `10.557`.

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

Two-letter US state codes, e.g. `TX`, `VA`.

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

0 = no minimum.

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

0 = no maximum.

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

`action_date` = any transaction in the window (USAspending default); `date_signed` = award first signed in the window (new awards); `last_modified_date` = updated in the window; `new_awards_only` = awards whose base transaction is in the window.

## `lastDays` (type: `integer`):

Window size in days (ignored when dates are set). Note grants are reported to USAspending with a lag of several weeks.

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

YYYY-MM-DD (optional, earliest 2007-10-01).

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

YYYY-MM-DD (optional).

## `sortBy` (type: `string`):

`amount` = largest awards first; `newest` = most recently signed first.

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

Maximum number of results to return (and pay for) per run.

## `incremental` (type: `boolean`):

Remember items delivered in previous runs with the same input and skip them. Great for scheduled monitoring runs: you only pay for new results.

## `outputFormat` (type: `string`):

`json` = structured fields; `llm` = id, url and a compact Markdown block ready for LLMs/RAG; `both` = structured fields plus Markdown.

## `requestDelayMs` (type: `integer`):

Polite rate limit between API requests. Retries with backoff on 429/5xx are automatic.

## Actor input object example

```json
{
  "awardCategories": [
    "contracts"
  ],
  "keywords": [],
  "recipients": [],
  "agencies": [],
  "naicsCodes": [],
  "pscCodes": [],
  "assistanceListings": [],
  "states": [],
  "minAmount": 0,
  "maxAmount": 0,
  "dateType": "action_date",
  "lastDays": 30,
  "sortBy": "amount",
  "maxItems": 100,
  "incremental": false,
  "outputFormat": "json",
  "requestDelayMs": 500
}
```

# Actor output Schema

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

All results in the default dataset (overview view).

## `runSummary` (type: `string`):

Counts of pushed and skipped (already seen) items.

# 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 = {
    "keywords": [],
    "recipients": [],
    "agencies": [],
    "naicsCodes": [],
    "pscCodes": [],
    "assistanceListings": [],
    "states": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("devteamdrew/usaspending-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 = {
    "keywords": [],
    "recipients": [],
    "agencies": [],
    "naicsCodes": [],
    "pscCodes": [],
    "assistanceListings": [],
    "states": [],
}

# Run the Actor and wait for it to finish
run = client.actor("devteamdrew/usaspending-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 '{
  "keywords": [],
  "recipients": [],
  "agencies": [],
  "naicsCodes": [],
  "pscCodes": [],
  "assistanceListings": [],
  "states": []
}' |
apify call devteamdrew/usaspending-awards --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devteamdrew/usaspending-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/y7xBw2GwGdH2og90I/builds/vf5D8GUKQOcW0Wrsc/openapi.json
