Batch CAEN classification
You send a list of activity descriptions (JSON body {"texte": ["...", "..."]}, 50 at most) and get back, for each one, the NACE codes that match by MEANING, with a score. For classifying a whole set of texts in a single call. ?limita= (suggestions per text, 3 by default, 10 at most).
Request body
Sent as JSON in the request body (Content-Type: application/json) — not in the query string.
{
"texte": [
"reparatii biciclete",
"cabinet stomatologic"
],
"limita": 2
}
{
"texte": [
"transport rutier de marfa"
],
"limita": 3
}
{
"texte": [
"florarie",
"service auto",
"agentie de turism"
],
"limita": 1
}
Query parameters
How it behaves
- The batch version of
/caen/potriveste: send a list of activity descriptions (JSON body{"texte": [...]}, max 50) and get, for each one, the CAEN codes matched by meaning, with a score. All texts are embedded in a single batch (fast), then compared against the index. - Built for classifying a whole set in one call (e.g. a column of descriptions from a file). Result order follows the order of the texts; an empty text returns
potriviri: []. - The method is
POST(the list can be long).?limita=chooses how many suggestions per text (default 3, max 10).
What it is for
- Batch classification of freely described activities into CAEN codes.
- Enriching a file of companies or products with CAEN codes.
Response structure
All fields below live inside data[].
Response examples
body: {"texte": ["reparatii biciclete", "cabinet stomatologic"], "limita": 2}
{
"data": [
{
"text": "reparatii biciclete",
"potriviri": [
{
"cod": "9529",
"denumire": "Repararea și întreținerea articolelor de uz personal și gospodăresc n.c.a.",
"scor": 0.6088588833808899
}
]
}
]
}
body: {"texte": ["transport rutier de marfa"], "limita": 3}
{
"data": [
{
"text": "transport rutier de marfa",
"potriviri": [
{
"cod": "492",
"denumire": "Transporturi de marfă pe calea ferată",
"scor": 0.7638886570930535
}
]
}
]
}
body: {"texte": ["florarie", "service auto", "agentie de turism"], "limita": 1}
{
"data": [
{
"text": "florarie",
"potriviri": [
{
"cod": "742",
"denumire": "Activităţi fotografice",
"scor": 0.46276332327018177
}
]
}
]
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 422 | validare | texte is missing, empty, or has more than 50 items. |
| 429 | cota_depasita | The plan's monthly quota has been exceeded (see Retry-After). |
| 503 | mentenanta | The CAEN semantic index is not built, or embeddings are unavailable. |
All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.
{
"eroare": {
"cod": "validare",
"mesaj": "texte is missing, empty, or has more than 50 items."
}
}