USAspending Loans Scraper avatar

USAspending Loans Scraper

Pricing

Pay per event

Go to Apify Store
USAspending Loans Scraper

USAspending Loans Scraper

Export federal direct-loan and guaranteed-loan awards from USAspending by date, agency, program, recipient, and location.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Share

Export federal direct-loan and guaranteed-loan awards from USAspending in a clean dataset.

What does USAspending Loans Scraper do?

USAspending Loans Scraper searches the public USAspending award API for loan awards. It focuses on federal award type codes 07 and 08. Those codes represent direct loans and guaranteed or insured loans. The actor saves normalized rows that are ready for spreadsheets, BI tools, alerts, and compliance workflows.

Who is it for?

Lenders and capital providers

  • 🏦 Track federal direct-loan and loan-guarantee activity by program, state, recipient, and date window.
  • 🧾 Check whether a borrower, partner, or market segment appears in newly reported loan awards.

Government affairs and compliance teams

  • πŸ›οΈ Monitor agencies, sub-agencies, and assistance listings tied to federal lending programs.
  • 🧾 Export recurring evidence for internal compliance reviews, grant/loan exposure checks, and briefing notes.

Public finance and economic development analysts

  • πŸ“Š Build repeatable loan-award datasets for dashboards, policy analysis, and place-based lending research.
  • πŸ—οΈ Compare activity by state, recipient location, performance location, program, and obligation date.

Automation and data teams

  • πŸ€– Pull USAspending loan award rows through the Apify API without maintaining pagination, filtering, or schema normalization code.
  • πŸ” Schedule recurring tasks that feed BI tools, spreadsheets, alerts, and downstream enrichment workflows.

Why use this actor?

The USAspending website is broad and interactive. This actor packages a narrow workflow for loan awards only. You can filter by dates, award type, recipient keyword, state, agency IDs, and assistance listing numbers. The output is one predictable table instead of a website search session.

Data source

The actor uses the public endpoint:

POST https://api.usaspending.gov/api/v2/search/spending_by_award/

No login is required. No API key is required. No browser automation is used. No proxy is used by default.

Loan award scope

  • Direct loans: USAspending award type code 07.
  • Guaranteed or insured loans: USAspending award type code 08.
  • Both loan families can be searched together.

Data fields

FieldDescription
awardIdPublic USAspending award identifier.
generatedInternalIdUSAspending generated internal identifier.
internalIdNumeric internal ID from the API.
recipientNameRecipient name as published by USAspending.
recipientUeiRecipient UEI when available.
awardingAgencyAwarding agency name.
awardingSubAgencyAwarding sub-agency name.
fundingAgencyFunding agency name.
fundingSubAgencyFunding sub-agency name.
loanAwardTypeDirect loan, guaranteed loan, or mixed loan search.
baseObligationDateBase obligation date.
awardAmountAward amount when USAspending returns it.
loanValueLoan value when USAspending returns it.
cfdaNumberAssistance listing / CFDA number.
cfdaTitleAssistance listing title.
recipientStateCodeRecipient state code when available.
placeOfPerformanceStateCodePlace of performance state code when available.
descriptionPublic award description.
scrapedAtTimestamp when the row was saved.

How much does it cost to extract USAspending loan awards?

The actor uses pay-per-event pricing. There is a small start charge per run. Each saved loan award row is charged as one result item. Use maxItems to control cost. Start with a small search, review the data, and increase the limit for recurring monitoring.

EventWhen it is chargedPrice
Run startedOnce per actor run$0.005
Item extractedPer saved loan award row on the Bronze tier$0.000026016

Example cost estimates on the Bronze tier:

Run sizeFormulaEstimated actor charge
10 loan awards$0.005 + 10 Γ— $0.000026016about $0.0053
100 loan awards$0.005 + 100 Γ— $0.000026016about $0.0076
1,000 loan awards$0.005 + 1,000 Γ— $0.000026016about $0.0310

A small free-plan test run is practical because the actor has low compute cost, no proxy requirement, and very small per-item charges. Use maxItems: 10 or maxItems: 100 while tuning filters, then raise the limit only after the dataset matches your workflow.

How to use it

  1. Open the actor on Apify.
  2. Choose a date range.
  3. Select direct loans, guaranteed loans, or both.
  4. Add optional filters such as recipient keyword, state, agency IDs, or CFDA numbers.
  5. Set maxItems.
  6. Run the actor.
  7. Export the dataset as JSON, CSV, Excel, XML, or RSS.

Input options

Date range

Use dateFrom and dateTo in YYYY-MM-DD format. These map to USAspending base obligation dates.

Award type preset

Choose:

  • both
  • direct_loans
  • guaranteed_loans

Recipient keyword

Use recipientSearchText to search names that include a term such as solar, housing, or a company name.

Geography filters

Use two-letter state or territory codes. recipientState filters recipient locations. placeOfPerformanceState filters performance locations.

Agency filters

Use agencyIds for USAspending toptier awarding agency IDs. Leave it empty to search all agencies.

Program filters

Use cfdaNumbers for assistance listing numbers such as 10.766 or 14.021.

Example input

{
"dateFrom": "2024-01-01",
"dateTo": "2024-12-31",
"awardTypePreset": "both",
"maxItems": 100,
"recipientSearchText": "solar",
"recipientState": "CA",
"includeDescriptions": true
}

Example output

{
"awardId": "6660089100",
"recipientName": "ECOSOLAR USA ELECTRICAL LLC",
"awardingAgency": "Small Business Administration",
"loanAwardType": "Loan / loan guarantee",
"baseObligationDate": "2024-12-05",
"cfdaNumber": "59.012",
"sourceApi": "https://api.usaspending.gov/api/v2/search/spending_by_award/"
}

Tips for better results

  • Use a broad date range first to understand volume.
  • Add a recipient keyword when tracking one sector or company family.
  • Use CFDA numbers for program-specific monitoring.
  • Use state filters for local economic development research.
  • Keep maxItems low while tuning a saved task.

Common workflows

Federal loan monitoring

Run the actor monthly for a date window and append the dataset to a tracking table.

Recipient due diligence

Search by recipient keyword and export matching federal loan awards.

Program research

Filter by CFDA numbers to study program activity across agencies and states.

State-level dashboards

Filter by recipient or performance state and load the results into a dashboard.

Integrations

  • Send results to Google Sheets through an Apify integration.
  • Export CSV to a BI pipeline.
  • Trigger a webhook after every recurring monitoring run.
  • Use the dataset API from Python, Node.js, or cURL.
  • Connect the actor to a larger federal-spending monitoring workflow.

API usage: Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/usaspending-loans-scraper').call({
dateFrom: '2024-01-01',
dateTo: '2024-12-31',
awardTypePreset: 'guaranteed_loans',
maxItems: 100
});
console.log(run.defaultDatasetId);

API usage: Python

from apify_client import ApifyClient
import os
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/usaspending-loans-scraper').call(run_input={
'dateFrom': '2024-01-01',
'dateTo': '2024-12-31',
'awardTypePreset': 'both',
'maxItems': 100,
})
print(run['defaultDatasetId'])

API usage: cURL

curl -X POST "https://api.apify.com/v2/acts/automation-lab~usaspending-loans-scraper/runs?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"dateFrom":"2024-01-01","dateTo":"2024-12-31","awardTypePreset":"both","maxItems":100}'

MCP integration

Use this actor from Claude tools through the Apify MCP server.

MCP URL:

https://mcp.apify.com/?tools=automation-lab/usaspending-loans-scraper

Claude Code setup:

$claude mcp add apify-usaspending-loans "https://mcp.apify.com/?tools=automation-lab/usaspending-loans-scraper"

Claude Desktop JSON config:

{
"mcpServers": {
"apify-usaspending-loans": {
"url": "https://mcp.apify.com/?tools=automation-lab/usaspending-loans-scraper"
}
}
}

Example prompts:

  • "Run USAspending Loans Scraper for guaranteed loans in California this year."
  • "Find federal loan awards for recipients matching solar and summarize the agencies."
  • "Export the latest 100 direct-loan awards and group them by assistance listing."

Automation ideas

  • Schedule a monthly run for each state in your territory.
  • Alert when a tracked recipient appears in a new federal loan award.
  • Maintain a historical table of guaranteed loan awards by agency.
  • Compare loan activity before and after a policy change.

Limitations

The actor returns what the public USAspending API returns. Some recipient or location fields can be null. Some records have redacted or abbreviated descriptions. Award amounts and loan values can differ by award type and reporting rules.

Troubleshooting

Why did I get zero items?

Your filters may be too narrow. Remove recipient, agency, state, or CFDA filters and try a broader date range.

Why are some fields null?

USAspending does not populate every field for every award type. Null values are preserved so the dataset reflects the source.

Why is the description long?

USAspending award descriptions often contain program language. Set includeDescriptions to false if you do not need that text.

Legality and compliance

This actor uses a public government API. You are responsible for using the data according to applicable laws, policies, and USAspending terms. Do not use public award data to make decisions that require additional verification without checking official source records.

Explore other automation-lab public-data actors at:

Changelog

  • Initial version: focused USAspending direct-loan and guaranteed-loan award extraction.

Support

If you need an additional filter or field from USAspending, open an issue on the actor page with an example award or query.

FAQ

Does this actor scrape website pages?

No. It calls the public USAspending API directly.

Does it need a proxy?

No proxy is used by default.

Can it run on a schedule?

Yes. Create an Apify task with your saved input and schedule it daily, weekly, or monthly.

Can I export to CSV?

Yes. Use the Apify dataset export options after the run.

Can I monitor a single company?

Yes. Use recipientSearchText with a company or organization name.