
SIRENE API Scraper for JavaScript and Node.js: French company lookups as JSON
Use this repository to query France's company register from Node.js through the France SIRENE Company Registry Scraper. The module sends a SIREN, a name fragment or a set of filters, such as an activity code plus a department, and receives one flat object per company with identifiers, status, size class, sector labels, VAT number and head-office address. Paging, retries and unpacking of the registry's nested JSON happen in the Actor on Apify, so your onboarding service, Lambda function or CRM worker deals only with plain objects. If your stack already speaks REST and JSON, there is nothing French about the integration except the data.
Actor: France SIRENE Company Registry Scraper · Publisher: Devil Scrapes · Also in Python: sirene-api-scraper-python
🔥 What you get
- One row per legal unit: each company is keyed by its nine-digit
siren, with the head-office SIRET, address, postal code, commune and department lifted out of the nested registry block onto the row itself.
- The registry's own filters: free text that matches a name, SIREN or SIRET, a NAF/APE code in
NN.NNL form, an INSEE department or commune code, a workforce band and active or ceased status, all combined server-side.
- Codes with readable labels: the one-letter NACE section arrives with its English name, and the INSEE size class (
GE, ETI, PME, TPE) comes with a decoded label.
- Compliance-friendly columns: creation and closure dates, the year behind the headcount band, total and still-open establishment counts, the first registered VAT number and a link to the company's public directory page.
- Mistakes caught before the meter starts: a NAF code in the wrong format, an out-of-range
maxResults or a form with every filter cleared is refused without the start fee.
- Straight answers from the API: rate limits and server errors are retried with exponential backoff; a filter value the registry rejects ends the run with the registry's own error text instead of five pointless retries.
- Empty is not broken: filters that match no company still end in a
SUCCEEDED run, whose status line lists what was searched, and a malformed entry is skipped and counted rather than ending the page.
🎯 Use cases
KYB check during customer onboarding
When a French business signs up, your backend starts a run with the SIREN they entered in nameQuery and compares legal_name, is_active and postal_code with the form. Mismatches go to manual review; matches pass, and the url to the public directory page is stored as evidence.
CRM enrichment on record creation
A webhook from HubSpot, Salesforce or Pipedrive enqueues a lookup for each new French account. The worker writes back NAF code, size class, headcount band and creation year, so segmentation does not depend on what a sales rep typed.
Lead lists routed by territory
Pull a sector per department, group the objects by department_code, and push each group to the regional rep who owns that area. The recipe below produces exactly that structure with a few flags attached to each account.
Counterparty status monitoring
A weekly serverless job looks up every supplier SIREN with status C. Any hit means a counterparty has ceased trading, and the job posts its name and closure_date to the finance channel before the next invoice run.
⚡ Quick start
You need an Apify account and an API token from Console → Settings → Integrations. Apify's free plan includes monthly usage credit; this Actor's event prices are listed under Pricing below.
git clone https://github.com/devilscrapes/sirene-api-scraper-javascript.git
cd sirene-api-scraper-javascript
npm install
export APIFY_TOKEN=your_token_here
node index.js # uses input.json
node index.js my-input.json --out data --max-charge 2
The script starts the France SIRENE Company Registry Scraper, waits for it to finish, prints a link to the run in Apify Console and saves every result to results.json and results.csv. It exits with code 1 and the run's status message if the run fails.
🧩 The core call
This is the complete integration. call() waits for the run to finish, and listItems() reads the resulting company objects from the default dataset.
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('DevilScrapes/france-sirene-companies-scraper').call({"nafCode": "62.01Z", "departmentCode": "69", "workforceRange": "12", "administrativeStatus": "A", "maxResults": 10, "proxyConfiguration": {"useApifyProxy": false}});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
📥 Input
index.js sends input.json exactly as written. The sample filter asks for up to ten active software companies in the Rhône department within one headcount band, enough to see real objects without a noticeable bill. In a backend you would usually build the input per request, either a single SIREN in nameQuery for a lookup or a NAF code with a department for a list.
{
"nafCode": "62.01Z",
"departmentCode": "69",
"workforceRange": "12",
"administrativeStatus": "A",
"maxResults": 10,
"proxyConfiguration": {
"useApifyProxy": false
}
}
| Field |
Type |
Required |
Default |
Allowed values |
nameQuery |
string |
no |
— |
— |
nafCode |
string |
no |
— |
— |
departmentCode |
string |
no |
— |
— |
communeCode |
string |
no |
— |
— |
workforceRange |
string |
no |
— |
— |
administrativeStatus |
string |
no |
"A" |
A, C |
maxResults |
integer |
no |
100 |
— |
proxyConfiguration |
object |
no |
{"useApifyProxy": false} |
— |
📤 Output
Each object describes one company with its head office folded in. Identifiers (siren, siret_headquarters, vat_number) are strings, establishment counts are integers or null, is_active is a boolean, and dates are YYYY-MM-DD strings. Expect null in optional fields like acronym and closure_date; type them as optional in TypeScript.
| Field |
Type |
Always present |
siren |
string or null |
no |
siret_headquarters |
string or null |
no |
company_name |
string or null |
no |
legal_name |
string or null |
no |
acronym |
string or null |
no |
legal_form_code |
string or null |
no |
company_size_category |
string or null |
no |
company_size_label |
string or null |
no |
naf_code |
string or null |
no |
naf_section_code |
string or null |
no |
naf_section_label |
string or null |
no |
workforce_range_code |
string or null |
no |
workforce_range_year |
string or null |
no |
administrative_status |
string or null |
no |
is_active |
boolean or null |
no |
creation_date |
string or null |
no |
closure_date |
string or null |
no |
last_updated |
string or null |
no |
street_address |
string or null |
no |
postal_code |
string or null |
no |
city |
string or null |
no |
department_code |
string or null |
no |
establishment_count |
integer or null |
no |
open_establishment_count |
integer or null |
no |
vat_number |
string or null |
no |
url |
string or null |
no |
💰 Pricing
| Event |
Price (USD) |
| Result emitted |
$0.004 |
Prices as configured on 2026-11-03. The Actor page always shows the current price. Runs are billed to the Apify account that owns the token. Use --max-charge to cap what a single run can cost.
🛠️ Working with the data in JavaScript
The script below needs nothing beyond Node.js. It groups companies by department, attaches simple review flags (ceased, no VAT number, no open establishment) and writes territories.json, ready for a routing job or an API response.