Insight management

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.

GET
/insights

Query Parameters

insight_types?string

Comma-separated list, filter by insight types

barcode?integer

Filter by barcode value

annotated?boolean

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.

annotation?integer

Filter by annotation value of the insight. If not provided, all insights are returned. This works in conjunction with the annotated parameter.

value_tag?string

Filter by value tag, i.e the value that is going to be sent to Product Opener

brands?string

Comma-separated list, filter by brands

countries?string

Comma separated list, filter by country value (2-letter code)

server_type?string

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

Default"off"
Value in"off" | "obf" | "opff" | "opf" | "off_pro"
predictor?string

Filter by predictor value A predictor refers to the model/method that was used to generate the prediction.

order_by?string

How to order by insight results. By default, results are not ordered. Possible values are:

  • random: insights are ordered randomly
  • popularity: insights are returned by decreasing popularity, using the number of scans as proxy
Value in"random" | "popularity"
count?integer

The number of items to return

Default25
Range1 <= value
page?integer

Page index to return (starting at 1)

Default1
Range1 <= value
campaigns?string

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.

lc?string

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
}