USAspending federal contract and grant awards monitor avatar

USAspending federal contract and grant awards monitor

Pricing

$2.00 / 1,000 awards

Go to Apify Store
USAspending federal contract and grant awards monitor

USAspending federal contract and grant awards monitor

Monitor US federal contract and grant awards by NAICS, PSC, agency, and recipient. Detect new and changed awards with UEI identifiers and source citations.

Pricing

$2.00 / 1,000 awards

Rating

0.0

(0)

Developer

Chee Chiaw Lim

Chee Chiaw Lim

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

USAspending awards monitor

Collect US federal contract and grant awards from the USAspending award search API. Filter by NAICS, PSC, awarding agency, recipient keyword, and minimum award amount. Each result includes the source URL, UEI when available, and change metadata.

Run locally

Use Node.js 20 or later.

npm install
npm test
npm start

The sample input in storage/key_value_stores/default/INPUT.json requests up to three contract awards from the last seven days. Local runs contact the real API. Tests stub network calls and use temporary storage.

For an isolated live run, copy the sample input before starting the actor.

mkdir -p /tmp/usaspending-awards-monitor-live/key_value_stores/default
cp storage/key_value_stores/default/INPUT.json /tmp/usaspending-awards-monitor-live/key_value_stores/default/INPUT.json
CRAWLEE_STORAGE_DIR=/tmp/usaspending-awards-monitor-live APIFY_LOCAL_STORAGE_DIR=/tmp/usaspending-awards-monitor-live node src/main.js

Read awards in datasets/default and key_value_stores/default/RUN_SUMMARY.json under that storage directory.

Input reference

FieldDefaultMeaning
awardTypes["contracts"]contracts, grants, or both as an array. A single group string is also accepted by the runtime.
lookbackDays7UTC date window ending today, filtered by date_signed.
naicsCodes[]Contract industry codes, such as 541512.
pscCodes[]Contract product or service codes, such as D302.
agencies[]Exact top-tier awarding agency names, such as Department of Defense.
recipientKeywords[]Recipient search strings passed to recipient_search_text.
minAmount0Minimum total award amount in USD.
onlyNewtrueEmit new and changed records. Set false to include unchanged records.
maxItems100Maximum emitted records across groups, from 1 to 10000.
stateStoreNameusaspending-awards-monitor-stateNamed key-value store for the award history.

List filters accept arrays of strings. NAICS and PSC describe contracts. They do not classify grants. An agency or recipient filter can apply to either group. The API combines different filter categories, so narrow combinations may return no awards.

The actor sends contracts A, B, C, D and grants 02, 03, 04, 05 in separate requests. Requests use pages of 100, ordered by award amount descending. Groups run in input order. maxItems limits emitted records, not the number scanned. An unchanged or excluded page may require further requests.

The actor starts at most one request per second. HTTP 429 and 5xx responses receive up to three retries with exponential backoff and Retry-After handling. Other HTTP errors fail the run and appear in RUN_SUMMARY.

Output reference

Each dataset item has these fields.

FieldsMeaning
awardId, generatedId, awardTypeSource award ID, unique USAspending ID, and requested award group.
recipientName, recipientUeiRecipient name and SAM.gov UEI.
amountTotal award amount in USD, rather than the latest transaction amount.
awardingAgency, awardingSubAgencyAwarding agency names.
startDate, endDate, baseObligationDatePerformance dates and original obligation date.
descriptionAward description supplied by the source.
naicsCode, naicsDescription, pscCodeContract classifications. Null for grants.
placeOfPerformanceState, lastModifiedSource state code and modification date.
awardUrl, source, citation, checkedAtAward link, source attribution, and UTC check time.
changeType, changedFieldsnew, changed, or unchanged, and changed source field names.

Unavailable source fields are null. changedFields is empty for new and unchanged awards. Volatile check timestamps and change metadata do not cause a record to become changed.

State uses generatedId to distinguish awards with similar public IDs. It saves a snapshot only after a successful dataset push. onlyNew skips unchanged snapshots. Use a separate stateStoreName for independent histories. A crash between a dataset push and state save can repeat that record on the next run.

The date window selects awards by signing date. It is not a complete feed of amendments to older awards. Changes are detected only when an award reappears in the selected window. USAspending reporting delays can also place an award outside a short window.

RUN_SUMMARY records run timestamps, fetched, eligible, and pushed counts, whether a charge limit stopped the run, and any run error. The dataset output link and summary link are declared in .actor/output_schema.json. The pay-per-event event name is result. Every emitted record, including an unchanged record requested with onlyNew=false, uses that event.

Source attribution and licence

Source data comes from USAspending.gov and its public API. USAspending permits copying, adapting, and redistributing data for commercial and non-commercial use, subject to its Dun & Bradstreet limitation. See the USAspending about page and the D&B limitation. Repository decisions and the terms review are in TERMS.md.

Every record carries this citation.

USAspending.gov, U.S. Department of Treasury, Bureau of the Fiscal Service

source and checkedAt provide the source link and access time. For published reuse, cite USAspending.gov, U.S. Department of Treasury, Bureau of the Fiscal Service, https://www.usaspending.gov, followed by the access date.

The actor never requests DUNS fields and emits an explicit field allowlist. It drops awards with a missing, invalid, or pre-2022-04-04 Base Obligation Date. Filtering by recent signing date alone does not satisfy that exclusion. The original obligation date gate applies independently to contracts and grants.

Verification status

npm test exits successfully. Direct execution of the eight test files reports 20 passing unit cases and three SDK integration cases skipped because apify is unavailable. This environment reports only file-level totals for node --test, so the skips require checking the individual test output.

This workspace blocks outbound DNS for shell commands. Dependency installation and API requests must succeed before the live acceptance check can pass. Synthetic offline fixtures exercise the API response shape and compliance rules. They are not presented as captured API responses. Replace them with trimmed, DUNS-free live captures when network access is available.

The field selection follows the official endpoint contract. Live curl verification, real-response fixture capture, and a successful live local run remain required before publishing. Nothing in this repository is pushed or deployed by the build workflow.

The attempted isolated live run failed at startup with ERR_MODULE_NOT_FOUND for apify. Its storage directory contains only the copied input. No live dataset records or RUN_SUMMARY were produced. npm install failed with EAI_AGAIN for registry.npmjs.org, and contract and grant curl requests failed to resolve api.usaspending.gov.