USAspending Federal Awards avatar

USAspending Federal Awards

Pricing

from $2.00 / 1,000 award results

Go to Apify Store
USAspending Federal Awards

USAspending Federal Awards

Search US federal contracts and awards from the official USAspending API and save flat rows to a dataset. A Standby MCP server lets agents search awards, open one award, and total spending by agency or recipient.

Pricing

from $2.00 / 1,000 award results

Rating

0.0

(0)

Developer

nichedata-lab

nichedata-lab

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Features

Limited permissionsSingle-tenantServer interface

Share

Search United States federal contracts and other awards from the official USAspending API and save one flat row per award to an Apify dataset. The same Actor is an MCP server in Standby mode, so an agent can search awards, open one award, total spending by awarding agency, or total spending by recipient.

This Actor calls https://api.usaspending.gov/ only. It does not open usaspending.gov pages. The site's robots.txt disallows query URLs, and the API needs no key.

Use cases

  • Pull a short list of contracts that mention a product, technology, or program, with agency, amount, NAICS, PSC, and place of performance.
  • Limit that list to one awarding agency, one recipient name or UEI, a NAICS or PSC code, a state or ZIP, a date window, or an amount range.
  • Give an assistant a live way to answer "who is receiving these awards?" and "which agencies are obligating the money?" without downloading the full USAspending archive.

How to run it

The prefilled input is a working search: keyword cybersecurity, contract types A–D (BPA call, purchase order, delivery order, definitive contract), action dates from 2025-10-01 through 2026-09-30, and 10 awards, largest amount first. Start the Actor with that input to get rows.

Filters are combined. Leave a field empty to ignore it.

InputWhat it does
KeywordsText matched by the USAspending award search.
Award typesContract, IDV, legacy assistance (02–11), and current assistance (F001–F010) codes from the search API.
Awarding agency / Funding agencyExact top-tier agency name, for example Department of Homeland Security.
RecipientOne recipient name or UEI.
NAICS codesCode or prefix. 541512 is computer systems design services.
PSC codesProduct and Service Code, for example J069.
Start date / End dateAction date (date_type: action_date), which is the award's latest transaction date. The search API's earliest date is 2007-10-01.
Minimum / maximum award amountDollar bounds sent to the search API as lower_bound and upper_bound.
Place of performanceCountry (USA or FOREIGN), 2-letter state, city, and 5-digit ZIP. A state, city, or ZIP without a country uses USA.
Maximum awards1 to 200. Default 10.
Sort by / Sort orderAward amount, start date, end date, or last modified date.

Example input for definitive contracts awarded by the Department of Homeland Security:

{
"keywords": ["software"],
"awardTypeCodes": ["D"],
"awardingAgency": "Department of Homeland Security",
"startDate": "2025-10-01",
"endDate": "2026-09-30",
"maxItems": 3
}

Example input for computer-systems contracts performed in Virginia, between $100,000 and $5,000,000:

{
"keywords": [],
"awardTypeCodes": ["A", "B", "C", "D"],
"naicsCodes": ["541512"],
"popState": "VA",
"minAmount": 100000,
"maxAmount": 5000000,
"startDate": "2026-01-01",
"endDate": "2026-06-30",
"maxItems": 3
}

Output

Each dataset item is a flat award. Amounts are US dollars as reported by the API. generatedAwardId is the id used by the award-detail endpoint and by the MCP get_award tool. usaspendingUrl links to the public award page.

{
"awardId": "FA862118F6251",
"generatedAwardId": "CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
"recipientName": "LOCKHEED MARTIN CORPORATION",
"recipientUei": "KDT2YLB34NT6",
"awardAmount": 666315748.84,
"awardingAgency": "Department of Defense",
"awardingSubAgency": "Department of the Air Force",
"startDate": "2018-02-08",
"endDate": "2027-01-31",
"naicsCode": "336413",
"pscCode": "J069",
"popCity": "ORLANDO",
"popState": "FL",
"description": "AFSOC ACTS AWARD OF CONTRACT FOR CLS, ENGINEERING, INSTRUCTION, CYBERSECURITY, DMO",
"usaspendingUrl": "https://www.usaspending.gov/award/CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
"dnbNotice": "Recipient name and location may include Dun & Bradstreet Open Data. Attribute: Dun & Bradstreet, Inc. DUNS numbers, parent-company identifiers, and street addresses are omitted."
}

The dataset view Overview shows the award id, recipient, UEI, amount, agencies, dates, NAICS, PSC, place-of-performance state, description, and link.

The Actor does not return subawards, transaction history, or the bulk-download archive. For a full extract, use USAspending's own download endpoints.

MCP server

In Standby mode the Actor serves the MCP endpoint at /mcp (Streamable HTTP). webServerMcpPath is /mcp. A client connects to the Actor's Standby URL with an Apify API token:

{
"mcpServers": {
"usaspending-awards": {
"url": "https://<username>--usaspending-awards.apify.actor/mcp",
"headers": {
"Authorization": "Bearer <APIFY_API_TOKEN>"
}
}
}
}

GET / answers the platform readiness probe.

ToolWhat it returns
search_awardsUp to 25 flat award rows. Same filters as the Actor. Defaults to contracts in fiscal year 2026.
get_awardOne award. Pass generatedAwardId from a search row, for example CONT_AWD_....
spending_by_agencyAward-level obligation totals by awarding agency.
spending_by_recipientAward-level obligation totals by recipient name and UEI. The DUNS code field is removed.

A resource at resource://usaspending/about repeats the source and Dun & Bradstreet rules. Reading it is not a charged tool call.

Pay per event

Dataset runs charge actor-start once and result-item once per saved row, after that row is stored. A row that fails to store is not a result-item charge. Each MCP tool call charges mcp-tool-call. The call is charged after the arguments are validated and before the API request. If the run budget is already exhausted, the Actor stops instead of saving another row or running the tool.

Proposed prices are in PRICING.md. They are not written into the Actor configuration, so pushing this source does not publish a price. Set the three event names in Apify Console when you enable pay-per-event.

On a multi-tenant Standby run, tool calls pass the X-Actor-Request-ID header as the charge request_id, which is how the platform bills the caller of a shared run.

Limits

  • Maximum 200 dataset rows per run, and 25 rows or groups per MCP tool call.
  • The client sends one request at a time. It does not use proxies, and it ignores HTTP_PROXY / HTTPS_PROXY.
  • A 429 or 5xx response is retried up to 4 attempts with exponential backoff. A numeric Retry-After header is honored. Other 4xx responses are not retried.
  • The search API rejects dates before 2007-10-01. Older awards are available from USAspending's download tools, which this Actor does not call.
  • Agency names must match the published top-tier name. A misspelled name returns no rows.
  • Award amounts, dates, and descriptions are whatever the API returns. USAspending republishes agency submissions from FPDS, FABS, and SAM.gov, and those systems have their own reporting gaps.

Data source and licensing

USAspending.gov is the official public source for US federal spending data, operated for the US Department of the Treasury, Bureau of the Fiscal Service. Its About page says the data may be copied, adapted, redistributed, and used for commercial or non-commercial purposes, subject to the Dun & Bradstreet limitation linked from the homepage. The API itself does not require an account (endpoint list).

Treasury's About the Data says award recipients are identified by a Unique Entity Identifier (UEI), and that information about awards to individuals is aggregated or redacted so personally identifiable information is not published. This Actor returns the UEI and drops executive-officer name slots, which can otherwise contain personal names.

Suggested citation for an award page: include the award title, "USAspending.gov", the award URL, and the date you accessed it. See the citations on the About page.

Dun & Bradstreet fields

Verified from USAspending's own pages, not from a guess about which column came from which vendor:

  • Limitation on Permissible Use of Dun & Bradstreet, Inc. Data says the site includes data supplied by D&B, "which includes each entity's DUNS Number and its associated business information." It defines D&B Open Data as Business Name, Street Address, City Name, State/Province Name, Country Name, County Code, State/Province Code, State/Province Abbreviation, and ZIP/Postal Code.
  • That page requires written attribution to D&B when you use D&B Open Data. It says you may not access, use, or disseminate D&B Open Data in bulk, meaning an amount you could use as an original source or as a substitute for the D&B product. It says D&B data other than those Open Data elements may not be used for commercial, resale, or marketing purposes. It prohibits systematic harvesting of the website (bots or spiders). It says the data is provided "as is," that it is D&B intellectual property, and that the federal government assumes no liability for it once it is downloaded. Questions about the scope of that license go to the contact published on that page.
  • The Analyst's Guide says recipient identifier fields include name, UEI, DUNS, and the matching parent fields, and that the federal government stopped using DUNS as the entity identifier in April 2022 in favor of the UEI. Parent fields are how related recipients are grouped.
  • The API contract for spending-by-recipient says the result field code is the recipient's DUNS number.

How this Actor handles that:

  • It never requests Recipient DUNS Number, and if a payload still contains a DUNS, parent recipient name, parent recipient UEI, or parent DUNS, those values are not copied to the output.
  • Spending-by-recipient rows keep name, UEI, USAspending recipient id, and amount. The DUNS code is dropped. An agency code such as DOD is an agency abbreviation, not a DUNS, and is kept.
  • Street address lines are not copied. Street address is on the Open Data list, and the D&B terms do not allow bulk redistribution of Open Data as a substitute for a D&B file.
  • Recipient name, city, state, country, and ZIP can be D&B Open Data. They are included because an award row is hard to read without them. Every award row and recipient total includes dnbNotice, which attributes Dun & Bradstreet, Inc. A run stops at 200 rows so this Actor is not a bulk recipient directory.
  • The parent award (the ordering vehicle's PIID) is kept on award detail. That is another federal award id, not the recipient's corporate parent.
  • UEI is kept. Treasury describes it as the government entity identifier.

If you redistribute rows that include recipient name or location, keep the attribution to Dun & Bradstreet, Inc. Do not use the output as a DUNS file, a corporate-family file, or a street-address directory.

Local development

Python 3.11 or newer. From this directory:

python -m venv .venv
.venv/bin/pip install -r requirements.txt -r requirements-dev.txt
.venv/bin/pytest

pytest runs the unit tests and the live tests. The live tests call the public API, run this Actor through the Python SDK's local storage with the default input and three other filter sets, and call each MCP tool. No Apify token is required.

To run the dataset Actor yourself, write the input to the local key-value store and disable the storage purge so that file is still there when the run starts:

mkdir -p storage/key_value_stores/default
cp examples/default-input.json storage/key_value_stores/default/INPUT.json
APIFY_PURGE_ON_START=false ACTOR_TEST_PAY_PER_EVENT=true python -m usaspending_actor

Rows are written under storage/datasets/default/. With ACTOR_TEST_PAY_PER_EVENT=true, charges are logged under storage/datasets/charging-log/ and nothing is billed.

Cloud build, apify push, Standby hosting, and Console monetization need an Apify account token. This package does not call apify push.

FAQ

Do I need a USAspending API key? No. The public API does not require one.

Why are there no DUNS numbers? USAspending's D&B terms restrict DUNS numbers and other non-Open-Data D&B business information. Use the UEI, which is the identifier Treasury tells readers to use.

Why is the row cap 200? The search is meant for a focused export. The cap also keeps a single run from becoming a bulk dump of recipient names and locations, which the D&B Open Data terms restrict.

Why did my agency filter return nothing? The awarding and funding filters use the exact top-tier name from USAspending, such as Department of Defense or General Services Administration.

Can I get grants instead of contracts? Yes. Set awardTypeCodes to legacy codes such as 04 or current codes such as F001. The default is contracts because that is the prefilled search.

Does the date filter mean the award was signed in that range? It filters action_date, the latest transaction date. The base start date on the row can be earlier than startDate.