Retrieve and analyze federal contract award data by NAICS code using the USAspending.gov API advanced search

domain: usaspending.gov · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. USAspending.gov provides a free public REST API requiring no API key; send a POST to https://api.usaspending.gov/api/v2/search/spending_by_award/ with a JSON body containing filters such as naics_codes, time_period (start_date, end_date), award_type_codes (A, B, C, D for contracts), and agencies.
  2. Parse the results array for each award: award_id, recipient_name, recipient_uei, total_obligation, awarding_agency_name, date_signed, and description fields provide the core award metadata.
  3. For pagination, use the page parameter in the request body and check the hasNext field in the response to determine whether additional pages exist.
  4. To retrieve detailed award information including modifications and subaward data, follow up with GET /api/v2/awards/{awardId}/ using the award_id from the search results.
  5. For bulk downloads of award data, use the POST /api/v2/bulk_download/awards/ endpoint to initiate a file generation job; poll the returned file_url until the status is 'finished', then download the ZIP archive.
  6. Filter by place_of_performance_scope (domestic, foreign) and recipient_location_country_code to scope analysis to US-based performance or specific states.

Known gotchas

Related routes

Look up federal contract awards using the USAspending API
api.usaspending.gov · 6 steps · unrated
Search federal contract and grant award data using the USAspending.gov API
api.usaspending.gov · 5 steps · unrated
Query federal spending award data using the USAspending.gov Advanced Award Search API
government-tax · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans