Personal search

Get Attribute Groups

Attributes are at the heart of personal search. They score the products according to different criterias, which could then be matched to a user's preferences.

This API helps you list attributes and display them in your application, for the user to choose the importance of each criteria.

note: /api/v2/attribute_groups_{lc} is also a valid route, but consider it deprecated

GET
/api/v2/attribute_groups
User-Agent<token>

Identification using the User-Agent header. This is recommended in all requests so that we can contact you if there are issues. If we cannot identify the source of problematic API queries, we may have to block them. User-Agent header in the format 'app_name/app_version (URL or contact info)'

In: header

Query Parameters

lc?string

2 letter code of the language of the user. Used for localizing some fields in returned values (e.g. knowledge panels). If not passed, the language may be inferred by the domain name prefix.

Response Body

curl -X GET "https://world.openfoodfacts.net/api/v2/attribute_groups?lc=fr"
[
  {
    "id": "string",
    "name": "string",
    "attributes": [
      {
        "id": "string",
        "name": "string",
        "icon_url": "string",
        "setting_name": "string",
        "setting_note": "string",
        "default": "mandatory",
        "panel_id": "string"
      }
    ]
  }
]