v3

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

Generate OCR-based predictions for a product.

Generate OCR-based predictions for a product based on the OCR JSON obtained from Google Cloud Vision.

get/predict/ocr_prediction

Query parameters

ocr_urlstring uri required
Example:https://static.openfoodfacts.org/images/products/216/124/000/3089/1.json

The URL of the OCR JSON to use for extraction

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

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

prediction_typesstring
Example:category,label

a comma-separated list of prediction types to use for extraction. If not provided, we use the default: set of OCR prediction types (see DEFAULT_OCR_PREDICTION_TYPES variable in Robotoff codebase)

Response

the extracted predictions