# France BODACC SIREN Portfolio Event Monitor (`plym-actor-factory/france-bodacc-siren-portfolio-monitor`) Actor

Watch a list of French SIRENs and emit typed BODACC gazette events — insolvency, modifications, radiations, cessions — from official DILA open data (Licence Ouverte). Not a nationwide BODACC dump and not a Pappers directory scrape.

- **URL**: https://apify.com/plym-actor-factory/france-bodacc-siren-portfolio-monitor.md
- **Developed by:** [Daniel Witney](https://apify.com/plym-actor-factory) (community)
- **Categories:** AI, Automation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 bodacc event delivereds

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

## France BODACC SIREN Portfolio Event Monitor

Watch a **book of French SIRENs** and receive **typed BODACC gazette events** the day DILA publishes procédures collectives, modifications, radiations, or cessions for those companies. **Not** a nationwide BODACC dump. **Not** a Pappers / Infogreffe directory scrape. **Not** paid surveillance seats.

### Value proposition

- **SIREN watchlist × daily official BODACC ingest** → `INSOLVENCY_OPENED` (RJ/LJ/sauvegarde subtypes), `MODIFICATION`, `RADIATION`, `CESSION` (optional `IMMATRICULATION` / `DEPOT_COMPTES` off by default).
- Official **DILA BODACC** open data via Opendatasoft (`bodacc-datadila.opendatasoft.com`, **Licence Ouverte 2.0**). Fair-use HTTP pacing. **No Pappers / Infogreffe / Ellisphere key.**
- **Pay only for unique delivered acts on watched SIRENs.** Quiet days ≈ $0. Durable KVS checkpoint + `annonce_id` / `event_uid` dedupe. Events carry official BODACC provenance.

### PRODUCTION USE (required for real monitoring)

> **Store default ≠ product.** Schema defaults use `sourceMode=fixture` so Apify Store daily auto-tests leave a non-empty health dataset **without** calling DILA. That fixture path only writes a non-billable `RUN_STATUS` / `FIXTURE_HEALTH` row. It is **not** BODACC monitoring.

For **production monitoring** you **must**:

1. Set **`sourceMode` = `live`**
2. Provide `sirenNumbers` (9-digit) and optionally `watchlistPairs` as `SIREN|Company name` for display
3. Schedule runs on business days (or use `lookbackDays` for catch-up) with fair-use `requestPaceMs`

Official references:

- [BODACC annonces commerciales (Opendatasoft)](https://bodacc-datadila.opendatasoft.com/explore/dataset/annonces-commerciales/)
- [Licence Ouverte / Open Licence (Etalab)](https://www.etalab.gouv.fr/licence-ouverte-open-licence/)
- API: `https://bodacc-datadila.opendatasoft.com/api/explore/v2.1/catalog/datasets/annonces-commerciales/records`

### Matching note

Official BODACC records publish **registre / SIREN**. Matching is by **SIREN** (exact 9-digit). Company names in `watchlistPairs` are optional display labels. Dirigeant / personne names may appear in statutory gazette text (PII as published).

### Data limitations

- Coverage follows DILA open-data publication lag (usually same day / next business day for new acts).
- Large books: one HTTP query per SIREN per window — raise `maxRunSeconds` / pace carefully; quiet books stay cheap.
- First-seen acts are delivered when they match; duplicates are deduped via `event_uid` / `annonce_id`.
- We cite DILA / bodacc.fr as the data origin. This Actor is not affiliated with or endorsed by DILA, Infogreffe, or Pappers.

### Apify Store daily auto-test / default input

| Field | Default |
|-------|---------|
| `sirenNumbers` | demo SIRENs |
| `eventTypes` | insolvency / modification / radiation / cession (no immatriculation / dpc) |
| `sourceMode` | `fixture` |
| `emitFixtureDemoEvents` | `false` |
| `maxRunSeconds` | `55` |
| `maxEvents` | `500` |

On that path the Actor **SUCCEEDS** quickly, pushes exactly one `RUN_STATUS` / `FIXTURE_HEALTH` row (`billable: false`), and does **not** charge `bodacc-event-delivered`.

### Input (summary)

| Field | Notes |
|-------|--------|
| `sirenNumbers` | 9-digit SIREN list (preferred) |
| `watchlistPairs` | Optional `SIREN\|Company name` for display |
| `eventTypes` | Typed filters; `IMMATRICULATION` / `DEPOT_COMPTES` opt-in |
| `publicationDate` / `lookbackDays` | Live scan window |
| `sourceMode` | `fixture` (default) or `live` |
| `emitFixtureDemoEvents` | Default **false** |
| `maxRunSeconds` / `maxEvents` | Budgets |
| `resumeFromCheckpoint` | Default true |
| `requestPaceMs` | Fair-use delay (default 250) |

#### Production example

```json
{
  "sirenNumbers": ["552100554", "443061841"],
  "watchlistPairs": [
    "552100554|DEMO FOURNISSEUR LYON SAS",
    "443061841|ACME PARIS SARL"
  ],
  "eventTypes": [
    "INSOLVENCY_OPENED",
    "MODIFICATION",
    "RADIATION",
    "CESSION"
  ],
  "sourceMode": "live",
  "lookbackDays": 3,
  "maxRunSeconds": 120,
  "requestPaceMs": 250,
  "resumeFromCheckpoint": true
}
```

### Output

#### Portfolio events (billable under PPE)

Typed rows include: `siren`, `company_name`, `matched_name`, `event_type`, `event_subtype`, `annonce_id`, `famille_avis`, `publication_date`, `tribunal`, `act_excerpt`, `evidence`, `summary`, `source_url`, `event_uid`, `billable: true`.

#### RUN\_STATUS (never billed)

Every successful run pushes one health row (`FIXTURE_HEALTH` | `MONITOR_IDLE` | `CATCHUP_COMPLETE` | `HEALTH_OK`).

### Pricing

Pay-per-event: **`bodacc-event-delivered`** at **$0.02** per delivered unique portfolio act ($20 / 1,000). Single tier (see `docs/monetization.md` and ADR 0010). Health / duplicate / fixture rows are never charged.

### Local development

```bash
cd actors/france-bodacc-siren-portfolio-monitor
npm install
npm test
npm run build
npm run start:dev
```

### Legal

BODACC is an official public-sector gazette. DILA open data is published under **Licence Ouverte 2.0** (same basis commercial BODACC reusers cite). Do **not** use this Actor against paid Infogreffe / Pappers HTML as the primary source. Document dirigeant names as statutory publication.

# Actor input Schema

## `sirenNumbers` (type: `array`):

9-digit French SIRENs to monitor. BODACC publishes registre/SIREN — matching is by SIREN (not name). Invalid rows are skipped with no charge.

## `watchlistPairs` (type: `array`):

Optional display names as "SIREN|Company legal name". Matching remains by SIREN; names are copied onto output rows.

## `eventTypes` (type: `array`):

Which typed BODACC events to emit. Default excludes IMMATRICULATION and DEPOT\_COMPTES (new-lead / accounts modes off). Allowed: INSOLVENCY\_OPENED, MODIFICATION, RADIATION, CESSION, IMMATRICULATION, DEPOT\_COMPTES.

## `publicationDate` (type: `string`):

End of the live scan window. Default = today (UTC). Use with lookbackDays for catch-up.

## `lookbackDays` (type: `integer`):

How many calendar days (including publicationDate) to scan on live runs.

## `maxRunSeconds` (type: `integer`):

Wall-clock budget for this scheduled poll.

## `maxEvents` (type: `integer`):

Stop after this many unique portfolio events are delivered (does not include RUN\_STATUS).

## `resumeFromCheckpoint` (type: `boolean`):

If true, resume lastPublicationDate and seen event\_uids from the default Key-Value Store.

## `sourceMode` (type: `string`):

fixture = local/CI / Apify Store daily auto-test default (no network; emits RUN\_STATUS only unless emitFixtureDemoEvents=true). live = official DILA BODACC Opendatasoft API (Licence Ouverte; no Pappers / Infogreffe key).

## `emitFixtureDemoEvents` (type: `boolean`):

When sourceMode=fixture, if true push fabricated portfolio events from local fixtures (unit/local demos only). Default false so Store daily auto-tests never emit fake events or charge bodacc-event-delivered. Production: leave false and use sourceMode=live.

## `maxTotalChargeUsd` (type: `number`):

Optional soft budget hint for delivered events. Platform ACTOR\_MAX\_TOTAL\_CHARGE\_USD also applies when set.

## `requestPaceMs` (type: `integer`):

Minimum delay between outbound official DILA HTTP requests (fair-use pacing).

## Actor input object example

```json
{
  "sirenNumbers": [
    "552100554",
    "443061841"
  ],
  "watchlistPairs": [
    "552100554|DEMO FOURNISSEUR LYON SAS",
    "443061841|ACME PARIS SARL"
  ],
  "eventTypes": [
    "INSOLVENCY_OPENED",
    "MODIFICATION",
    "RADIATION",
    "CESSION"
  ],
  "lookbackDays": 1,
  "maxRunSeconds": 55,
  "maxEvents": 500,
  "resumeFromCheckpoint": true,
  "sourceMode": "fixture",
  "emitFixtureDemoEvents": false,
  "requestPaceMs": 250
}
```

# Actor output Schema

## `OUTPUT` (type: `string`):

JSON summary: delivered, charged, runStatus, checkpoint, stats, as\_of

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("plym-actor-factory/france-bodacc-siren-portfolio-monitor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("plym-actor-factory/france-bodacc-siren-portfolio-monitor").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 '{}' |
apify call plym-actor-factory/france-bodacc-siren-portfolio-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plym-actor-factory/france-bodacc-siren-portfolio-monitor"
        }
    }
}
```

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/hW3jZpjYgJMlL77l3/builds/lCMbDaIPKrvoKiNMa/openapi.json
