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/search

Search federal government contracts from USASpending.gov. Supports filtering by recipient, agency, amount, industry codes, and date range. Costs 2 credits per request.

Parameters

NameTypeRequiredDescription
recipientstringconditionalContractor/recipient name. At least one of recipient, agency, naics, or psc required.
agencystringnoAwarding agency name (e.g., Department of Defense)
award_typesstringnoComma-separated: A (BPA Call), B (Purchase Order), C (Delivery Order), D (Definitive Contract). Default: C,D
min_amountnumbernoMinimum award amount in dollars
max_amountnumbernoMaximum award amount in dollars
naicsstringnoNAICS industry code (e.g., 325412)
pscstringnoProduct Service Code
start_datestringnoFilter contracts starting after this date (YYYY-MM-DD)
end_datestringnoFilter contracts starting before this date (YYYY-MM-DD)
sortstringnoSort field: Award ID, Recipient Name, Award Amount, Awarding Agency, Start Date, End Date
orderstringnoSort order: asc or desc (default: desc)
pageintegernoPage number (default: 1)
limitintegernoResults per page, max 100 (default: 25)

Example Request

cURL
# 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"
Python
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
)
Node.js
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 }
);
Go
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.