List insights
Return insights based on various filters. The results can be filtered by insight type, barcode, annotation status, and more.
The insight_types
parameter is a comma-separated list of insight types to filter by.
If no insight_types
are provided, insights of all types are returned.
Query Parameters
Comma-separated list, filter by insight types
Filter by barcode value
Filter by annotation status of the insight. A true value (1
, true
) means we only return annotated insights, a false value (0
, false
) only non-annotated insights. If the parameter is not provided, both annotated and non-annotated insights are returned.
Filter by annotation value of the insight. If not provided, all insights are returned. This works in conjunction with the annotated
parameter.
Filter by value tag, i.e the value that is going to be sent to Product Opener
Comma-separated list, filter by brands
Comma separated list, filter by country value (2-letter code)
The server type (=project) to use, such as 'off' (Open Food Facts), 'obf' (Open Beauty Facts),...
"off"
"off" | "obf" | "opff" | "opf" | "off_pro"
Filter by predictor value A predictor refers to the model/method that was used to generate the prediction.
How to order by insight results. By default, results are not ordered. Possible values are:
random
: insights are ordered randomlypopularity
: insights are returned by decreasing popularity, using the number of scans as proxy
"random" | "popularity"
The number of items to return
25
1 <= value
Page index to return (starting at 1)
1
1 <= value
Filter by annotation campaigns (the insight must have all the campaigns) An annotation campaign allows to only retrieve questions or insights based on arbitrary criteria defined during insight import.
Comma-separated list of language codes to filter insights by language
Response Body
curl -X GET "https://robotoff.openfoodfacts.org/api/v1/insights?insight_types=brand%2Clabel&barcode=5410041040807&annotated=true&annotation=1&value_tag=string&brands=carrefour%2Cferrero&countries=string&server_type=off&predictor=universal-logo-detector&order_by=popularity&count=25&page=1&campaigns=agribalyse-category&lc=en%2Cfr%2Cde"
{
"insights": [
{
"id": "3cd5aecd-edcc-4237-87d0-6595fc4e53c9",
"type": "label",
"barcode": 9782012805866,
"countries": [
"en:france",
"en:united-kingdom"
]
}
],
"status": "found",
"count": 10
}