v3

latestOpenAPI 3.0.0raw.githubusercontent.com2026-03-0936575.8 KB
Predict

Predict the languages of the product

Return the most common languages present on the product images, based on word-level language detection from product images.

Language detection is not performed on the fly, but is based on predictions of type image_lang stored in the prediction table.

get/predict/lang/product

Query parameters

barcodeinteger required
Example:5410041040807

The barcode of the product

server_type'off' | 'obf' | 'opff' | 'opf' | 'off_pro'

The server type (=project) to use, such as 'off' (Open Food Facts), 'obf' (Open Beauty Facts),...

kinteger

Number of language predictions to return

thresholdnumber

the minimum probability for a language to be returned

Response

The predicted languages, sorted by descending probability.

image_idsnumber[]

the IDs of the images that were used to generate the predictions

Example response

{
  "counts": [
    {
      "lang": "en",
      "count": 10
    }
  ],
  "percent": [
    {
      "lang": "en",
      "percent": 80.5
    }
  ],
  "image_ids": [
    1
  ]
}