About this endpoint
What it does
Parses a free-text ingredient list sent in the request body and returns a structured JSON object with additive, allergen, dietary, and classification fields. The endpoint does not change server state; it analyzes the input text and reports the extracted results.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| lang | ENUM | No | Hint about the language of the input text, used only to choose dictionary matching.<br>Allowed values: auto, it, en, fr, de, es.<br>Default: auto.<br>Does not affect response language; labels and tokens remain in English/stable form. |
| text | String | Yes | Free-text ingredient list to parse.<br>Maximum length: 5000 characters. |
Response
Returns a JSON object with these top-level fields: cached boolean or null, dietary object, degraded boolean, additives array of objects, allergens array of objects, llm_assisted boolean, degraded_reason string or null, allergens_traces array of objects, and unrecognized_ingredients array of strings.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| cached | Boolean | No | Whether the response was served from cache. Nullable. |
| dietary | Object | No | Dietary summary object with stable tokens/booleans.<br>Fields: vegan (likely / unlikely), vegetarian (likely / unlikely), contains_alcohol (boolean), contains_palm_oil (boolean), contains_added_sugars (boolean). |
| dietary.vegan | ENUM | No | Allowed values: likely, unlikely. |
| dietary.vegetarian | ENUM | No | Allowed values: likely, unlikely. |
| dietary.contains_alcohol | Boolean | No | Boolean flag. |
| dietary.contains_palm_oil | Boolean | No | Boolean flag. |
| dietary.contains_added_sugars | Boolean | No | Boolean flag. |
| degraded | Boolean | No | true if the applicative spend cap was reached and the service responded in deterministic-only mode. |
| additives | Object Array | No | Parsed additives found in the ingredient list. Each item may include code, name, name_it, category, confidence, and recognized. |
| additives[].code | String | No | Additive code such as an E-number. |
| additives[].name | String | No | Official EU name in English. Nullable. |
| additives[].name_it | String | No | Official EU name in Italian. Nullable. |
| additives[].category | String Array | No | Functional class tokens from the regulatory vocabulary. Nullable. An additive can have more than one category. |
| additives[].confidence | Number | No | Confidence score. |
| additives[].recognized | Boolean | No | true if the code was found in the regulatory table. |
| allergens | Object Array | No | Allergens declared as present, not traces-only matches. Each item may include id, label, source, eu_index, and confidence. |
| allergens[].id | String | No | Stable language-independent identifier. |
| allergens[].label | String | No | Canonical EU allergen name in English. |
| allergens[].source | ENUM | No | Allowed values: dictionary, llm. |
| allergens[].eu_index | Integer | No | Position in Annex II of Reg. (EU) 1169/2011. |
| allergens[].confidence | Number | No | Confidence score between 0 and 1. |
| llm_assisted | Boolean | No | Whether the LLM layer was used in the parse. |
| degraded_reason | ENUM | No | Allowed values: lifetime_cap_reached, daily_cap_reached, null. |
| allergens_traces | Object Array | No | Allergens mentioned only in a “may contain traces of” clause. Same item shape as allergens. |
| allergens_traces[].id | String | No | Stable language-independent identifier. |
| allergens_traces[].label | String | No | Canonical EU allergen name in English. |
| allergens_traces[].source | ENUM | No | Allowed values: dictionary, llm. |
| allergens_traces[].eu_index | Integer | No | Position in Annex II of Reg. (EU) 1169/2011. |
| allergens_traces[].confidence | Number | No | Confidence score between 0 and 1. |
| unrecognized_ingredients | String Array | No | Ingredient fragments that could not be classified, echoed back verbatim from the submitted text. |
Notes
allergens contains only confirmed allergens, while allergens_traces is reserved for “may contain traces of” matches. If you want a conservative view, read both arrays; if you only care about confirmed presence, read allergens alone.