# France Company Data Scraper: SIRENE, INSEE & NAF (`plainkitbin/pd-france-company`) Actor

Extract French company registration dataset from the public Annuaire des Entreprises API (Recherche d’entreprises). Structured JSON rows with SIREN, activity codes, legal form, and headquarters data.

- **URL**: https://apify.com/plainkitbin/pd-france-company.md
- **Developed by:** [PlainKit bin](https://apify.com/plainkitbin) (community)
- **Categories:** Business, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 french company records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Annuaire Entreprises France B2B Company Scraper

### Introduction

B2B sales teams, market intelligence analysts, procurement researchers, credit risk managers, and directory developers need structured access to French corporate registration data without manual web lookups. This France B2B company scraper queries the public Annuaire des Entreprises API (Recherche d'entreprises) provided by data.gouv.fr to retrieve structured enterprise records across French territories. One run retrieves company identification numbers, trade names, primary NAF activity codes, legal structures, establishment counts, and administrative statuses as clean tabular JSON dataset rows.

The price is $0.001 per delivered company record under the FREE tier on Apify Pay-Per-Event (event name: `france-company`).
This Actor is an independent tool and is not affiliated with Annuaire des Entreprises (Recherche d'entreprises API). Public corporate registration information is accessed in accordance with the French Open Licence 2.0 (Licence Ouverte 2.0).

### Tutorial

Follow these steps to run the scraper:

1. Determine your search query: enter a company name, keyword, or SIREN identifier into `query`.
2. Optionally specify a two-digit French department code in `departement` to narrow geographic scope.
3. Optionally provide an INSEE NAF or APE activity code in `activite_principale` (such as 62.01Z for computer programming) to filter companies by industry sector.
4. Set `max_items` to control the total number of enterprise records to retrieve.
5. Start the Actor run on Apify.
6. Export your structured French company dataset in JSON, CSV, Excel, or XML format.

### Pricing

This Actor uses Apify Pay-Per-Event pricing with event name `france-company`.

- Event name: `france-company`
- Pricing model: Apify Pay-Per-Event
- Tier prices:
  - FREE: $0.001 per company record
  - BRONZE: $0.0009 per company record
  - SILVER: $0.0008 per company record
  - GOLD: $0.000697 per company record
  - PLATINUM: $0.000697 per company record
  - DIAMOND: $0.000667 per company record

Each company row is pushed first to the dataset and charged right after a successful push.
A refused charge or reached spending limit halts work immediately; that row remains delivered and uncharged.
Failed requests produce 0 charges and push no data.
Restart safety: if a run is restarted or resumed by the platform, already delivered records are recognized and never pushed or charged twice.

### Input and output examples

#### Input Parameters

| Field | Type | Description | Default |
| --- | --- | --- | --- |
| `query` | String | Search keyword, corporate name, or SIREN identifier to query. | `"b2b"` |
| `departement` | String | Optional French department code filter (e.g. 75 for Paris). | `""` |
| `activite_principale` | String | Optional INSEE NAF/APE principal activity code filter (e.g. 62.01Z for computer programming, 70.22Z for business consulting). | `""` |
| `max_items` | Integer (1-1000) | Maximum number of enterprise records to deliver. | `10` |

#### Sample Input

```json
{
  "query": "b2b",
  "max_items": 5
}
```

#### Sample Output

```json
{
  "activite_principale": "70.10Z",
  "activite_principale_naf25": "70.10Y",
  "categorie_entreprise": "PME",
  "date_creation": "2009-12-01",
  "date_fermeture": null,
  "etat_administratif": "A",
  "nature_juridique": "5710",
  "nom_complet": "B2B",
  "nom_raison_sociale": "B2B",
  "nombre_etablissements": 9,
  "nombre_etablissements_ouverts": 6,
  "section_activite_principale": "G",
  "sigle": null,
  "siren": "519171417",
  "statut_diffusion": "O",
  "tranche_effectif_salarie": "03"
}
```

### Actor recommendations

For comprehensive business data pipelines and corporate intelligence, pair this Actor with:

- Corporate CRM enrichment workflows and lead generation lists
- European supplier diligence and procurement risk checks
- Automated B2B market mapping and sector distribution analytics

### FAQ and support

#### What company identifiers are returned?

Each record returns the 9-digit SIREN registration identifier, primary NAF activity classification, corporate legal structure code, and creation date as recorded in the national directory.

#### Does the output contain personal data of natural persons?

No. Sole traders (entreprise individuelle, legal form codes starting with 1), records the register does not mark as publicly diffusible (statut_diffusion other than O) and records without a legal form are skipped before output, so they are never delivered or charged. Director names are omitted. Only legal-entity business facts are provided.

#### What happens if a search query yields no results?

If an invalid search term is queried or no matching companies exist, 0 rows are delivered and no charges are incurred.

#### Support contact

For technical inquiries, bug reports, or integration questions, contact support@example.com.

# Actor input Schema

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

Search keyword, company name, or SIREN identifier to query.

## `departement` (type: `string`):

Optional French department code to filter by (e.g. 75 for Paris, 69 for Lyon).

## `activite_principale` (type: `string`):

Optional INSEE NAF/APE principal activity code filter (e.g. 62.01Z for computer programming, 70.22Z for business consulting).

## `max_items` (type: `integer`):

Maximum total number of company records to deliver (default 10).

## Actor input object example

```json
{
  "query": "b2b",
  "departement": "",
  "activite_principale": "",
  "max_items": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items produced by this run.

# 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": "b2b",
    "departement": "",
    "activite_principale": "",
    "max_items": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("plainkitbin/pd-france-company").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": "b2b",
    "departement": "",
    "activite_principale": "",
    "max_items": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("plainkitbin/pd-france-company").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": "b2b",
  "departement": "",
  "activite_principale": "",
  "max_items": 10
}' |
apify call plainkitbin/pd-france-company --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plainkitbin/pd-france-company"
        }
    }
}
```

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/olC8ApucWk6GSU63c/builds/Ca9QucNLe9xQhp7B1/openapi.json
