oneapi
Sign in
Business v1 / Nomenclatoare

Semantic CPV matching

Takes a free text describing what is being bought (e.g. „laptops for the office") and returns the CPV codes closest in MEANING, with a score — not a word search but a meaning search (it catches paraphrases, synonyms, different wordings). ?text= (required), ?limita= (how many, 5 by default, 20 at most).

GET
https://oneapi.ro/api/business/v1/cpv/potriveste

Query parameters

NameTypeDescriptionAccepted values
limitaoptional string | null How many suggestions to return (default 5, max 20). e.g. 3
textoptional string | null The free text to classify (required). E.g. "laptops for the office". e.g. laptopuri pentru biroue.g. servicii de pazae.g. lucrari de asfaltare

How it behaves

  • Takes a free-text description of what is being purchased and returns the CPV codes closest in meaning, each with a score. It is not word search (like /cpv?q=) but meaning search — it catches paraphrases, synonyms and wordings different from the official name.
  • The CPV vocabulary has ~9,454 codes, hard to navigate by number. "laptops for the office" takes you to the portable-computer codes without knowing the exact number.
  • Under the hood it is the same infrastructure as CAEN: the text is turned into a meaning vector (bge-m3, self-hosted) and compared against the precomputed index of CPV codes. The result is a ranked list of suggestions, not a verdict — use the score and take the top few.
  • ?text= is required. ?limita= chooses how many suggestions (default 5, max 20).

What it is for

  • Choosing the CPV code when publishing a procurement, starting from a description.
  • Automatically classifying the object of contracts into CPV codes.
  • Searching the CPV vocabulary when you do not know the exact code.

Response structure

All fields below live inside data.

FieldTypeDescription
text string The text.
potriviri[].cod string The code.
potriviri[].denumire string The name.
potriviri[].scor number The match score (0–1).

Response examples

GEThttps://oneapi.ro/api/business/v1/cpv/potriveste?text=laptopuri+pentru+birou&limita=3
{
    "data": {
        "text": "laptopuri pentru birou",
        "potriviri": [
            {
                "cod": "30141200-1",
                "denumire": "Calculatoare de birou",
                "scor": 0.7954199436056661
            }
        ]
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validareThe text parameter is missing.
429cota_depasitaThe plan's monthly quota has been exceeded (see Retry-After).
503mentenantaThe CPV semantic index is not built, or the embeddings service is temporarily 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": "The text parameter is missing.",
        "detalii": {
            "limita": [
                "The value sent does not satisfy the parameter rule."
            ]
        }
    }
}