Documentation
L’API Belfirm est une API REST qui renvoie du JSON. Vous l’utilisez via RapidAPI, qui gère votre clé API et la facturation. La référence technique complète de tous les endpoints se trouve dans la référence API interactive (OpenAPI).
Authentification
Abonnez-vous à un plan sur RapidAPI. Vous recevez une clé à envoyer à chaque requête dans les en-têtes X-RapidAPI-Key et X-RapidAPI-Host.
Consulter une entreprise
Récupérez le profil d’une entreprise par son numéro d’entreprise :
curl "https://belfirm.p.rapidapi.com/v1/enterprise/0200.065.765?lang=fr" \
-H "X-RapidAPI-Key: VOTRE_CLE" \
-H "X-RapidAPI-Host: belfirm.p.rapidapi.com"import requests
r = requests.get(
"https://belfirm.p.rapidapi.com/v1/enterprise/0200.065.765",
params={"lang": "fr"},
headers={"X-RapidAPI-Key": "VOTRE_CLE", "X-RapidAPI-Host": "belfirm.p.rapidapi.com"},
)
print(r.json()["name"])const r = await fetch("https://belfirm.p.rapidapi.com/v1/enterprise/0200.065.765?lang=fr", {
headers: { "X-RapidAPI-Key": "VOTRE_CLE", "X-RapidAPI-Host": "belfirm.p.rapidapi.com" },
});
const company = await r.json();
console.log(company.name);{
"enterprise_number": "0200065765",
"enterprise_number_formatted": "0200.065.765",
"name": "Intergemeentelijke Vereniging Veneco",
"is_natural_person": false,
"juridical_form": {"code": "416", "description": "Dienstverlenende vereniging (Vlaams Gewest)"},
"juridical_situation": {"code": "000", "description": "Normale toestand"},
"start_date": "1960-08-09",
"registered_address": {"street_nl": "Panhuisstraat", "house_number": "1",
"zipcode": "9070", "municipality_nl": "Destelbergen"},
"activities": [{"nace_code": "68121", "nace_version": "2025",
"description": "Ontwikkeling van residentiële bouwprojecten"}],
"establishments_count": 1,
"meta": {"source": "Bron: Kruispuntbank van Ondernemingen", "snapshot_date": "2026-10-26"}
}Paramètres : lang (nl, fr, de, en) pour les libellés et nace_version (latest, all ou p. ex. 2008). Une entreprise radiée renvoie 410 avec le dernier nom connu.
Recherche par nom
Chaque mot doit apparaître au début d’un mot d’un nom. Filtres optionnels : zipcode, nace, juridical_form, include_natural_persons.
curl "https://belfirm.p.rapidapi.com/v1/search?q=veneco&limit=5" \
-H "X-RapidAPI-Key: VOTRE_CLE" -H "X-RapidAPI-Host: belfirm.p.rapidapi.com"Surveillance : suivre des entreprises
Créez une surveillance pour une entreprise. Omettez events pour suivre tous les changements. Conservez le secret de la réponse : il n’est affiché qu’une fois.
curl -X POST "https://belfirm.p.rapidapi.com/v1/watch" \
-H "X-RapidAPI-Key: VOTRE_CLE" -H "X-RapidAPI-Host: belfirm.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{"enterprise_number": "0200.065.765",
"events": ["enterprise.juridical_situation_changed", "enterprise.deregistered"],
"webhook_url": "https://example.com/hooks/belfirm"}' Suivez jusqu’à 1000 entreprises à la fois avec POST /v1/watch/bulk.
Recevoir des webhooks
À chaque changement, nous envoyons un POST à votre webhook_url. Répondez avec un statut 2xx. Sinon, nous réessayons après 1, 2, 4, 8 … minutes (8 tentatives). Testez votre endpoint avec POST /v1/watch/{id}/test.
{
"id": 48213,
"type": "enterprise.juridical_situation_changed",
"enterprise_number": "0200065765",
"snapshot_date": "2026-11-03",
"watch_id": "5f2c9a0e-6a8e-4c43-9f0b-2f1d8f6c1e77",
"data": {"field": "juridical_situation", "old": "000", "new": "012"},
"source": "Bron: Kruispuntbank van Ondernemingen"
}Vérifier la signature
Vérifiez l’en-tête X-BD-Signature : un HMAC-SHA256 de X-BD-Timestamp + . + le corps brut, avec votre secret comme clé.
import hashlib, hmac
def is_valid(secret: str, timestamp: str, raw_body: bytes, signature: str) -> bool:
expected = "sha256=" + hmac.new(
secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, signature)
# Flask example
# ok = is_valid(SECRET, request.headers["X-BD-Timestamp"], request.get_data(),
# request.headers["X-BD-Signature"])import crypto from "node:crypto";
function isValid(secret, timestamp, rawBody, signature) {
const expected = "sha256=" + crypto.createHmac("sha256", secret)
.update(timestamp + "." + rawBody).digest("hex");
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
}Récupérer les événements sans webhook
Pas de serveur pour recevoir des webhooks ? Créez une surveillance sans webhook_url et récupérez les événements. Conservez next_since_id pour l’appel suivant.
curl "https://belfirm.p.rapidapi.com/v1/events?since_id=0" \
-H "X-RapidAPI-Key: VOTRE_CLE" -H "X-RapidAPI-Host: belfirm.p.rapidapi.com"Aperçu des endpoints
| Méthode | Chemin | Description |
|---|---|---|
GET | /v1/enterprise/{nr} | Profil d’une entreprise |
POST | /v1/enterprise/batch | Jusqu’à 100 profils à la fois |
GET | /v1/enterprise/{nr}/changes | Historique des changements |
GET | /v1/search?q= | Recherche par nom |
GET | /v1/establishment/{nr} | Établissement et son entreprise |
GET | /v1/validate/{nr} | Vérifier un numéro, actif ou radié |
GET | /v1/codes/{categorie} | Listes de codes (formes juridiques, NACE …) |
POST | /v1/watch | Suivre une entreprise |
POST | /v1/watch/bulk | Suivre jusqu’à 1000 entreprises |
GET | /v1/watch | Vos surveillances |
PATCH / DELETE | /v1/watch/{id} | Modifier ou supprimer une surveillance |
POST | /v1/watch/{id}/test | Envoyer un webhook de test |
GET | /v1/events | Récupérer les événements de vos surveillances |
GET | /v1/account | Plan, limites et consommation |
Limites et codes d’erreur
Chaque plan a un nombre maximal de surveillances et d’appels par mois. La gestion des surveillances ne compte pas comme appel.
| Plan | surveillances | appels / mois |
|---|---|---|
| Free | 5 | 100 |
| Starter | 50 | 5 000 |
| Pro | 500 | 50 000 |
| Business | 5 000 | 250 000 |
| Code | Signification |
|---|---|
401 | Clé absente ou invalide |
403 | Limite de surveillances de votre plan atteinte |
404 | Introuvable |
409 | Vous suivez déjà cette entreprise avec cette URL |
410 | Entreprise radiée |
422 | Entrée invalide, p. ex. un mauvais numéro |
429 | Trop de requêtes ou limite mensuelle atteinte |
Numéros d’entreprise
Les numéros sont acceptés dans tout format courant : 0403.170.701, BE0403170701 ou 403170701. Nous vérifions les chiffres de contrôle (modulo 97). Les numéros d’entreprise commencent par 0 ou 1, ceux d’établissement par 2 à 8.