USASpending.gov Scraper
Pricing
Pay per event
USASpending.gov Scraper
Extract federal spending data from USASpending.gov including contracts, grants, loans, and awards. Filter by keyword, agency, recipient, amount, and time period.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Actor stats
0
Bookmarked
3
Total users
1
Monthly active users
a day ago
Last modified
Share
Extract federal spending data from USASpending.gov. Search contracts, grants, loans, and awards by keyword, agency, recipient, date range, and amount.
What does USASpending.gov Scraper do?
This actor extracts US federal spending data from the official USASpending.gov API, including:
- Federal contracts — defense contracts, IT services, consulting, research
- Grants — research grants, education funding, community development
- Loans — federal loan programs with amounts and subsidy costs
- IDVs — indefinite delivery vehicles and blanket purchase agreements
- Direct payments — subsidies, entitlements, and other direct federal payments
Who is it for?
- 📊 Government contractors — tracking federal spending patterns and contract opportunities
- 🏢 Policy researchers — analyzing government budget allocation and spending trends
- 📰 Investigative journalists — following the money trail in federal spending data
- 💼 Business development teams — identifying agencies and programs with active funding
- 🎓 Academic researchers — studying public finance and government procurement patterns
Why use USASpending.gov Scraper?
- Official government data — sourced directly from the USASpending.gov API, the official source for US federal spending
- No API key needed — the USASpending API is fully public with no registration required
- Powerful filters — search by keyword, agency, recipient, date range, amount, state
- All award types — contracts, grants, loans, IDVs, and direct payments
- Structured output — clean JSON with consistent field names for analysis
- Automatic pagination — handles multi-page results seamlessly
Use cases
- Government contract research — find contracts awarded to specific companies or in specific sectors
- Grant discovery — identify federal grant opportunities and historical awards
- Competitive intelligence — track competitors' government contracts and award amounts
- Policy analysis — analyze federal spending patterns by agency, state, or category
- Investigative journalism — research government spending for reporting
- Business development — identify agencies and programs with active procurement
- Academic research — collect federal spending data for economic and policy studies
- Market sizing — understand government spending in specific industries (AI, cybersecurity, healthcare)
Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
keywords | array | — | Search keywords (e.g., artificial intelligence, cybersecurity) |
awardType | string | contracts | Award type: contracts, grants, loans, idvs, direct_payments, all |
startDate | string | — | Start date (YYYY-MM-DD format) |
endDate | string | — | End date (YYYY-MM-DD format) |
agency | string | — | Awarding agency name (e.g., Department of Defense, NASA) |
recipient | string | — | Recipient/contractor name |
minAmount | number | — | Minimum award amount (USD) |
maxAmount | number | — | Maximum award amount (USD) |
state | string | — | Recipient state (2-letter code: CA, TX, NY) |
sortBy | string | Award Amount | Sort field |
sortOrder | string | desc | Sort direction: desc or asc |
maxResults | number | 100 | Maximum awards to return |
Output example
{"awardId": "W56KGZ24C0011","generatedId": "CONT_AWD_W56KGZ24C0011_9700_-NONE-_-NONE-","recipientName": "ECS FEDERAL, LLC","awardAmount": 118579059,"awardingAgency": "Department of Defense","fundingAgency": "Department of Defense","description": "RESEARCH AND DEVELOPMENT EFFORT TO DESIGN AND DEVELOP PROTOTYPES TO ARTIFICIAL INTELLIGENCE...","startDate": "2024-07-31","endDate": "2026-07-30","awardType": "DEFINITIVE CONTRACT","naicsCode": "541715","naicsDescription": "RESEARCH AND DEVELOPMENT IN THE PHYSICAL, ENGINEERING, AND LIFE SCIENCES","recipientState": "VA","recipientCity": "FAIRFAX","placeOfPerformanceState": "VA","placeOfPerformanceCity": "FAIRFAX","url": "https://www.usaspending.gov/award/CONT_AWD_W56KGZ24C0011_9700_-NONE-_-NONE-","scrapedAt": "2026-03-03T08:47:15.123Z"}
How much does it cost to scrape USASpending.gov?
This actor uses a pay-per-event pricing model:
| Event | Price |
|---|---|
| Run started | $0.001 |
| Per award extracted | $0.001 |
Cost examples
| Scenario | Awards | Cost |
|---|---|---|
| Quick search (10 awards) | 10 | $0.011 |
| Sector analysis (50) | 50 | $0.051 |
| Agency deep dive (200) | 200 | $0.201 |
| Large dataset (500) | 500 | $0.501 |
Platform costs (compute, storage) are additional but minimal.
How to scrape USASpending.gov federal spending data
Via Apify Console
- Open USASpending.gov Scraper in Apify Console
- Enter search keywords (e.g., "artificial intelligence", "cybersecurity")
- Select the award type and set date range
- Click Start and download results from the Dataset tab
Via API (Node.js)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('automation-lab/usaspending-scraper').call({keywords: ['artificial intelligence'],awardType: 'contracts',startDate: '2024-01-01',endDate: '2025-12-31',maxResults: 50,});const { items } = await client.dataset(run.defaultDatasetId).listItems();items.forEach((award) => {console.log(`$${award.awardAmount.toLocaleString()} | ${award.recipientName} | ${award.awardingAgency}`);});
Via API (Python)
from apify_client import ApifyClientclient = ApifyClient('YOUR_APIFY_TOKEN')run = client.actor('automation-lab/usaspending-scraper').call(run_input={'keywords': ['artificial intelligence'],'awardType': 'contracts','startDate': '2024-01-01','endDate': '2025-12-31','maxResults': 50,})for award in client.dataset(run['defaultDatasetId']).iterate_items():print(f"${award['awardAmount']:,.0f} | {award['recipientName']} | {award['awardingAgency']}")
cURL
curl "https://api.apify.com/v2/acts/automation-lab~usaspending-scraper/runs" \-X POST \-H "Authorization: Bearer YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"keywords": ["artificial intelligence"], "awardType": "contracts", "maxResults": 50}'
Use with AI agents via MCP
USASpending.gov Scraper is available as a tool for AI assistants via the Model Context Protocol (MCP).
Setup for Claude Code
$claude mcp add --transport http apify "https://mcp.apify.com"
Setup for Claude Desktop, Cursor, or VS Code
{"mcpServers": {"apify": {"url": "https://mcp.apify.com"}}}
Example prompts
- "Find federal contracts awarded to this company"
- "Search USASpending for NASA grants in 2025"
Learn more in the Apify MCP documentation.
Integrations
Connect USASpending.gov Scraper with your tools:
- Google Sheets — automatically populate spreadsheets with federal contract data
- Slack — get notified when new contracts match your criteria
- Zapier / Make — build automated government spending monitoring workflows
- PostgreSQL / BigQuery — store award data for long-term analysis and reporting
- Webhooks — push data to your application when extraction completes
Tips and best practices
- Use specific keywords — narrow searches produce better results. "artificial intelligence" is better than just "AI".
- Filter by date range — always set a date range to avoid pulling the entire database.
- Search one type at a time — searching by specific award type (contracts, grants) is faster than "all".
- Use agency filters — if you know the agency, add it to significantly reduce result volume.
- State filter — combine with keywords to find local contractors and recipients.
- Sort by amount — use descending amount sort to find the largest awards first.
Limitations
- Maximum ~10,000 records per query (split into multiple searches for larger datasets)
- API response times vary (2-10 seconds per page depending on query complexity)
- Award types cannot be mixed in a single API call — the actor handles this automatically for "all" type searches
- Some older awards may have incomplete data fields
Legality
Scraping publicly available data is generally legal according to the US Court of Appeals ruling (HiQ Labs v. LinkedIn). This actor only accesses publicly available information and does not require authentication. Always review and comply with the target website's Terms of Service before scraping. For personal data, ensure compliance with GDPR, CCPA, and other applicable privacy regulations.
FAQ
The API is slow or returns errors — what should I do? The USASpending.gov API response times vary by query complexity (2-10 seconds per page). Broad queries without date filters are especially slow. Always set a date range and use specific keywords to improve performance.
My search returns duplicates or unexpected results — why?
When using awardType: "all", the actor queries multiple endpoints separately. Some awards may appear under different categories. Use a specific award type (contracts, grants) for cleaner results.
Other government data scrapers
- Regulations.gov Scraper -- extract federal regulations and public comments
- SEC EDGAR Scraper -- scrape SEC filings, 10-K, 10-Q, and more
- FDA Recalls Scraper -- extract FDA recall notices and safety alerts
- Court Records Scraper -- search and extract court case records