UK public sector tenders are fully open data. There is no login, no API key and no scraping of HTML: both official portals publish every notice through an OCDS JSON API. This guide shows how to call them from Python, what tends to go wrong, and how to get a daily alert with only the new tenders.

The two portals (you need both)

Portal What it has API endpoint
Find a Tender (FTS) All notices under the Procurement Act 2023 and above-threshold tenders https://www.find-tender.service.gov.uk/api/1.0/ocdsReleasePackages
Contracts Finder Lower-value contracts and notices published under the older rules https://www.contractsfinder.service.gov.uk/Published/Notices/OCDS/Search

If you read only one of them, you miss part of the market. Many SME-friendly contracts are only on Contracts Finder, and the big frameworks are only on Find a Tender.

Step 1: fetch the last 7 days from Find a Tender

import datetime as dt import requests BASE = "https://www.find-tender.service.gov.uk/api/1.0/ocdsReleasePackages" since = (dt.datetime.now(dt.timezone.utc) - dt.timedelta(days=7)).strftime("%Y-%m-%dT%H:%M:%S") url = f"{BASE}?limit=100&updatedFrom={since}" releases = [] while url: pkg = requests.get(url, headers={"Accept": "application/json"}, timeout=60).json() batch = pkg.get("releases", []) if not batch: break releases += batch url = pkg.get("links", {}).get("next") # cursor paging print(len(releases), "notices") 

Contracts Finder works the same way, but the date parameter is called publishedFrom instead of updatedFrom:

CF = "https://www.contractsfinder.service.gov.uk/Published/Notices/OCDS/Search" url = f"{CF}?limit=100&publishedFrom={since}" 

Step 2: flatten OCDS into rows you can use

OCDS is a deep format: the buyer is in parties, the value can be in tender.value, tender.minValue or spread over tender.lots, and the CPV codes sit in two different places. Here is a minimal flattener:

def flat(r): t = r.get("tender", {}) buyer_id = (r.get("buyer") or {}).get("id") buyer = next((p for p in r.get("parties", []) if p.get("id") == buyer_id), {}) cpvs = {t.get("classification", {}).get("id")} for item in t.get("items", []): for c in item.get("additionalClassifications", []): if c.get("scheme") == "CPV": cpvs.add(c.get("id")) value = (t.get("value") or t.get("minValue") or {}).get("amount") if value is None: value = sum((l.get("value") or {}).get("amount", 0) for l in t.get("lots", [])) or None return { "stage": (r.get("tag") or ["?"])[0], # tender, award, planning... "title": t.get("title"), "buyer": buyer.get("name"), "value": value, "deadline": (t.get("tenderPeriod") or {}).get("endDate"), "cpv": sorted(c for c in cpvs if c), "ocid": r.get("ocid"), } rows = [flat(r) for r in releases] 

Step 3: filter for your sector

Neither API filters by keyword or CPV code on the server side, so you filter after download:

import re from datetime import datetime, timezone kw = re.compile(r"\b(software|cloud|cyber)\b", re.I) now = datetime.now(timezone.utc) open_it = [ x for x in rows if x["stage"] in ("tender", "tenderUpdate") and (kw.search(x["title"] or "") or any(c.startswith(("72", "48")) for c in x["cpv"])) and x["deadline"] and datetime.fromisoformat(x["deadline"].replace("Z", "+00:00")) > now ] for x in sorted(open_it, key=lambda x: x["deadline"]): print(x["deadline"][:10], x["value"], x["buyer"], "|", x["title"]) 

Things that will bite you

  • The same notice appears several times. A tender gets a new release when it is amended (tenderUpdate) or awarded (award). De-duplicate by ocid and keep the latest release.
  • Dates come with time zones (2027-01-08T12:00:00+00:00 or Z). Parse them before you compare, or "only open tenders" silently drops everything.
  • Values are not always in tender.value. Framework notices often only have lot values or a minValue.
  • Descriptions contain named contact people and e-mails. If you store or share the data, strip them.
  • Two portals, two parameter names, two notice URL formats. Find a Tender links are https://www.find-tender.service.gov.uk/Notice/<id>. Contracts Finder links come in the tender.documents list.

Daily alerts with only new tenders

The usual setup is a cron job that runs every morning, keeps the IDs it has already seen and sends only the new ones to Slack or e-mail. You need to store state somewhere and re-run when a deadline or value changes.

If you would rather not maintain this, I packaged the whole flow (both portals, flattening, keyword/CPV/value/region/buyer filters, "only open for bids", awards with winning suppliers, and a monitoring mode that returns only new or changed notices) as a ready-to-run tool: UK Tenders Scraper on Apify. It costs $3 per 1,000 notices, and the free Apify credit covers about 1,600 notices a month.

from apify_client import ApifyClient client = ApifyClient("<YOUR_API_TOKEN>") run = client.actor("realrakhat/uk-tenders-scraper").call(run_input={ "sources": ["find-a-tender", "contracts-finder"], "stage": "tender", "daysBack": 7, "keywords": ["software", "cloud", "cyber"], "cpvCodes": ["72", "48"], "onlyOpen": True, }) for item in client.dataset(run["defaultDatasetId"]).iterate_items(): print(item["deadline"], item["valueAmount"], item["buyerName"], item["title"]) 

For EU-wide tenders the same approach works with the TED API (TED Tenders Scraper), and for Ukraine with Prozorro (Prozorro Scraper).

Questions about OCDS fields or a specific filter? Ask in the comments and I will answer.