How to export US federal (SAM.gov) and UK (Contracts Finder) tenders to CSV or JSON
Updated 2026-10-28 ยท Tool used: SAM.gov & UK Contracts Finder Tenders Scraper on Apify ยท Price: $2.50 per 1,000 notices; empty or failed runs and notices skipped as already seen are free
SAM.gov lists every US federal contract opportunity and Contracts Finder lists UK public sector contracts above the publishing thresholds, but both websites are built for browsing one notice at a time, and their search pages don't give you a clean export or alerts with your own filters.
This guide shows how to pull both through their official APIs (SAM.gov Get Opportunities Public API and the Contracts Finder OCDS search under the Open Government Licence) into one table with the same columns: title, buyer, publication and deadline dates, open/closed flag, estimated value and currency, NAICS or CPV code, procedure and notice type, and a direct notice URL.
Open SAM.gov & UK Contracts Finder Tenders Scraper on Apify โSteps
- Pick
sources:contracts-finderneeds no key;sam.govneeds a free public API key from your SAM.gov Account Details page, pasted intosamApiKey. - Add
keywords(matched against titles, and UK descriptions), apublishedWithinDayswindow andmaxResults. For SAM.gov you can also filter bysamNaicsCode,samStateand procurement type; for the UK by stage (planning, tender, award). - Run it and export the dataset as CSV or Excel, or turn on
onlyNewwith astateKeyand schedule it daily for an alert feed of new notices only.
Example input
{
"sources": [
"contracts-finder"
],
"keywords": [
"software"
],
"publishedWithinDays": 14,
"maxResults": 50,
"cfStages": [
"tender"
]
}
Example output (one item, shortened)
{
"source": "contracts-finder",
"noticeId": "ocds-b5fd17-eba856aa-b8d6-4d73-b794-8420ea10a3d9",
"solicitationNumber": "68f9f9f5-5a6f-47df-ae77-6b1aceb3f7ea",
"title": "CA18543 - Northampton College - Media planning & Buying Services",
"description": "Northampton College is seeking to appoint an experienced media planning and buying agency...",
"publicationDate": "2026-10-09",
"deadlineDate": "2026-11-04",
"isOpen": true,
"buyerName": "Northampton College",
"buyerCountry": "United Kingdom",
"estimatedValue": 250000,
"currency": "GBP",
"noticeUrl": "https://www.contractsfinder.service.gov.uk/Notice/d2301388-4ca6-48fc-805d-eb2e5793377e",
"documentsUrl": "https://www.contractsfinder.service.gov.uk/Notice/d2301388-4ca6-48fc-805d-eb2e5793377e",
"cpvOrNaics": "79340000",
"naicsCode": null,
"classificationCode": "79340000",
"procedureType": "Open procedure",
"noticeType": "tender",
"setAside": null,
"placeOfPerformance": null,
"scrapedAt": "2026-10-10T07:05:00.000Z"
}
Every run's dataset can be downloaded as JSON, CSV, Excel, XML or HTML from the Apify Console, or via https://api.apify.com/v2/datasets/<datasetId>/items?format=csv.
Run it from code
Python
from apify_client import ApifyClient # pip install apify-client
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run_input = {
"sources": [
"contracts-finder"
],
"keywords": [
"software"
],
"publishedWithinDays": 14,
"maxResults": 50,
"cfStages": [
"tender"
]
}
run = client.actor("tinyrex/us-uk-tenders-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)JavaScript / Node.js
import { ApifyClient } from 'apify-client'; // npm i apify-client
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('tinyrex/us-uk-tenders-scraper').call({
"sources": [
"contracts-finder"
],
"keywords": [
"software"
],
"publishedWithinDays": 14,
"maxResults": 50,
"cfStages": [
"tender"
]
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);curl (no SDK)
# Runs the actor and returns the results directly (CSV here; use format=json for JSON)
curl -X POST "https://api.apify.com/v2/acts/tinyrex~us-uk-tenders-scraper/run-sync-get-dataset-items?format=csv" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"sources": ["contracts-finder"], "keywords": ["software"], "publishedWithinDays": 14, "maxResults": 50, "cfStages": ["tender"]}' > results.csv
Get your API token in Apify Console โ Settings โ API & Integrations. The free Apify plan includes monthly credit that is enough to try this.
Use it from an AI agent (MCP)
The Apify MCP server exposes this actor as a tool for Claude, Cursor, VS Code, n8n and other MCP clients. Add this to your client's MCP config (or use the OAuth flow at mcp.apify.com instead of a token):
{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=tinyrex/us-uk-tenders-scraper",
"headers": {
"Authorization": "Bearer <YOUR_APIFY_TOKEN>"
}
}
}
}
Then ask in plain language, e.g. "Sam.gov api export for this list and give me a table".
Pricing
Pay per result: $2.50 per 1,000 notices; empty or failed runs and notices skipped as already seen are free. You can cap the cost of every run in the run options.
FAQ
Is there an API for SAM.gov contract opportunities?
Yes. GSA publishes the Get Opportunities Public API; you need a free public API key from your SAM.gov account. The actor calls that API with your key, so you get the same notices as the website, as clean rows.
Does UK Contracts Finder have an API?
Yes. Contracts Finder offers an OCDS (Open Contracting Data Standard) notice search that needs no key. Its data is published under the Open Government Licence v3.0, which allows commercial reuse with attribution.
How do I get alerts for new government tenders?
Turn on onlyNew, give each saved search its own stateKey and add a daily Schedule. Each run returns only notices it has not returned before, and the skipped ones are free. Send the rows to Google Sheets, email or Slack from the Integrations tab.
What does it cost?
$0.0025 per notice ($2.50 per 1,000). A run that finds nothing, fails, or only sees notices it already returned costs only the tiny start fee.
Try it on Apify โMore guides
- Bulk tech stack lookup: a Wappalyzer / BuiltWith alternative for thousands of domains
- How to scrape Greenhouse, Lever and Ashby jobs (plus Personio, Teamtailor, Recruitee)
- How to export all products from any Shopify store to CSV or JSON
- How to scrape jobs from Workday career sites (myworkdayjobs.com)
- How to export products from any WooCommerce store to CSV or JSON
- How to export EU public tenders from TED (Tenders Electronic Daily) to CSV or JSON
- How to scrape remote jobs from Himalayas, Remote OK, We Work Remotely and more in one run
- How to export open EU funding calls (Horizon Europe, Digital Europe, cascade funding) to CSV or JSON
- How to turn any RSS or Atom feed into JSON or CSV (bulk, with monitoring)
- How to extract emails, phone numbers and social links from a list of company domains
- How to take bulk website screenshots from a URL list and save them to CSV or Google Drive
- How to look up French companies by SIREN or SIRET and build a B2B list from Sirene
- How to look up Norwegian companies by organisation number and build lead lists from Brreg
- How to download SEC filings (10-K, 10-Q, 8-K, Form 4) by ticker and search EDGAR full text
- How to validate NPI numbers in bulk and build US healthcare provider lists from NPPES
- How to look up hundreds of UK companies on Companies House at once (profile, officers, PSC)
- How to look up Finnish companies by Y-tunnus and build B2B lead lists from the YTJ register
- How to extract all URLs from a website's sitemap (and find broken links)
- How to transcribe hundreds of audio and video files to text and subtitles with Whisper
- How to extract text from hundreds of PDFs, including scanned ones, in one run
- How to clean an email list before a campaign: bulk MX, disposable and typo check
- How to get Dutch public tenders from TenderNed into a spreadsheet, with daily alerts
- How to audit titles, meta descriptions, H1s and canonicals for hundreds of pages at once
- How to find every broken link and redirect on a website, with the pages to fix
- How to validate LEI codes and find the LEI for a list of companies in bulk
- How to run Lighthouse on hundreds of URLs and get Core Web Vitals in one table