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:

MethodExample
Bearer token (recommended)Authorization: Bearer YOUR_API_KEY
X-API-Key headerX-API-Key: YOUR_API_KEY
Query parameter?apiKey=YOUR_API_KEY
Legacy query parameter?token=YOUR_API_KEY
ParameterTypeRequiredDescription
symbolstringYesStock ticker symbol (e.g., LMT, RTX)
ParameterTypeRequiredDescription
startDatestringNoStart date (YYYY-MM-DD)
endDatestringNoEnd date (YYYY-MM-DD)
limitintegerNoMaximum 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": "Contract",
"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": "Definitive Contract"
}
]
},
"meta": {
"timestamp": "2026-03-12T12:00:00.000Z"
}
}
FieldTypeDescription
successbooleanWhether the request was successful
data.symbolstringStock ticker symbol
data.namestringCompany name
data.contractsarrayArray of contract award objects
meta.timestampstringResponse timestamp (ISO 8601)
FieldTypeDescription
awardIdstringUnique contract award identifier
awardAmountnumberTotal award value in USD
awardTypestringType of award (e.g., Contract)
awardingAgencystringFederal agency issuing the contract
awardingSubAgencystringSub-agency within the awarding agency
recipientNamestringCompany receiving the contract
startDatestringContract start date (YYYY-MM-DD)
endDatestringContract end date (YYYY-MM-DD)
descriptionstringPlain-text description of the contract scope
naicsCodestringNAICS industry classification code
naicsDescriptionstringHuman-readable NAICS description
contractAwardTypestringSpecific contract award mechanism
CodeErrorDescription
400Bad RequestInvalid symbol or parameters
401UnauthorizedInvalid or missing API key
403ForbiddenAuthenticated, but not authorized to access this resource
404Not FoundTicker not found
429Too Many RequestsRate limit exceeded — wait and retry
500Internal Server ErrorServer-side error