The Piloterr USAspending Scraper API lets you extract public data from USAspending as clean, structured JSON — no proxies, headless browsers or HTML parsing to maintain. Endpoints available in production:
- USAspending Award API — Fetch one US federal award by its generated id or by a usaspending.gov award URL.
- USAspending Search API — Search US federal awards by keyword.
Use it for price monitoring, assortment tracking, competitor analysis, product research or catalog enrichment.
| Endpoint | Path | Credits | What you get |
|---|---|---|---|
| USAspending Award API | /v2/usaspending/award |
1 | Fetch one US federal award by its generated id or by a usaspending.gov award URL. Amounts are a number plus a display string. |
| USAspending Search API | /v2/usaspending/search |
1 | Search US federal awards by keyword. award_type selects one group |
- How it works
- USAspending Award API
- USAspending Search API
- Code examples in other languages
- Practical use cases
- Why Piloterr?
- FAQ
- Official SDKs
- Related scrapers
- Support
- Create a free Piloterr account and copy your API key from the dashboard.
- Send a
GET(orPOST) request tohttps://api.piloterr.com/v2/...with the headerx-api-key: YOUR_API_KEY. - Receive structured JSON — Piloterr handles rendering, proxies, retries and parsing.
export PILOTERR_API_KEY="your-api-key"
pip install requests # Python
# TypeScript: Node.js 18+ (native fetch), run with `npx tsx file.ts`Every endpoint accepts both
GET(query string) andPOST(JSON body with the same fields).
Fetch one US federal award by its generated id or by a usaspending.gov award URL. Amounts are a number plus a display string.
GET | POST https://api.piloterr.com/v2/usaspending/award · 1 credit per request · Full reference
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | ✅ | Required. Generated award id or a usaspending.gov/award URL. Example: CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-. |
import json
import os
import requests
response = requests.get(
"https://api.piloterr.com/v2/usaspending/award",
headers={"x-api-key": os.environ["PILOTERR_API_KEY"]},
params={
"query": "CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-.",
},
timeout=120,
)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2, ensure_ascii=False)[:2000])type UsaspendingAward = {
url?: string;
city?: string;
state?: string;
country?: string;
award_id?: string;
category?: string;
end_date?: string;
psc_code?: string;
type_code?: string;
award_type?: string;
naics_code?: string;
start_date?: string;
date_signed?: string;
description?: string;
award_amount?: number;
recipient_uei?: string;
amount_display?: string;
funding_agency?: string;
recipient_name?: string;
subaward_count?: number;
awarding_agency?: string;
psc_description?: string;
naics_description?: string;
awarding_sub_agency?: string;
generated_internal_id?: string;
};
const params = new URLSearchParams({
"query": "CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-.",
});
const response = await fetch(`https://api.piloterr.com/v2/usaspending/award?${params}`, {
headers: { "x-api-key": process.env.PILOTERR_API_KEY! },
});
if (!response.ok) throw new Error(`Piloterr error ${response.status}: ${await response.text()}`);
const data = (await response.json()) as UsaspendingAward;
console.log(JSON.stringify(data, null, 2).slice(0, 2000));POST variant
POST https://api.piloterr.com/v2/usaspending/award
x-api-key: YOUR_API_KEY
Content-Type: application/json
{"query": "CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-."}Example response from the API reference, abridged — real values depend on the page you scrape.
{
"url": "https://www.usaspending.gov/award/CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-/",
"city": "BALTIMORE",
"state": "MD",
"country": "UNITED STATES",
"award_id": "GSFC0198106DNAS526555",
"category": "contract",
"end_date": "2026-10-31",
"psc_code": "AR21",
"type_code": "D",
"award_type": "DEFINITIVE CONTRACT",
"naics_code": "333314",
"start_date": "1987-09-15",
"date_signed": "1987-09-15",
"description": "THE PRIMARY ACTIVITIES COVERED BY THIS EFFORT INCLUDE THE FINAL SERVICING MISSION AND SUBSEQUENT OPERATIONS THROUGH END-OF-MISSION. THESE…",
"award_amount": 2533788480,
"recipient_uei": "W1NBN156CYF9",
"amount_display": "$2,533,788,480.00",
"funding_agency": "National Aeronautics and Space Administration",
"recipient_name": "ASSOCIATION OF UNIVERSITIES FOR RESEARCH IN ASTRONOMY, INC.",
"subaward_count": 9,
"awarding_agency": "National Aeronautics and Space Administration",
"psc_description": "R&D- SPACE: SCIENCE/APPLICATIONS (BASIC RESEARCH)",
"naics_description": "Optical Instrument and Lens Manufacturing",
"awarding_sub_agency": "National Aeronautics and Space Administration",
"generated_internal_id": "CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-"
}| Field | Type | Description |
|---|---|---|
url |
string | |
city |
string | |
state |
string | |
country |
string | |
award_id |
string | |
category |
string | |
end_date |
string | |
psc_code |
string | |
type_code |
string | |
award_type |
string | |
naics_code |
string | |
start_date |
string | |
date_signed |
string | |
description |
string | |
award_amount |
integer | |
recipient_uei |
string | |
amount_display |
string | |
funding_agency |
string | |
recipient_name |
string | |
subaward_count |
integer | |
awarding_agency |
string | |
psc_description |
string | |
naics_description |
string | |
awarding_sub_agency |
string | |
generated_internal_id |
string |
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.
GET | POST https://api.piloterr.com/v2/usaspending/search · 1 credit per request · Full reference
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | ✅ | Required. Keyword or a usaspending.gov search URL. Example: software. An award URL returns 400. |
award_type |
string | — | Optional. One group: contract (default when omitted), grant, idv, or loan. Example: grant. |
page |
number | — | Optional. Page number from 1. Example: 2. Defaults to 1. Each page has 10 awards. total_results stays null. |
import json
import os
import requests
response = requests.get(
"https://api.piloterr.com/v2/usaspending/search",
headers={"x-api-key": os.environ["PILOTERR_API_KEY"]},
params={
"query": "software. An award URL returns 400.",
},
timeout=120,
)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2, ensure_ascii=False)[:2000])type UsaspendingSearch = {
results?: {
url?: string;
city?: unknown;
state?: unknown;
award_id?: string;
end_date?: string;
psc_code?: unknown;
award_type?: unknown;
naics_code?: unknown;
start_date?: string;
description?: string;
award_amount?: number;
amount_display?: string;
funding_agency?: string;
recipient_name?: string;
awarding_agency?: string;
awarding_sub_agency?: string;
generated_internal_id?: string;
}[];
pagination?: {
next?: string;
page?: number;
per_page?: number;
total_pages?: unknown;
total_results?: unknown;
};
};
const params = new URLSearchParams({
"query": "software. An award URL returns 400.",
});
const response = await fetch(`https://api.piloterr.com/v2/usaspending/search?${params}`, {
headers: { "x-api-key": process.env.PILOTERR_API_KEY! },
});
if (!response.ok) throw new Error(`Piloterr error ${response.status}: ${await response.text()}`);
const data = (await response.json()) as UsaspendingSearch;
console.log(JSON.stringify(data, null, 2).slice(0, 2000));POST variant
POST https://api.piloterr.com/v2/usaspending/search
x-api-key: YOUR_API_KEY
Content-Type: application/json
{"query": "software. An award URL returns 400."}Example response from the API reference, abridged — real values depend on the page you scrape.
{
"results": [
{
"url": "https://www.usaspending.gov/award/CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-/",
"city": null,
"state": null,
"award_id": "GSFC0198106DNAS526555",
"end_date": "2026-10-31",
"psc_code": null,
"award_type": null,
"naics_code": null,
"start_date": "1987-09-15",
"description": "THE PRIMARY ACTIVITIES COVERED BY THIS EFFORT INCLUDE THE FINAL SERVICING MISSION AND SUBSEQUENT OPERATIONS THROUGH END-OF-MISSION. THESE…",
"award_amount": 2533788480,
"amount_display": "$2,533,788,480.00",
"funding_agency": "National Aeronautics and Space Administration",
"recipient_name": "ASSOCIATION OF UNIVERSITIES FOR RESEARCH IN ASTRONOMY, INC.",
"awarding_agency": "National Aeronautics and Space Administration",
"awarding_sub_agency": "National Aeronautics and Space Administration",
"generated_internal_id": "CONT_AWD_GSFC0198106DNAS526555_8000_-NONE-_-NONE-"
}
],
"pagination": {
"next": "https://www.usaspending.gov/search/?keywords=software&page=2",
"page": 1,
"per_page": 10,
"total_pages": null,
"total_results": null
}
}| Field | Type | Description |
|---|---|---|
results[] |
object[] | |
results[].url |
string | |
results[].city |
object | |
results[].state |
object | |
results[].award_id |
string | |
results[].end_date |
string | |
results[].psc_code |
object | |
results[].award_type |
object | |
results[].naics_code |
object | |
results[].start_date |
string | |
results[].description |
string | |
results[].award_amount |
integer | |
results[].amount_display |
string | |
results[].funding_agency |
string | |
results[].recipient_name |
string | |
results[].awarding_agency |
string | |
results[].awarding_sub_agency |
string | |
results[].generated_internal_id |
string | |
pagination |
object | |
pagination.next |
string | |
pagination.page |
integer | |
pagination.per_page |
integer | |
pagination.total_pages |
object | |
pagination.total_results |
object |
Ready-to-run examples live in the examples/ folder. Each one reads your key from the PILOTERR_API_KEY environment variable.
| Language | Award | Search |
|---|---|---|
| cURL (Bash) | award |
search |
| PHP | award |
search |
| C# | award |
search |
| Go | award |
search |
| Java | award |
search |
| Ruby | award |
search |
| Node.js | award |
search |
- Price monitoring — Track prices, promotions and availability over time to react to competitors.
- Assortment & catalog tracking — Follow new products, delisted items and category changes.
- Competitor analysis — Benchmark ranges, brands and positioning across retailers.
- Product research — Spot best-sellers and trends from search results.
- Catalog enrichment — Pull titles, images and attributes into your PIM or marketplace listings.
- No infrastructure — no proxies, headless browsers or CAPTCHA solving to run yourself.
- Structured JSON — stable, documented fields instead of brittle HTML selectors.
- Pay per request — transparent credit cost per endpoint, failed requests are retried for you.
- One API key, hundreds of sources — USAspending plus many other e-commerce, search and company data endpoints in the Piloterr library.
- Any language — plain HTTPS + JSON, with examples for Python, TypeScript, cURL, PHP, C#, Go, Java, Ruby and Node.js.
Collecting publicly available data is generally allowed in many jurisdictions, but rules depend on your country, the data you collect and how you use it. Avoid personal data unless you have a lawful basis, respect the website's terms where they apply, and get legal advice for your specific use case. This is not legal advice.
No. Piloterr handles rendering, proxy rotation and retries on its side. You only send an HTTPS request with your x-api-key header and receive JSON.
Credits per call: /v2/usaspending/award 1, /v2/usaspending/search 1. See the Piloterr website for plans.
Each endpoint returns structured JSON: USAspending Award — url, city, state, country, award_id, category; USAspending Search — results[], results[].url, results[].city, results[].state, results[].award_id, results[].end_date.
Use the page parameter and keep requesting while the response indicates more results.
Any language that can make an HTTP request. This README shows Python and TypeScript; the examples/ folder contains cURL, PHP, C#, Go, Java, Ruby and Node.js.
Use Piloterr from your own language with a typed client:
| SDK | Package | Install |
|---|---|---|
| Node.js | @piloterr/sdk |
npm install @piloterr/sdk |
| Python | piloterr |
pip install piloterr |
| Go | piloterr-go |
go get github.com/piloterr/piloterr-go |
| .NET | Piloterr |
dotnet add package Piloterr |
| Ruby | piloterr |
gem install piloterr |
| PHP | piloterr/sdk |
composer require piloterr/sdk |
| Java | piloterr-java |
build from source, see its README |
| CLI | @piloterr/cli |
npm install -g @piloterr/cli |
| MCP server | @piloterr/mcp |
npx -y @piloterr/mcp |
- About You Scraper API
- Action Scraper API
- Aldi Scraper API
- Alibaba Scraper API
- AliExpress Scraper API
- Allegro Scraper API
- All Piloterr scrapers on GitHub
- 💬 Join the Piloterr Discord to ask questions and share what you build.
- 📚 Browse the API reference (OpenAPI) and the Piloterr library.
- 🔑 Get your API key.
Built by Piloterr — web scraping APIs for e-commerce, search, real estate and more, one API key.
USAspending is a trademark of its respective owner. This repository is not affiliated with or endorsed by USAspending. Examples are released under the MIT license.
