Automatically Enrich a Business Database with SIRET, SIREN, VAT, and RCS

You have a list of businesses. The name, the address, sometimes the website, sometimes the phone number — everything a business scrape naturally surfaces. Then comes the moment you need to do something serious with it: issue an invoice, deduplicate two rows that might refer to the same company, verify that a trade name is a real legal entity before engaging it. That's when the missing column becomes a blocker. Without a SIRET, your accounting software rejects the invoice. Without a SIREN, your deduplication tool is comparing approximate strings. A list of names is not a business database: it is a directory, and a directory cannot be invoiced.

Manual matching is familiar to any team that has ever worked with a business file: copy the name, paste it into the national business registry, find the right establishment, copy the SIRET, row by row. For 80 records, that is half a day. For 800, nobody does it — the database stays unusable, or gets enriched one entry at a time.

The legal_ids feature on outsend.xyz, free during alpha, automates exactly this matching. Here is what each identifier is, how the module retrieves them, and how to derive the intra-EU VAT number from the SIREN using the official administrative formula.

A list of names cannot be invoiced: the real problem

Four common operations all hit the same wall. Invoicing: a compliant invoice requires the SIRET of the establishment (and the intra-EU VAT number for any intra-EU transaction). Deduplication: "Boulangerie Martin" and "SARL Martin" are two labels for one SIREN — without the identifier, deduplication is guesswork on strings. Qualification: verifying that a trade name corresponds to a registered legal entity, rather than a ghost site, requires its SIREN. Preparing a mandate or a contract: the legal details (legal form, RCS, headquarters SIRET) are mandatory.

The common thread: these operations need a stable identifier, not a name. Names change spelling, addresses have three variants, websites go down. The SIREN is unique and permanent. Attaching that identifier to each row transforms a decorative file into a working database.

SIRET, SIREN, RCS, VAT: what each identifier is for

The four identifiers are not interchangeable. Each answers a specific need, and confusing an establishment with a company is the classic mistake that gets an invoice bounced.

The SIREN is the unique company identification number, 9 digits long, assigned by INSEE at registration (impots.gouv.fr — identification numbers). A company has one SIREN, for life.

The SIRET identifies a specific establishment within that company. It is 14 digits long: the 9 SIREN digits followed by a 5-digit NIC (internal classification number) unique to each location (Annuaire des Entreprises, data.gouv.fr). A company with three branches has one SIREN and three SIRETs. The SIRET is what appears on an invoice, because it identifies the specific establishment involved.

The RCS (Registre du commerce et des sociétés — French commercial register) is the incorporation reference at the court registry (greffe), typically written as "RCS Lyon 404 833 048" — the number following the city is the SIREN. It is a mandatory legal notice on commercial documents for any registered commercial company.

The intra-EU VAT number is derived from the SIREN. In France, its structure is FR + a 2-digit computed key + the 9 SIREN digits (economie.gouv.fr). It is required for any commercial transaction between VAT-registered entities in different EU member states.

All of this data is public. The reference database is the INSEE Sirene database, published as open data under the Open Licence 2.0 and classified as a high-value dataset.

How the legal_ids module enriches a list automatically

The principle: you provide a list of businesses (name, address, website — typically the output of a Google Maps scrape exported to CSV), and the module retrieves the legal identifiers row by row. The primary source used is each company's own website, because in France the SIRET is almost always present there: the law requires legal notices (mentions légales) to be published, and that is where the number appears.

In practice, for each row that has a website, the module visits the pages most likely to contain the information — in order: /mentions-legales, /legal, /mentions, /cgv, then the homepage — and stops as soon as a valid SIRET is found. It detects sequences of 14 digits (SIRET) and 9 digits (SIREN), even when separated by spaces or dots, and gives higher weight to a number appearing near keywords such as "SIRET", "SIREN", or "RCS".

The decisive safeguard is Luhn algorithm validation. A phone number formatted in three digit groups can look like a SIREN; so can an internal reference code. SIRENs and SIRETs, however, satisfy the Luhn check digit. The module rejects any number that fails validation — that is what prevents a false SIRET extracted from a block of text from being attached to your record. Every retained identifier includes its source URL (the exact page it was read from), so the data stays traceable and verifiable.

The output adds columns siret, siren, siren_valid, and legal_id_source_url to your list, exportable as CSV. The same batch enrichment principle as tech stack detection applies: you provide a list, you get back a richer list.

For multi-location companies, the SIRET read from the website generally corresponds to the headquarters or the principal establishment mentioned; the SIREN is shared across all establishments and serves as a reliable grouping key whenever you want to consolidate multiple rows belonging to the same company.

Access is free during alpha, by application: describe your use case and start enriching your lists. Requesting alpha access takes one minute.

Computing the intra-EU VAT key from the SIREN

Once the SIREN is obtained and validated, the French intra-EU VAT number can be derived by calculation — no need to query an additional service. Its official structure is FR + a 2-digit key + the SIREN (impots.gouv.fr). Only the key needs to be calculated.

The administrative formula for the check key is:

Verifiable example using SIREN 404 833 048: 404833048 mod 97 = 56; then (12 + 3 × 56) mod 97 = 180 mod 97 = 83. The key is therefore 83, and the intra-EU VAT number is FR 83 404833048.

This formula only applies to "standard" SIRENs (the vast majority of companies). A few historical edge cases use a different alphanumeric key: for those, and for any consequential invoicing, validation should be done via the official European VIES system from the European Commission, which confirms the validity of any intra-EU VAT number.

Four concrete use cases

Preparing invoicing. A team that needs to invoice a territory of local prospects needs the SIRET of each establishment. The module retrieves it from the legal notices page, and the VAT key is computed in the same step for clients subject to intra-EU VAT.

Deduplicating by SIREN. Two rows with similar but differently spelled names? Once the SIREN is attached, deduplication becomes exact: same SIREN = same company, full stop. No more fuzzy string comparison.

Verifying legal existence. Before committing to a spend or a partnership, holding a valid SIRET (Luhn-validated, source URL included) rules out trade names with no registered entity behind them. It is a baseline qualification step before any outreach or contract.

Enriching an existing contact database. If you already have a file of companies with their websites, the module adds the legal layer on top, without starting from scratch — useful alongside email enrichment or dead URL cleanup before reaching out.

Legal data = open public data

The identifiers handled here are public legal data. SIRET, SIREN, and RCS are notices that the law requires to be displayed publicly on any commercial website — reading them is simply consulting information the company is legally required to make visible. The reference database, the Sirene database, is itself published as open data by INSEE under the Open Licence 2.0.

One caveat to keep in mind: the Sirene database contains personal data for sole traders (the individual's name is also the company name), and the right to opt out of public dissemination exists (the "non-diffusion" status). Enriching business records with legal identifiers is not outreach in itself — the compliance of any subsequent prospecting depends on your purposes and remains your responsibility.

On the module's limitations: it enriches rows whose website actually exposes legal notices. A record without a website, or with a website that does not publish its SIRET, will not come out enriched this way — that is precisely what name + address matching against the Sirene database, on the roadmap, will complement. And the module does not compute extended company data (legal form, NAF code, headcount, officers) for you: that is a separate enrichment module.

This article is part of a broader set: see all OutSend features.

Try outsend for free

All-in-one, built for European B2B. Free alpha access by application.

Request free alpha access

FAQ — Enriching a database with SIRET, SIREN, VAT, and RCS

What is the difference between SIRET and SIREN?

The SIREN (9 digits) identifies the company, once and for life. The SIRET (14 digits) identifies a specific establishment: it is the SIREN followed by a 5-digit NIC unique to that location. A company has one SIREN and as many SIRETs as it has active establishments. The SIRET is what appears on an invoice.

How do you find the SIRET of a company from its name?

The legal_ids module starts from the list you provide (name, address, website) and reads the SIRET directly from the company's website, in its legal notices section, where it is legally required to be published. The number is then validated by the Luhn algorithm to eliminate false positives, and the source URL is kept for traceability.

How do you compute the intra-EU VAT number?

In France: FR + a 2-digit key + the SIREN. The key is computed by the formula [12 + 3 × (SIREN mod 97)] mod 97. For SIREN 404833048, the key is 83, giving FR 83 404833048. For any consequential invoicing, validity should be confirmed via the European VIES service.

Is the RCS number the same as the SIREN?

The RCS is written as "RCS City + number" and the number following the city is precisely the SIREN. The RCS therefore adds the city of registration at the court registry (greffe) on top of the SIREN. It is a mandatory legal notice for commercial companies.

Is it legal to collect and use this data?

SIRET, SIREN, and RCS are mandatory public notices on commercial documents and websites, and the Sirene database is published by INSEE as open data under the Open Licence 2.0. Reading them and attaching them to your database is legitimate. The compliance of any subsequent prospecting depends on your purposes and remains your responsibility, particularly for sole traders with non-diffusion status.

What happens for a company with multiple establishments?

The SIRET read from the website generally corresponds to the headquarters or the main establishment listed. The SIREN is shared across all establishments: it serves as a reliable grouping key when you want to consolidate multiple rows belonging to the same company.

Try outsend for free

All-in-one. Far cheaper than every competitor. Alpha access on application.

Request free alpha access