---
id: "foodex2_code"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["agriculture"]
country: ["EU"]
langs: ["common"]
quality: 90
url: "https://registry.apicrafter.io/datatype/foodex2_code"
---

# FoodEx2 food classification code (`foodex2_code`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Code of the FoodEx2 food classification and description system of the European Food Safety Authority (EFSA), used in EU food consumption, contaminant and residue data. A base term is A and four letters or digits. An extended code adds facets after the sign #, separated by the sign $, each a facet number such as F09, a dot and another FoodEx2 term.

- Personal data (PII): no
- Categories: Agriculture, livestock and food (agriculture)
- Countries: European Union (EU)
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^A[0-9A-Z]{4}(?:#F\d{2}\.A[0-9A-Z]{4}(?:\$F\d{2}\.A[0-9A-Z]{4})*)?$
```

## Examples

- `A02XN` — Tête de Moine cheese; Wikidata example
- `A008C` — Couscous; Wikidata example
- `A03BG#F09.A0EXH$F10.A077L$F21.A07SE` — Extended code with three facets; example of the UK Food Types Register
- `A03BG#F09=A0EXH` (invalid example) — Facet written with = as in the URL query form, not the FoodEx2 syntax

## Mappings

- bioregistry: `foodex2`
- wikidata: `P4637`

## Translations

- ru: Код классификации пищевых продуктов FoodEx2: Код системы классификации и описания пищевых продуктов FoodEx2 Европейского агентства по безопасности пищевых продуктов (EFSA).

## Sources

- doc: <https://www.efsa.europa.eu/en/data/data-standardisation>
- doc: <https://data.food.gov.uk/codes/ui/about-foodtypes>
- wikidata: <https://www.wikidata.org/wiki/Property:P4637>

## Quality

Score 90/100. Missing: detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/foodex2_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/EU/agriculture/foodex2_code.yaml>
