Skip to content

Government Contracts API

Retrieve federal government contract awards from USAspending.gov mapped to stock tickers. Track contract values, awarding agencies, industry classifications, and contract periods.

GET /v2/government-contracts/{symbol}

The API supports multiple authentication methods:

Method Example
Bearer token (recommended) Authorization: Bearer YOUR_API_KEY
X-API-Key header X-API-Key: YOUR_API_KEY
Query parameter ?apiKey=YOUR_API_KEY
Legacy query parameter ?token=YOUR_API_KEY
Parameter Type Required Description
symbol string Yes Stock ticker symbol (e.g., LMT, RTX)
Parameter Type Required Description
startDate string No Start date (YYYY-MM-DD)
endDate string No End date (YYYY-MM-DD)
limit integer No Maximum number of results to return (1-500)
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.government_contracts.ticker("LMT",
date_from="2025-01-01",
date_to="2025-12-31",
as_dataframe=True)
print(df)
{
"success": true,
"data": {
"symbol": "LMT",
"name": "Lockheed Martin Corporation",
"contracts": [
{
"awardId": "CONT_AWD_0001",
"awardAmount": 50000000,
"awardType": "",
"awardingAgency": "Department of Defense",
"awardingSubAgency": "Department of the Army",
"recipientName": "Lockheed Martin Corporation",
"startDate": "2025-06-01",
"endDate": "2026-06-01",
"description": "Aircraft maintenance services",
"naicsCode": "336411",
"naicsDescription": "Aircraft Manufacturing",
"contractAwardType": ""
}
]
},
"meta": {
"timestamp": "2026-03-12T12:00:00.000Z"
}
}
Field Type Description
success boolean Whether the request was successful
data.symbol string Stock ticker symbol
data.name string Company name
data.contracts array Array of contract award objects
meta.timestamp string Response timestamp (ISO 8601)
Field Type Description
awardId string Unique federal award identifier (records are deduplicated and updated by this key)
awardAmount number Total award value in USD, reflecting the latest reported state of the award
awardType string Present in the schema but not populated by the source award endpoint (empty string)
awardingAgency string Federal agency issuing the contract
awardingSubAgency string Sub-agency within the awarding agency
recipientName string Company receiving the contract
startDate string Period-of-performance start date (YYYY-MM-DD) — the recommended point-in-time anchor for backtests
endDate string Period-of-performance end date (YYYY-MM-DD); may be empty for indefinite-delivery awards
description string Plain-text description of the contract scope
naicsCode string NAICS industry classification code
naicsDescription string Human-readable NAICS description — use this for sector/category classification
contractAwardType string Present in the schema but not populated by the source award endpoint (empty string)
Code Error Description
400 Bad Request Invalid symbol or parameters
401 Unauthorized Invalid or missing API key
403 Forbidden Authenticated, but not authorized to access this resource
404 Not Found Ticker not found
429 Too Many Requests Rate limit exceeded — wait and retry
500 Internal Server Error Server-side error