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": "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"
}
}
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 contract award identifier
awardAmount number Total award value in USD
awardType string Type of award (e.g., Contract)
awardingAgency string Federal agency issuing the contract
awardingSubAgency string Sub-agency within the awarding agency
recipientName string Company receiving the contract
startDate string Contract start date (YYYY-MM-DD)
endDate string Contract end date (YYYY-MM-DD)
description string Plain-text description of the contract scope
naicsCode string NAICS industry classification code
naicsDescription string Human-readable NAICS description
contractAwardType string Specific contract award mechanism
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