Skip to main content
Piloterr
Back to library

USAspending Search API

Search US federal awards by keyword. award_type selects one group: contract (default), grant, idv, or loan. Amounts are a number plus a display string.

Active1 credit = 1 requestGET/v2/usaspending/search

Endpoint Overview

Detailed documentation, pricing, and usage examples.

OverviewLink to Overview

Search US federal awards. query is a keyword or a usaspending.gov/search URL. award_type selects one group: contract (the default when you omit it), grant, idv, or loan. An award URL returns 400. Use the award endpoint with generated_internal_id from a result.

award_amount is a number and amount_display is the same amount as dollar text, for example 2533788480 and $2,533,788,480.00. This search does not publish a total, so total_results and total_pages are null. Follow pagination.next instead.

QuickstartLink to Quickstart

curl -sS -H "x-api-key: YOUR_API_KEY" "https://api.piloterr.com/v2/usaspending/search?query=software"
curl -sS -H "x-api-key: YOUR_API_KEY" "https://api.piloterr.com/v2/usaspending/search?query=software&page=2"
curl -sS -H "x-api-key: YOUR_API_KEY" "https://api.piloterr.com/v2/usaspending/search?query=education&award_type=grant"

ParametersLink to Parameters

Name Detail
query Required string. Keyword or a usaspending.gov search URL. Example: software. An award URL returns 400.
award_type Optional string. One group: contract (default), grant, idv, or loan. Example: grant.
page Optional integer from 1. Example: 2. Defaults to 1.

Response fieldsLink to Response fields

Name Detail
results[].award_id String or null. PIID or FAIN shown as Award ID.
results[].generated_internal_id String or null. Pass this to the award endpoint. Example: CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-.
results[].recipient_name String or null.
results[].award_amount Number or null. Obligation in dollars, not a formatted string.
results[].amount_display String or null. Same amount with a dollar sign and thousands separators.
results[].description String or null.
results[].awarding_agency String or null.
results[].awarding_sub_agency String or null.
results[].funding_agency String or null.
results[].start_date String or null. YYYY-MM-DD.
results[].end_date String or null.
results[].award_type String or null. Often null on the search card. The award endpoint fills the type description.
results[].city String or null. Place of performance.
results[].state String or null.
results[].naics_code String or null.
results[].psc_code String or null.
results[].url String or null. Award page.
pagination.page Integer.
pagination.per_page Integer. Always 10.
pagination.total_results Null. This search does not return a match count.
pagination.total_pages Null.
pagination.next String or null. Next search URL when another page exists, for example https://www.usaspending.gov/search/?keywords=software&page=2.

PaginationLink to Pagination

10 awards per page, largest amount first within the selected group. total_results and total_pages stay null even when more pages exist. next is a URL when USAspending reports another page, and null on the last page. Call page=2 to continue. Award ids do not repeat between pages. Do not mix groups in one call. award_type=grant searches grants only. Omit it for contracts.

Use casesLink to Use cases

  • A reporter pages federal software contracts and compares award_amount with amount_display.
  • A grant writer searches education with award_type=grant and keeps generated_internal_id for the award endpoint.
  • A procurement desk lists IDVs with award_type=idv and reads recipient_name plus the performance dates.

Error codesLink to Error codes

Name Detail
400 Missing query, a non-usaspending host, an award URL sent to search, or an award_type outside contract, grant, idv, and loan.
404 No awards on that page.
401 Missing API key.
500 The USAspending request failed.

Related APIs

Expand your data capabilities with these complementary tools.

Ready to get started?

Your web scraping API is one click away. Start with +500 credits, no infrastructure to set up, no proxies to manage, and no credit card required.

  • +500 credits
  • No credit card required
  • All endpoints included