USAspending Scraper avatar

USAspending Scraper

Pricing

from $2.99 / 1,000 results

Go to Apify Store
USAspending Scraper

USAspending Scraper

USAspending Scraper is a Python tool designed to extract U.S. federal spending data, including contracts, grants, direct payments, and agency budgets, from USAspending.gov. It exports structured datasets into CSV or JSON formats for policy research, financial auditing, and market analysis

Pricing

from $2.99 / 1,000 results

Rating

0.0

(0)

Developer

real-estate-api

real-estate-api

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

USAspending Scraper: federal contracts, grants, recipients, and agencies

USA Automotive Leads Hub

Pull U.S. federal spending straight from the public USAspending Website. Search contract awards, grants, loans, and IDVs, then collect contractor UEIs and agency budget figures into a clean dataset. No API key, no sign-in.

Think of it as a sam.gov alternative when you want government contracts data you can filter and export: by keyword, agency, recipient, NAICS, place of performance, and date. Put it on a schedule and get a fresh awards search every morning.

Use cases

  • B2G sales leads. See who wins contracts in your NAICS, who the incumbent is, and which awards are close to their end date.
  • Competitor tracking. Follow a contractor such as Lockheed across agencies and states.
  • Grant research. Pull assistance awards for a university or nonprofit keyword.
  • Journalism and policy. Export award rows with agency, amount, and place of performance.
  • Market sizing. List toptier agencies with their obligated amounts and budget authority.

What you get

Award rows carry the award id, generated internal id, amount, outlays, awarding agency, NAICS, PSC, and a link to the award page. Turn on award details when you also need the UEI, county, ZIP, congressional district, business categories, and subaward count.

Recipient rows carry the name, UEI, DUNS (when USAspending still has it), parent or child level, and total amount. Agency rows carry the toptier code, abbreviation, obligated amount, budget authority, mission, and website.

Loan rows use Loan Value as the amount, since that group has no Award Amount field.

Input

ParameterTypeDefaultDescription
modestringawardsSearch awards, load award details, search recipients, or list agencies.
keywordsarraydata analyticsKeywords for award or recipient search. One per line.
awardTypesarraycontractscontracts, idvs, grants, direct_payments, loans, other. One API call per group.
dateFromstring1 year agoAction date start. Earliest searchable date is 2007-10-01.
dateTostringtodayAction date end.
awardingAgenciesarrayemptyExact toptier names, such as Department of Defense.
recipientsarrayemptyRecipient name text, such as Lockheed.
placeOfPerformanceStatesarrayemptyTwo-letter state codes, such as TX.
naicsCodesarrayemptyNAICS codes. 541511 was checked on the live API.
minAmountintegeremptyMinimum award amount in USD.
sortBystringAward AmountAward Amount, Start Date, End Date, or Last Modified Date. Descending.
includeDetailsbooleanfalseExtra request per award for UEI and location.
awardIdsarrayemptygenerated_internal_id values for award_details mode.
maxItemsinteger200Stop after this many rows. Hard cap 10,000.
timeoutSecsinteger300Overall run timeout. Max 3600.
requestTimeoutSecsinteger30Per-request timeout.
proxyConfigurationobjectNo proxyOptional. Leave useApifyProxy false unless requests fail.
{
"mode": "awards",
"keywords": ["data analytics"],
"awardTypes": ["contracts"],
"dateFrom": "2025-01-01",
"dateTo": "2025-12-31",
"maxItems": 50,
"includeDetails": false,
"proxyConfiguration": { "useApifyProxy": false }
}
{
"mode": "awards",
"awardTypes": ["contracts"],
"awardingAgencies": ["Department of Defense"],
"recipients": ["Lockheed"],
"placeOfPerformanceStates": ["TX"],
"dateFrom": "2025-01-01",
"dateTo": "2025-06-30",
"sortBy": "Award Amount",
"maxItems": 100
}

Output

Rows land in the dataset. Award text is stored as awardSummary and also as description, because description cannot be used as a dataset schema field name.

{
"recordKind": "award",
"awardId": "70CTD022FR0000002",
"generatedInternalId": "CONT_AWD_70CTD022FR0000002_7012_GS35F386DA_4732",
"awardTypeGroup": "contracts",
"awardType": "DELIVERY ORDER",
"recipientName": "BOOZ ALLEN HAMILTON INC",
"amount": 76183271.16,
"totalOutlays": 59221308.22,
"awardSummary": "EO14042 DHS ICE REQUIRES DESIGN, DEVELOPMENT AND DATA ANALYTICS SUPPORT",
"description": "EO14042 DHS ICE REQUIRES DESIGN, DEVELOPMENT AND DATA ANALYTICS SUPPORT",
"startDate": "2021-12-03",
"endDate": "2027-03-01",
"awardingAgency": "Department of Homeland Security",
"awardingSubAgency": "U.S. Immigration and Customs Enforcement",
"placeOfPerformanceState": "VA",
"naicsCode": "541511",
"pscCode": "DD01",
"url": "https://www.usaspending.gov/award/CONT_AWD_70CTD022FR0000002_7012_GS35F386DA_4732"
}
FieldTypeDescription
awardIdstringAward ID from search, or PIID/FAIN from details.
generatedInternalIdstringStable id. Duplicate ids are dropped.
amountnumberAward amount, or Loan Value for loans. Large values stay as numbers.
awardSummarystringAward description. The same text is also on description.
recipientUeistringUEI after award details, or from loan search.
urlstringAward, recipient, or agency page.
recipientLevelstringP, C, or R on recipient rows. Also stored as level.
errorDetailstringAPI detail text when a call returns 422 or another error.

The dataset has four table views: Awards, Recipients, Agencies, and Errors.

Run it on a schedule

Run the actor on a schedule and filter the dataset on lastModified or endDate for new-award alerts or expiring-contract lists. Apify webhooks can push each run to Google Sheets, Slack, or your own API.

Limits

Search dates start at 2007-10-01. Older spending needs the bulk download, which this actor does not call. The free cap is 10,000 rows per run, and the API serves at most 100 rows per page. Agencies report on their own cadence, so brand-new awards can lag. The endpoints returned no rate-limit headers when they were checked, so the actor caps page size, detail concurrency, and retries rather than guessing a requests-per-minute number.

FAQ

What is the difference between contracts and IDVs? Contracts use codes A, B, C, and D. IDVs use IDV_A through IDV_E and cover indefinite delivery vehicles. The actor sends one group per request. Mixing groups in one body is rejected.

Should I use UEI or DUNS? UEI is the current SAM identifier. Award details return recipient_uei. Recipient search still returns DUNS when USAspending has the legacy number. Prefer UEI for a contractor list you plan to match against SAM.

Do I need an API key? No. This uses the public USAspending API v2.

Why did an agency filter return nothing? The awarding agency name has to match the toptier name, for example Department of Defense. The actor checks the name with /autocomplete/awarding_agency/ and writes an error row when nothing matches.

How many rows can one run return? maxItems defaults to 200 and cannot go above 10,000. Each page asks for at most 100 awards.

Trademark notice

USAspending.gov, the U.S. Department of the Treasury, and related names, logos, and trademarks belong to their respective owners. Their use in this documentation only identifies the source of the data and does not imply affiliation, sponsorship, endorsement, or partnership.

Disclaimer

This actor is an independent tool. It is not affiliated with, endorsed by, sponsored by, or officially associated with USAspending.gov or the U.S. Department of the Treasury.

Collecting information that is already public is generally legal. Scraping is not hacking, and no single law bans it. The usual limits apply: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. A public name, price, or rating is a fact, which is not the same as republishing someone's article or photo.

This actor reads public pages and official public APIs. It does not log in and it does not bypass access controls.

This is not legal advice. For the longer version, see Apify's article Is web scraping legal?.