Search US federal contract awards
Search US federal contract awards by recipient, keyword, NAICS, PSC and state: amount, agency, dates, codes and places, up to 100 a page with a cursor.
Headers
Get your API keyAPI key (`sfk_...`)
Company or organisation name, matched as text against the recipient's legal name, e.g. `Lockheed Martin`. Contracts are filed under legal names: `Space Exploration Technologies` finds SpaceX, `SpaceX` does not.
min 2 chars · max 120 chars
Text matched against award descriptions, e.g. `cybersecurity`. 3 to 120 characters.
min 3 chars · max 120 chars
NAICS industry codes, comma-separated, up to 20. Each has 2, 4 or 6 digits; a shorter code covers its whole family, e.g. `4811` (scheduled air transport) or `54`.
Federal product and service codes (PSC), comma-separated, up to 20. 1 to 4 characters; a shorter code covers its family, e.g. `D3` (IT services) or `R425`.
Only contracts performed in this state, as a two-letter USPS code, e.g. `VA`.
one of: AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, AS, GU, MP, PR, VI
`all` (default), `definitive_contract`, `purchase_order`, `delivery_order` or `bpa_call`.
one of: all, bpa_call, purchase_order, delivery_order, definitive_contract
Start of the window, `YYYY-MM-DD`, not before `2007-10-01`. A contract matches when it had activity in the window. Without `from` and `to`: the latest US federal fiscal year (1 October to 30 September) that ended at least 90 days ago. With only `from`: to today.
pattern: ^\d{4}-\d{2}-\d{2}$
End of the window, `YYYY-MM-DD`. With only `to`: the year up to that day.
pattern: ^\d{4}-\d{2}-\d{2}$
`amount` (default), `start_date`, `end_date` or `recipient`.
one of: amount, start_date, end_date, recipient
`desc` (default) or `asc`.
one of: desc, asc
Contracts per page, 1 to 100. Default 25.
≥ 1 · ≤ 100
Cursor from `page.nextCursor` of the previous response. It only works with the same filters, sort and order.
min 1 chars · max 512 chars
Endpoint-specific response payload.
Start of the window used, `YYYY-MM-DD`.
End of the window used, `YYYY-MM-DD`.
Contracts matching the search; null when the count could not be read this time.
≥ 0
Contracts on this page, in the order asked for.
Unique award id, e.g. `CONT_AWD_N0001917C0001_9700_-NONE-_-NONE-`.
min 1 chars
The contract number (PIID), e.g. `N0001917C0001`.
The award's page on USAspending.gov.
min 1 chars
Contract type.
one of: definitive_contract, purchase_order, delivery_order, bpa_call, other, null
Recipient's legal name.
Recipient's Unique Entity Identifier (UEI).
Total obligated to the award so far, in US dollars (not only within the window).
Total paid out so far, in US dollars, when reported.
What the contract is for.
Start date, `YYYY-MM-DD`.
Current end date, `YYYY-MM-DD`.
Date of the base award's first obligation, `YYYY-MM-DD`.
When the award record last changed, ISO 8601.
Industry (NAICS) code.
The code.
min 1 chars
What the code means.
Product or service code (PSC).
The code.
min 1 chars
What the code means.
A place, as the award records it.
USPS state code; null abroad.
5-digit ZIP code.
ISO 3166-1 alpha-3 country code, e.g. `USA`.
Congressional district number within the state.
A place, as the award records it.
USPS state code; null abroad.
5-digit ZIP code.
ISO 3166-1 alpha-3 country code, e.g. `USA`.
Congressional district number within the state.
Pagination state.
Whether another page exists.
Cursor for the next page; null on the last page.
Where the data comes from and how to credit it when you reuse it.
Who publishes the data, e.g. `Eurostat`.
min 1 chars
The publisher's dataset code, when it has one.
The dataset's title.
When the publisher last updated the data, ISO 8601.
Where the data can be viewed.
The terms the data is published under.
min 1 chars
Credit line the licence asks for when you reuse or publish the data.
min 1 chars
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.
one of: true
When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.
Code example
curl "https://api.socialfetch.dev/v1/economy/government-contracts?recipient=Lockheed%20Martin" \
-H "x-api-key: YOUR_API_KEY"Responses
A page of contract awards.
Government spending
Get US federal spending summed by state, county or country for a date window, filtered by award type, industry (NAICS), product or service (PSC) and keyword.
Importer shipments
Get a US importer's sea shipments by company name: its suppliers, products by HS code, monthly volumes, ports, carriers and latest bills of lading.