API Reference
Government Contracts
Search federal government contracts from USASpending.gov. Filter by recipient, agency, amount, industry codes, and date range.
Endpoint
GET /api/v1/contracts/searchSearch federal government contracts from USASpending.gov. Supports filtering by recipient, agency, amount, industry codes, and date range. Costs 2 credits per request.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
recipient | string | conditional | Contractor/recipient name. At least one of recipient, agency, naics, or psc required. |
agency | string | no | Awarding agency name (e.g., Department of Defense) |
award_types | string | no | Comma-separated: A (BPA Call), B (Purchase Order), C (Delivery Order), D (Definitive Contract). Default: C,D |
min_amount | number | no | Minimum award amount in dollars |
max_amount | number | no | Maximum award amount in dollars |
naics | string | no | NAICS industry code (e.g., 325412) |
psc | string | no | Product Service Code |
start_date | string | no | Filter contracts starting after this date (YYYY-MM-DD) |
end_date | string | no | Filter contracts starting before this date (YYYY-MM-DD) |
sort | string | no | Sort field: Award ID, Recipient Name, Award Amount, Awarding Agency, Start Date, End Date |
order | string | no | Sort order: asc or desc (default: desc) |
page | integer | no | Page number (default: 1) |
limit | integer | no | Results per page, max 100 (default: 25) |
Example Request
# All Pfizer contracts over $1M
curl "https://filed.dev/api/v1/contracts/search?recipient=Pfizer&min_amount=1000000" \
-H "Authorization: Bearer fd_live_aBcDeFgH"
# DoD contracts over $10M, sorted by amount
curl "https://filed.dev/api/v1/contracts/search?agency=Department+of+Defense&min_amount=10000000&sort=Award+Amount&order=desc" \
-H "Authorization: Bearer fd_live_aBcDeFgH"import requests
headers = {"Authorization": "Bearer fd_live_aBcDeFgH"}
# By recipient
resp = requests.get(
"https://filed.dev/api/v1/contracts/search",
params={"recipient": "Pfizer", "min_amount": 1000000},
headers=headers
)
# By agency
resp = requests.get(
"https://filed.dev/api/v1/contracts/search",
params={
"agency": "Department of Defense",
"min_amount": 10000000,
"sort": "Award Amount",
"order": "desc"
},
headers=headers
)const headers = { Authorization: "Bearer fd_live_aBcDeFgH" };
// By recipient
const res = await fetch(
"https://filed.dev/api/v1/contracts/search?recipient=Pfizer&min_amount=1000000",
{ headers }
);
// By agency
const res2 = await fetch(
"https://filed.dev/api/v1/contracts/search?agency=Department+of+Defense&min_amount=10000000&sort=Award+Amount&order=desc",
{ headers }
);req, _ := http.NewRequest("GET",
"https://filed.dev/api/v1/contracts/search?recipient=Pfizer&min_amount=1000000", nil)
req.Header.Set("Authorization", "Bearer fd_live_aBcDeFgH")
resp, _ := http.DefaultClient.Do(req)Response
{
"data": [
{
"awardId": "W58P0524D0020",
"recipientName": "PFIZER INC.",
"amount": 787274.80,
"awardingAgency": "Department of Defense",
"awardingSubAgency": "Defense Health Agency",
"startDate": "2025-08-26",
"endDate": "2026-08-25",
"awardType": "Definitive Contract",
"description": "PHARMACEUTICAL PRODUCTS",
"naicsCode": "325412",
"naicsDescription": "Pharmaceutical Preparation Manufacturing",
"pscCode": "6505"
}
],
"meta": {
"page": 1,
"pageSize": 25,
"hasNext": true,
"source": "USASpending.gov"
}
}Try It
Test this endpoint in the Playground.