# French Company Registry Scraper (Annuaire des Entreprises) (`moving_beacon-owner1/french-company-registry-scraper-annuaire-des-entreprises`) Actor

Extract official French company records, SIREN registration numbers, headquarters addresses, legal structures, NAF/APE activity codes, and corporate directors directly from the official French government registry API ([recherche-entreprises.api.gouv.fr](https://recherche-entreprises.api.gouv.fr)).

- **URL**: https://apify.com/moving_beacon-owner1/french-company-registry-scraper-annuaire-des-entreprises.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 1,000 results

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

## French Company Registry Scraper (Annuaire des Entreprises)

Extract official French company records, SIREN registration numbers, headquarters addresses, legal structures, NAF/APE activity codes, and corporate directors directly from the official French government registry API ([recherche-entreprises.api.gouv.fr](https://recherche-entreprises.api.gouv.fr)).

***

### Features

- **Official French Government Data**: Directly interfaces with the official public API powering *Annuaire des Entreprises*, providing authoritative, up-to-date registry data.
- **Bypasses Edge Challenges**: Avoids Cloudflare/edge challenges present on the web portal by communicating cleanly with the official open API endpoint.
- **Rich Company Profile**: Extracts SIREN number, full commercial name, legal trade name, acronym, enterprise category (PME, ETI, GE), administrative state (active vs. closed), and establishment counts.
- **Headquarters Location**: Captures full siege address, postal code, municipality, department code, and region.
- **Corporate Officers & Directors**: Extracts list of company officers, legal representatives, and board presidents (*Président*, *Directeur Général*, *Gérant*, etc.).
- **Smart Retries & Rate Limit Backoff**: Automatically handles HTTP 429 rate limiting with dynamic `Retry-After` backoff.
- **Apify Proxy Support**: Fully configurable with Apify residential or datacenter proxies.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `query` | `string` | `"boulangerie"` | **Required**. Company name, trade brand, activity keyword, SIREN (9 digits), or SIRET (14 digits) (e.g., `"boulangerie"`, `"SNCF"`, `"TotalEnergies"`). |
| `limit` | `integer` | `25` | Maximum total number of companies to extract. |
| `per_page` | `integer` | `25` | Number of results per API query page (1 to 25). |
| `pages` | `integer` | `5` | Maximum number of API pages to traverse. |
| `department` | `string` | `"75"` | Filter by French department code (e.g. `"75"` for Paris, `"69"` for Rhône, `"13"` for Bouches-du-Rhône). Leave empty for nationwide search. |
| `code_naf` | `string` | `""` | Optional filter by official French NAF/APE activity code (e.g., `"10.71C"` for artisanal bakeries, `"62.01Z"` for computer programming). |
| `timeout` | `integer` | `30` | Network request timeout in seconds. |
| `proxyConfiguration` | `object` | `null` | Optional Apify proxy settings (e.g. `{"useApifyProxy": true, "apifyProxyCountry": "FR"}`). |

***

### Example Input JSON

```json
{
  "query": "boulangerie",
  "limit": 25,
  "per_page": 25,
  "pages": 5,
  "department": "75",
  "code_naf": "",
  "timeout": 30,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "FR"
  }
}
```

***

### Output Dataset Schema

Each item in the output dataset contains:

| Field | Type | Description |
|---|---|---|
| `siren` | `string` | Unique 9-digit SIREN registration number. |
| `nom_complet` | `string` | Full registered commercial/public name. |
| `nom_raison_sociale` | `string` | Corporate or legal business name. |
| `sigle` | `string` | Company acronym or initialism (if any). |
| `categorie_entreprise` | `string` | Enterprise classification (e.g. `PME`, `ETI`, `GE`). |
| `tranche_effectif_salarie` | `string` | Employee headcount bracket code. |
| `date_creation` | `string` | Company establishment date (YYYY-MM-DD). |
| `etat_administratif` | `string` | Administrative status (`A` for active, `C` for ceased). |
| `activite_principale` | `string` | Primary NAF/APE activity classification code. |
| `adresse_siege` | `string` | Headquarters full street address. |
| `code_postal_siege` | `string` | Headquarters postal code. |
| `commune_siege` | `string` | Headquarters municipality or city name. |
| `departement_siege` | `string` | Headquarters French department code. |
| `region_siege` | `string` | Headquarters French region code. |
| `dirigeants` | `array` | List of company directors, legal officers, and executives with their roles. |
| `nombre_etablissements` | `integer` | Total number of company establishments/branches. |
| `scraped_at` | `string` | ISO 8601 UTC timestamp of extraction. |

#### Example Output Record

```json
{
  "siren": "339180705",
  "nom_complet": "BOULANGERIES PAUL",
  "nom_raison_sociale": "BOULANGERIES PAUL",
  "sigle": null,
  "categorie_entreprise": "ETI",
  "tranche_effectif_salarie": "51",
  "date_creation": "1986-10-01",
  "etat_administratif": "A",
  "activite_principale": "10.71C",
  "adresse_siege": "344 AVENUE MARCEL PAUL 59120 WAMBRECHIES",
  "code_postal_siege": "59120",
  "commune_siege": "WAMBRECHIES",
  "departement_siege": "59",
  "region_siege": "32",
  "dirigeants": [
    "FRANCIS HOLDER (Président de SAS)",
    "MAXIME HOLDER (Directeur Général)",
    "KPMG SA (Commissaire aux comptes titulaire)"
  ],
  "nombre_etablissements": 240,
  "scraped_at": "2026-11-17T23:47:00.000000+00:00"
}
```

***

### Compliance & Open Data Guidelines

- **Official Open Data**: Data is served through the official French public API [recherche-entreprises.api.gouv.fr](https://recherche-entreprises.api.gouv.fr) under the *Licence Ouverte / Open Licence 2.0*.
- **Ethical & Polite Use**: Maintain reasonable concurrency and pagination limits. Backoff strategies are included to adhere to government API rate limits.
- **GDPR & Privacy Compliance**: Any individual directors' personal details included in the company register must be processed in compliance with French and EU General Data Protection Regulations (GDPR).

***

### How to Run

#### Apify Platform

1. Open the Actor on the Apify Console.
2. Enter your search query, department code, or optional NAF filter in the Actor Input form.
3. Click **Start** to run.
4. Export the structured dataset to JSON, CSV, Excel, or NDJSON.

# Actor input Schema

## `query` (type: `string`):

Company name, trade name, activity keyword, SIREN, or SIRET (e.g. 'boulangerie', 'SNCF', 'TotalEnergies').

## `limit` (type: `integer`):

Maximum total number of companies to extract.

## `per_page` (type: `integer`):

Number of results per API request page (max 25).

## `pages` (type: `integer`):

Maximum number of API pages to query.

## `department` (type: `string`):

Filter results by French department code (e.g. '75' for Paris, '69' for Rhône, '13' for Bouches-du-Rhône).

## `code_naf` (type: `string`):

Optional filter by official French NAF/APE activity code (e.g. '10.71C' for artisan bakeries).

## `timeout` (type: `integer`):

Timeout in seconds for API HTTP requests.

## `proxyConfiguration` (type: `object`):

Optional proxy configuration for requests.

## Actor input object example

```json
{
  "query": "boulangerie",
  "limit": 25,
  "per_page": 25,
  "pages": 5,
  "department": "75",
  "code_naf": "",
  "timeout": 30
}
```

# Actor output Schema

## `results` (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 = {
    "query": "boulangerie",
    "limit": 25,
    "per_page": 25,
    "pages": 5,
    "department": "75",
    "timeout": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/french-company-registry-scraper-annuaire-des-entreprises").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 = {
    "query": "boulangerie",
    "limit": 25,
    "per_page": 25,
    "pages": 5,
    "department": "75",
    "timeout": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/french-company-registry-scraper-annuaire-des-entreprises").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 '{
  "query": "boulangerie",
  "limit": 25,
  "per_page": 25,
  "pages": 5,
  "department": "75",
  "timeout": 30
}' |
apify call moving_beacon-owner1/french-company-registry-scraper-annuaire-des-entreprises --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/french-company-registry-scraper-annuaire-des-entreprises"
        }
    }
}
```

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/nhEcGWwMxStS9IojX/builds/RyuyJfNxdAQVfrmEq/openapi.json
