# US Government Contracts & Grants: Federal USAspending Awards (`moggedhq/us-government-contracts-scraper`) Actor

Search US federal contracts and government grants from USAspending by keyword, company, agency, NAICS or state. Get recipients, parents, amounts, obligations, dates and places of performance. $0.002 per award + $0.01 per run with awards; 50 awards about $0.11. No login.

- **URL**: https://apify.com/moggedhq/us-government-contracts-scraper.md
- **Developed by:** [mogged](https://apify.com/moggedhq) (community)
- **Categories:** Lead generation, AI
- **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 awards

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

## US Government Contracts & Grants: Federal USAspending Awards

For business development teams, grant researchers and analysts who need official US federal award records with recipient companies, agencies, amounts and evidence links.

Search by keyword, company, agency, industry code or state. Get one row per award with UEI, agencies, amounts, dates, classifications and source links. Full details add parent recipients and acquisition information. No government login or API key.

**$0.002 per award, plus $0.01 per run that saves awards. Fifty awards cost $0.11 plus a $0.00005 platform start.** Details and recent transactions are included. Empty searches, invalid input and zero-award failures have no search fee.

Cloud validation: two detailed 1,100-award runs completed cleanly; ten delivered contracts matched their live source pages.

### What you get

The Actor uses the official website API. Join repeated exports on `awardKey` to track incumbent recipients, obligations and reported changes. Full details add parent recipients, offices and contract acquisition fields.

| Field | Meaning |
|---|---|
| `verdict`, `type`, `status` | Plain description first; award rows have `type: AWARD` and `status: ok` |
| `awardKey` | Stable, generated USAspending award identifier used for deduplication and joins |
| `awardId`, `internalId` | Display award identifier and the source database identifier |
| `awardType`, `awardTypeCode`, `awardTypeDescription` | Contract, grant or loan group and reported type information |
| `recipientName`, `recipientUei` | Reported recipient organization and Unique Entity Identifier |
| `parentRecipientName`, `parentRecipientUei` | Reported parent organization, when full details are enabled and available |
| `recipientLocation` | Structured recipient address, city, state, country and postal fields |
| `recipientBusinessCategories`, `recipientUrl` | Source business classifications and recipient profile link with full details |
| `awardingAgency`, `awardingAgencyCode`, `awardingSubAgency`, `awardingOffice` | Awarding department, identifiers and office |
| `fundingAgency`, `fundingAgencyCode`, `fundingSubAgency`, `fundingOffice` | Funding department, identifiers and office |
| `currency`, `amount`, `amountBasis` | USD value and an explicit explanation of what that amount represents |
| `obligatedAmount`, `totalOutlays` | Reported cumulative obligations and outlays, where available |
| `baseAndExercisedOptions`, `potentialAwardAmount` | Current contract value and potential value with all options, from full details |
| `loanValue`, `loanSubsidyCost` | Separate loan face value and reported subsidy cost |
| `naicsCode`, `naicsDescription` | Industry classification and description, mainly for contracts |
| `pscCode`, `pscDescription` | Product/service classification and description, mainly for contracts |
| `assistanceListings` | Assistance program classifications returned by award search |
| `description` | Reported award description |
| `startDate`, `endDate`, `potentialEndDate`, `dateSigned` | Performance period, potential end and signing date when reported |
| `lastModifiedDate` | Source modification date; it is separate from the time this Actor retrieved the row |
| `placeOfPerformance` | Structured place where the work is performed |
| `competition`, `setAside`, `offersReceived`, `solicitationId` | Reported contract acquisition information with full details |
| `subawardCount`, `subawardAmount` | Source-reported subaward totals with full details |
| `transactions`, `transactionsReturned`, `transactionsTruncated` | Optional bounded list of recent transactions and completeness flag |
| `detailStatus` | `ok` for successful full details or `not requested` for search-only output |
| `inputKeyword`, `inputRecipient`, `queryId` | First search combination that delivered this award |
| `url`, `sourceUrl`, `scrapedAt` | Public award page, official detail API URL and UTC retrieval timestamp |

Missing values are null or empty lists. UEIs and complete generated award keys remain strings; classifications are never guessed.

### Start in three steps

1. Enter a keyword such as `software`, `construction` or `research`. Choose contracts, grants or loans and optionally add an agency, state or classification code.
2. Set `maxItems` to the number of unique awards you want. Press Start. The Console prefill requests 50 software contracts from the last 90 days with search fields. Enable `includeDetails` for parent recipients and the additional award fields.
3. Open the output dataset and export JSON, CSV, Excel or another Apify format. The Federal awards, Recipients and parents, Award details and Run summary views provide different column selections over the same dataset.

A free `SUMMARY` row and key-value record report coverage, errors, dates and spending-limit stops. Filter API data to `type == "AWARD"` for the award table.

### Input reference

| Input | Example | Behavior |
|---|---|---|
| `keywords` | `["software", "cybersecurity"]` | Separate OR searches of award text; empty means no keyword restriction |
| `recipientNames` | `["PERATON", "ZBPQEJVECCT4"]` | Recipient name, UEI or a legacy DUNS search value; each value is a separate OR search |
| `agencies` | `["NASA"]` | Exact top-tier awarding department names or supported abbreviations |
| `naicsCodes` | `["541512", "54"]` | Required industry codes or prefixes, combined as OR |
| `pscCodes` | `["D302", "R"]` | Product/service codes or prefixes, combined as OR |
| `states` | `["VA", "CA", "TX"]` | Two-letter place-of-performance state or territory codes |
| `awardTypes` | `["contracts", "grants", "loans"]` | Source groups queried separately; defaults to contracts |
| `dateFrom` | `"2026-01-01"` | Inclusive action-date start; omitted means 90 days before run start |
| `dateTo` | `"2026-11-17"` | Inclusive action-date end; omitted means the UTC run date |
| `minAmount` | `1000000` | Optional minimum source award amount in USD |
| `maxItems` | `50` | Global cap on distinct delivered awards, from 1 to 50,000 |
| `maxItemsPerSearch` | `100` | Cap per keyword/recipient/type combination; never raises the global cap |
| `includeDetails` | `true` | Adds full award detail fields. API default true; Console prefill false |
| `includeTransactions` | `false` | Embeds recent reported transactions inside each award row |
| `maxTransactionsPerAward` | `10` | Transaction cap from 1 to 100 per award when enabled |
| `proxyConfiguration` | `{"useApifyProxy": true}` | Automatic default proxy selection; an explicit buyer configuration is preserved |

Different filter categories combine with AND. Values within agencies, states or codes combine with OR. Keywords and recipients expand into separate OR combinations. An award matching several combinations is delivered once.

Searches run in input order, with each search ordered by descending source amount. The global cap applies as rows arrive, rather than ranking every combination together. Use `maxItemsPerSearch` to spread collection across terms or recipients.

Agency shortcuts: NASA, NSF, DOD, DOE, HHS, VA, USDA, DHS, EPA, DOT, ED, DOC, DOI, DOJ, HUD and SBA. Other agencies require their official top-tier name. State means place of performance, not headquarters.

### Examples

Search software contract incumbents in Virginia:

```json
{
  "keywords": ["software"],
  "awardTypes": ["contracts"],
  "states": ["VA"],
  "dateFrom": "2026-01-01",
  "minAmount": 1000000,
  "includeDetails": true,
  "maxItems": 100
}
```

Follow a known recipient and include its most recent award transactions:

```json
{
  "recipientNames": ["ZBPQEJVECCT4"],
  "awardTypes": ["contracts"],
  "includeDetails": true,
  "includeTransactions": true,
  "maxTransactionsPerAward": 10,
  "maxItems": 20
}
```

### A real award and its amounts

Cloud evidence from 17 November 2026, showing separate obligations and contract values:

```json
{
  "awardId": "80GSFC19C0063",
  "awardKey": "CONT_AWD_80GSFC19C0063_8000_-NONE-_-NONE-",
  "awardType": "contracts",
  "recipientName": "PERATON INC.",
  "recipientUei": "ZBPQEJVECCT4",
  "parentRecipientName": "VERITAS CAPITAL FUND MANAGEMENT, L.L.C.",
  "currency": "USD",
  "amount": 1526163709.96,
  "amountBasis": "cumulative award obligations",
  "obligatedAmount": 1526163709.96,
  "baseAndExercisedOptions": 1800000000,
  "potentialAwardAmount": 1800000000,
  "naicsCode": "517919",
  "pscCode": "D318",
  "startDate": "2019-10-01",
  "endDate": "2027-09-30",
  "url": "https://www.usaspending.gov/award/CONT_AWD_80GSFC19C0063_8000_-NONE-_-NONE-"
}
```

The live page confirms these values. An older award can match recent activity; its amount remains cumulative rather than restricted to your date window.

For loans, `amount` and `loanValue` represent face value. `loanSubsidyCost` and `obligatedAmount` remain separate. Do not add contract obligations and loan face values together as though they measured the same thing. `amountBasis` makes the distinction explicit on each row.

### Pricing and spending limits

| Apify tier | Price per unique award |
|---|---:|
| Free/list price | $0.002 |
| Bronze | $0.0019 |
| Silver | $0.0018 |
| Gold, Platinum, Diamond | $0.0016 |

The $0.01 search fee applies once, only with a saved award. The platform start is $0.00005 per GB, minimum one unit; default memory uses one. Details, transactions, retries and summaries have no extra fee.

| List-price example | Awards plus search fee | Platform start |
|---|---:|---:|
| 1 award | $0.012 | $0.00005 |
| 50 awards | $0.11 | $0.00005 |
| 1,000 awards | $2.01 | $0.00005 |
| No matches | $0 | $0.00005 |

Set the maximum total charge in Apify run options to bound a job. The Actor reserves the search fee and first award together, then checks each later award against the remaining budget. A row already saved before a platform reboot is reconciled with acknowledged platform charge counts; it is not charged again simply because the process restarted. Deduplication uses the complete generated award key, not the shorter display ID.

### Monitor awards on a schedule

Save the search as an Apify task and add an Apify schedule. Blank dates use a rolling last-90-days window, frozen once at startup so a reboot preserves the same period. Each run gets its own dataset.

Compare snapshots on `awardKey`. `scrapedAt` is retrieval time; `lastModifiedDate` comes from the source. Awards from previous runs are returned again. Use Apify integrations to send datasets to Google Sheets, your CRM, Make, Zapier, n8n or a webhook.

### API access

The standard Apify run endpoints accept the same input shown above. Keep your Apify token in your own secret environment variable.

```bash
curl -X POST \
  'https://api.apify.com/v2/acts/moggedhq~us-government-contracts-scraper/run-sync-get-dataset-items?format=json' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"keywords":["software"],"maxItems":10,"includeDetails":true}'
```

For larger jobs, start asynchronously, poll status, then read `defaultDatasetId` with pagination.

Read `SUMMARY` from the run's key-value store. `no matches` means a valid empty search; `source unavailable` identifies incomplete queries. Check `freeFailures` before treating the scope as complete.

### Use with AI agents (MCP)

Connect an MCP-compatible client to Apify with this Actor selected:

```text
https://mcp.apify.com/?tools=moggedhq/us-government-contracts-scraper
```

Example request to an agent:

Find 50 software contracts performed in Virginia, include recipient parent companies and recent transactions, then group the returned obligated amounts by awarding agency. Keep loan values separate from contract obligations and include official award links.

The agent can send plain fields such as `keywords`, `states`, `awardTypes`, `includeDetails`, `includeTransactions` and `maxItems`. It should select `AWARD` rows for analysis and inspect the run summary for coverage. There is no government API key to supply. Standard Apify account access is sufficient.

### Limits

- This is a federal award research tool, not an open solicitation or RFP feed. Award records describe reported spending relationships and do not mean a contract is currently open for bidding.
- Search begins on 2007-10-01. USAspending reporting delays, missing fields and later corrections carry through to the output. The Actor cannot provide data the official source has not reported.
- Date filters select award action activity. They do not restrict the cumulative value to spending inside that period and do not mean an award was first signed in that period.
- Contracts, grants and loans are supported. IDVs, subaward row exports, direct payments and other assistance groups are outside this Actor's current input. Full details can expose subaward totals, but not each subaward record.
- Parent recipients, business categories, office names, competition and detailed contract values require `includeDetails: true`. A field can still be null when the source omits it. NAICS and PSC mainly apply to contracts.
- Recent transactions are bounded by `maxTransactionsPerAward`; inspect `transactionsTruncated` before assuming the embedded list is a full history. Transaction dates may be outside the award-search window.
- The global maximum is 50,000 unique awards. Input order and per-search caps determine coverage when more awards match. Output is not a source-wide total, a complete market share calculation or a global top-value ranking across all queries.
- The Actor does not collect executive compensation, personal contact details or solicitation attachments, and is independent of the US government and USAspending.

### FAQ

**Do I need a government account?** No. The source API is public and keyless. An Apify account is sufficient.

**Can I search a company by UEI?** Yes. Put its UEI in `recipientNames`. Returned identifiers come from the source.

**What happens on source failure?** Transient failures are retried. Unavailable query scopes are identified in the summary; missing awards have no award fee.

Official documentation: [API endpoints](https://api.usaspending.gov/docs/endpoints), [API tutorial](https://api.usaspending.gov/docs/intro-tutorial), [federal spending guide](https://www.usaspending.gov/federal-spending-guide).

# Actor input Schema

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

Award description terms. Each keyword is a separate OR search; combined with the other filters. Empty searches all awards in the chosen period.

## `recipientNames` (type: `array`):

Company name, UEI or legacy DUNS. Multiple entries are separate OR searches; combined with keywords. No login needed.

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

Exact top-tier awarding agency names, or common abbreviations NASA, NSF, DOD, DOE, HHS, VA, USDA, DHS, EPA, DOT, ED, DOC, DOI, DOJ, HUD, SBA. Multiple agencies are OR.

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

Industry code prefixes of 2 to 6 digits. Multiple codes are OR; meaningful mainly for contracts.

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

Product/service classification codes or prefixes, e.g. D302 or R. Mainly contracts.

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

Two-letter US state or territory codes, e.g. VA, CA, TX. Filters where work is performed, not the recipient address.

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

contracts, grants, loans. Each group is searched separately in the order listed. Defaults to contracts.

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

YYYY-MM-DD, inclusive. Omit for 90 days before the run starts. Earliest 2007-10-01. This filters award activity, not initial award start date.

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

YYYY-MM-DD, inclusive. Omit for the UTC run date. Dates are fixed once per run and survive reboot.

## `minAmount` (type: `number`):

Optional lower bound on cumulative award obligations, or loan value for loans. A zero value is preserved.

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

Unique award cap. maxItems is global; maxItemsPerSearch applies separately to each keyword/recipient/type combination. Duplicates are free.

## `maxItemsPerSearch` (type: `integer`):

Unique award cap. maxItems is global; maxItemsPerSearch applies separately to each keyword/recipient/type combination. Duplicates are free.

## `includeDetails` (type: `boolean`):

Recommended. Adds parent recipients, business categories, agency offices, contract competition, potential values and source-backed classification details. No extra award fee.

## `includeTransactions` (type: `boolean`):

Adds the latest reported transactions inside each award row. No extra award fee. Limited by maxTransactionsPerAward; not a full history export.

## `maxTransactionsPerAward` (type: `integer`):

Maximum recent transactions embedded per award when enabled. transactionsTruncated reports if more exist.

## `proxyConfiguration` (type: `object`):

Default datacenter proxy first; automatic US residential fallback on repeated refusal. Explicit disable, groups, country or custom URLs are preserved.

## Actor input object example

```json
{
  "keywords": [
    "software"
  ],
  "awardTypes": [
    "contracts"
  ],
  "maxItems": 50,
  "maxItemsPerSearch": 50000,
  "includeDetails": false,
  "includeTransactions": false,
  "maxTransactionsPerAward": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `awards` (type: `string`):

No description

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

No description

# 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": [
        "software"
    ],
    "awardTypes": [
        "contracts"
    ],
    "includeDetails": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("moggedhq/us-government-contracts-scraper").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": ["software"],
    "awardTypes": ["contracts"],
    "includeDetails": False,
}

# Run the Actor and wait for it to finish
run = client.actor("moggedhq/us-government-contracts-scraper").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": [
    "software"
  ],
  "awardTypes": [
    "contracts"
  ],
  "includeDetails": false
}' |
apify call moggedhq/us-government-contracts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moggedhq/us-government-contracts-scraper"
        }
    }
}
```

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/lV5DtrkOhlt8mB1co/builds/xp00Cp8C2FIjMINoS/openapi.json
