# Belgium e-Procurement Tenders Scraper: BOSA Notices (`badboxx_newlife/belgium-eprocurement-tenders`) Actor

- **URL**: https://apify.com/badboxx_newlife/belgium-eprocurement-tenders.md
- **Developed by:** [Francesco Correnti](https://apify.com/badboxx_newlife) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Monitor Belgian public procurement: Benelux and EU bid teams, consultants and suppliers track new overheidsopdrachten / marchés publics on BOSA e-Procurement (publicprocurement.be) by keyword, CPV, NUTS region, buyer, notice type or date, as clean rows.

Live sample, pulled 2026-11-06 (`noticeTypes: ["16","17"]`, `publishedFrom: 2026-11-01`), 12 rows in `sample.json`:

| noticeId | title | buyer | KBO/BCE no. | mainCpv | published | noticeUrl |
|---|---|---|---|---|---|---|
| 46fa7ef2-35cd-4749-8bf5-947022aecc77 | Cahier Spécial des Charges n°57/53/4/26/083 - Ligne 43 : Riv | Infrabel Projects South | 0869763267 | 45220000 | 2026-11-06 | https://www.publicprocurement.be/publication-workspaces/46fa7ef2-35cd-4749-8bf5-947022aecc77/general |
| 62361823-708a-40ff-93ba-519ab050b2cf | Zuidijzerpolder: Onderhoudswerken aan onbevaarbare waterlope | ZUIDIJZERPOLDER | 0851235970 | 45240000 | 2026-11-06 | https://www.publicprocurement.be/publication-workspaces/62361823-708a-40ff-93ba-519ab050b2cf/general |
| 7291a5d2-15ff-48ee-a598-4b73b8ccca8b | 57/53/4/26/145 L166 : Gedinne -Bertrix Commune de Bertrix En | Infrabel Projects South | 0869763267 | 45000000 | 2026-11-06 | https://www.publicprocurement.be/publication-workspaces/7291a5d2-15ff-48ee-a598-4b73b8ccca8b/general |
| 2bc73dfb-4ddd-4b39-a50c-3a8bbbe1d35c | Achat d'un camion d'occasion équipé d'une plate-forme élévat | Stadt Sankt Vith | 0207078568 | 34137000 | 2026-11-05 | https://www.publicprocurement.be/publication-workspaces/2bc73dfb-4ddd-4b39-a50c-3a8bbbe1d35c/general |
| b1859abc-4fc0-4904-aa8a-f8ba389be4fb | Slibruiming van de Aa te Vorselaar en Lille | Vlaamse Milieumaatschappij | 0887290276 | 45246000 | 2026-11-05 | https://www.publicprocurement.be/publication-workspaces/b1859abc-4fc0-4904-aa8a-f8ba389be4fb/general |

Text is kept as served (NL/FR/DE/EN). `title` is the first available in the order EN > NL > FR > DE, `language` says which; `titles` has every language version. Empty values (`null`) are not published by the buyer.

### Input

| field | example | meaning |
|---|---|---|
| `keywords` | `"informatique"` | free-text search |
| `cpv` | `["72000000"]` | list of 8-digit CPV codes |
| `noticeTypes` | `["16","17"]` | BOSA notice subtype codes (16/17 contract notices, 20 modification, E1-E6 eForms); empty = all |
| `location` | `"BE10"` | Belgian NUTS code (BE10 Brussels, BE2 Flanders, BE3 Wallonia, BE332 Liège) |
| `buyer` | `"Infrabel"` | buyer name contains (filtered client-side) |
| `publishedFrom` / `publishedTo` | `"2026-10-01"` | publication date range, `YYYY-MM-DD` |
| `deadlineFrom` | `"2026-11-10"` | tender deadline on or after (server-side; notices without deadline drop out) |
| `includeDetails` | `true` | default true; one extra request per notice for KBO/BCE number, value, documents link |
| `maxItems` | `50` | default 50, max 1000 |

Newest first.

### Output

| field | meaning |
|---|---|
| `noticeId` | BOSA publication workspace id (UUID, unique) |
| `referenceNumber` | buyer's file reference |
| `title`, `titles`, `language`, `languages` | title (EN>NL>FR>DE), all title versions {lang: text}, chosen language, publication languages |
| `description` | as served; e-mail addresses stripped |
| `buyerName`, `buyerOrgNumber` | buyer and Belgian KBO/BCE company number (10 digits; needs `includeDetails`) |
| `noticeType`, `procedureType`, `nature`, `status` | e.g. 16, OPEN, WORKS/SUPPLIES/SERVICES, ACTIVE |
| `cpvCodes` (array), `mainCpv` | 8-digit CPV |
| `nutsCodes` | NUTS codes |
| `estimatedValue`, `currency` | only when the notice states a value (needs `includeDetails`); mostly `null` |
| `publicationDate`, `deadline` | date / local timestamp |
| `noticeUrl`, `documentsUrl` | publicprocurement.be page, tender documents link (needs `includeDetails`) |
| `scrapedAt` | ISO timestamp |

### Pricing

Pay per event: $0.005 per start (`actor-start`) + $0.002 per notice (`notice`). Example: 1000 notices = $0.005 + 1000 x $0.002 = $2.005. The run stops cleanly at your spending cap; nothing is pushed beyond `maxItems`.

### Source and limits

Step 0 findings (2026-11-06): publicprocurement.be is a Vue SPA calling its own JSON APIs (no registration, no captcha). Plain calls without a token get 403; the SPA first takes an anonymous visitor token, which the actor does the same way:

- `GET https://www.publicprocurement.be/env.config.js` publishes the public frontend client id/secret.
- `POST https://www.publicprocurement.be/auth/realms/supplier/protocol/openid-connect/token` (`grant_type=client_credentials`, Basic auth with that public client) -> 200, 1 h visitor token. No account or private key involved.
- `POST https://www.publicprocurement.be/api/sea/search/publications` -> 200. Body `{terms, cpvCodes, nutsCodes, noticeSubtypes, publicationDateFrom/To, tenderSubmissionDeadlineFrom/To, page, pageSize<=100}`, needs `Authorization: Bearer` + `BelGov-Trace-Id`.
- `GET https://www.publicprocurement.be/api/dos/publication-workspaces/{noticeId}` -> 200 (eForms XML: KBO/BCE number, documents URL, deadline).

Limits: unofficial API that can change; the visitor-token route relies on the site's public client, so it may be closed without notice; buyer filter applies after the search; the source rarely states estimated values; max 1000 items per run. No proxy.

### Business data only

Buyer organisation, notice, CPV, value, dates and URLs. Contact persons, personal e-mails and phones are not read or output.

### Run / test

`python3 check.py` (offline against `fixtures/belgium.json`, real BOSA responses; asserts query mapping, maxItems, PPE charge counts, no personal data). `python3 check.py --live` makes 1 real search request, needs 5+ notices (last result: `live.log`, 2026-11-06). Run: put input in `storage/key_value_stores/default/INPUT.json`, `node src/main.js`.

### Publishing

`publish.py --noruns` (needs `APIFY_TOKEN`) creates/updates the actor without test runs. Not run: #469's publish.py was not run either, so this one is ready, not published.

# Actor input Schema

## `keywords` (type: `string`):

Free-text search on publicprocurement.be (Dutch, French or English terms). Example: informatique.

## `cpv` (type: `array`):

8-digit CPV codes. Example: 72000000.

## `noticeTypes` (type: `array`):

BOSA notice subtype codes, e.g. 16 and 17 (contract notices), 20 (modification), E3 (concession), E1/E4 (framework/other). Empty = all.

## `location` (type: `string`):

Belgian NUTS code. Example: BE10 (Brussels), BE2 (Flanders), BE3 (Wallonia), BE332 (Liège).

## `buyer` (type: `string`):

Keep only notices whose buyer name contains this text. Example: Infrabel.

## `publishedFrom` (type: `string`):

Publication date on or after, YYYY-MM-DD. Example: 2026-10-01.

## `publishedTo` (type: `string`):

Publication date on or before, YYYY-MM-DD. Example: 2026-11-06.

## `deadlineFrom` (type: `string`):

Keep only notices with a tender deadline on or after this date, YYYY-MM-DD. Example: 2026-11-10.

## `includeDetails` (type: `boolean`):

Fetch each notice for buyer KBO/BCE number, estimated value and documents link (one extra request per item). Example: true.

## `maxItems` (type: `integer`):

Maximum notices returned; you pay per notice, so this caps cost. Example: 50.

## Actor input object example

```json
{
  "keywords": "informatique",
  "cpv": [
    "72000000"
  ],
  "publishedFrom": "2026-10-01",
  "includeDetails": true,
  "maxItems": 50
}
```

# Actor output Schema

## `notices` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": "informatique",
    "cpv": [
        "72000000"
    ],
    "publishedFrom": "2026-10-01",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("badboxx_newlife/belgium-eprocurement-tenders").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": "informatique",
    "cpv": ["72000000"],
    "publishedFrom": "2026-10-01",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("badboxx_newlife/belgium-eprocurement-tenders").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": "informatique",
  "cpv": [
    "72000000"
  ],
  "publishedFrom": "2026-10-01",
  "maxItems": 50
}' |
apify call badboxx_newlife/belgium-eprocurement-tenders --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,badboxx_newlife/belgium-eprocurement-tenders"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/WszbzZHvfDsj8OnqA/builds/QmtRgrdftcKRchNal/openapi.json
