---
id: "ean"
kind: "datatype"
status: "stable"
is_pii: false
categories: ["gs1", "objectids"]
langs: ["common"]
quality: 100
url: "http://registry.apicrafter.io/datatype/ean"
---

# European Article Number (EAN-13, EAN-8) (`ean`)

GS1 barcode number of a trade item, the form of the GTIN printed under EAN-13 and EAN-8 barcodes on retail goods, books, music releases and video discs. EAN-13 has 13 digits: a GS1 prefix, a company number, an item reference and a check digit. EAN-8 has 8 digits and is used on small packages. The last digit is a GS1 mod 10 check digit. Books carry their ISBN-13 as an EAN-13 with the prefix 978 or 979. A GS1 element string (gtin) carries the same number as 14 digits, with leading zeros, after the Application Identifier 01.

- Personal data (PII): no
- Categories: GS1 standards (gs1), Objects identifiers (objectids)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:\d{8}|\d{13})$
```

Check digit algorithm: `gtin`

## Examples

- `9506000134352` — GS1's example GTIN 09506000134352 as an EAN-13
- `9520000000011` — Synthetic number with the GS1 demonstration prefix 952
- `9780521293662` — ISBN-13 978-0-521-29366-2 as an EAN-13
- `95060001343520` (invalid example) — Fourteen digits, a GTIN-14

## Mappings

- autotype: `EAN13_correct`, `ean`
- fta: `CHECKDIGIT.EAN13`
- schema_org: `gtin13`
- stdnum: `ean`

## Metacrafter rules

5 rules: 2 match the field name, 3 match values.

- `ean13value` (data, `common/gs1.yaml`)
- `ean8value` (data, `common/gs1.yaml`)
- `eanfield` (field, `common/gs1.yaml`)
- `eanvalue` (data, `common/media.yaml`)
- `media_eanfield` (field, `common/media.yaml`)

## Supported by tools

- `autotype`
- `dataprep`
- `fta`
- `greatexpectations`
- `metacrafter`
- `pythonstdnum`

## Translations

- ru: Европейский код товара (EAN-13, EAN-8): Штрихкод товара по стандарту GS1 из 13 или 8 цифр; последняя цифра контрольная.

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/International_Article_Number>
- doc: <https://www.gs1.org/standards/id-keys/gtin>

## Quality

Score 100/100.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/ean.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/gs1/ean.yaml>
