MacroLens / Guides

Norwegian and French company registry lookup API

For a KYB check or counterparty research, the authoritative source is the government register. This endpoint reads the Norwegian and French registers and returns normalised JSON.

The problem

Each national register has its own API, field names, languages and licence. Norway's Enhetsregisteret uses Norwegian keys and codes; France's open data comes from SIRENE and the RNE with a different shape again. An agent that must answer "is this company real, active and where is it registered?" should not need two integrations.

How /company answers it

GET /company?country=NO&query=Equinor searches by name (2-100 characters, up to limit matches, default 5), or pass id with a registry number: a nine-digit organisasjonsnummer for Norway, or a SIREN (9 digits) or SIRET (14) for France. Both countries return id, name, legalForm, status, incorporation date, industry code, address and a source licence note. Norway adds employees, VAT registration, share capital, sector and a link to the website. France adds the headquarters SIRET, a size category, establishment counts, up to ten officers, up to three years of revenue and net income, and VAT numbers. Norwegian status distinguishes active, bankrupt, winding-up and forced dissolution.

Request and response

Example: a name search in the Norwegian register.

$ curl -i "https://macrolens.imac2014ville.workers.dev/company?country=NO&query=Equinor&limit=1"
HTTP/2 402
payment-required: eyJ4NDAyVmVyc2lvbiI6Mi4uLn0=   # base64 JSON: scheme "exact", network eip155:8453,
                                                  # asset USDC, amount 20000 (= $0.02)
# An x402 client signs the payment, then retries with a PAYMENT-SIGNATURE header.

The paid response (abridged; the purpose text is omitted):

{
  "ok": true,
  "count": 1,
  "totalMatches": 179,
  "companies": [{
    "country": "NO",
    "registry": "Brønnøysund Register Centre, Enhetsregisteret",
    "id": "923609016",
    "name": "EQUINOR ASA",
    "legalForm": { "code": "ASA", "description": "Allmennaksjeselskap" },
    "status": "active",
    "incorporated": "1972-09-18",
    "industry": { "code": "06.100", "description": "Utvinning av råolje" },
    "employees": 21272,
    "address": "Forusbeen 50, 4035, STAVANGER, Norge",
    "vatRegistered": true,
    "shareCapital": { "amount": 5976872600, "currency": "NOK" }
  }],
  "source": "Brønnøysund Register Centre (NLOD)"
}

JavaScript with @x402/fetch

import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.PRIVATE_KEY); // wallet holding USDC on Base
const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(signer) }],
});
const res = await pay("https://macrolens.imac2014ville.workers.dev/company?country=FR&id=552032534"); // SIREN
const data = await res.json();
const c = data.company ?? data.companies[0]; // id lookups return company, name searches return companies
console.log(c.name, c.status, c.hq?.city);

Pricing

/company costs $0.02 per call. There is no API key and no account: each request is paid in USDC on Base over x402. Malformed input returns 400 and failed lookups return a non-2xx status, so those are not charged.

Limitations

More guides

Sister services