---
id: "casrn"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["chemistry"]
langs: ["common"]
quality: 95
url: "http://registry.apicrafter.io/datatype/casrn"
---

# CAS Registry Number (`casrn`)

> **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.

Identifier that the Chemical Abstracts Service (CAS) gives to a chemical substance: two to seven digits, a hyphen, two digits, a hyphen and a check digit.

- Personal data (PII): no
- Categories: Chemistry (chemistry)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[1-9]\d{1,6}-\d{2}-\d$
```

## Examples

- `7732-18-5` — Water
- `64-17-5` — Ethanol
- `50-00-0` — Formaldehyde
- `7732-18-57` (invalid example) — One character too many

## Mappings

- autotype: `cas`
- bioregistry: `cas`
- stdnum: `casrn`
- wikidata: `P231`

## Supported by tools

- `autotype`
- `dataprep`
- `pythonstdnum`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/CAS_Registry_Number>
- wikidata: <https://www.wikidata.org/wiki/Property:P231>
- other: <https://arthurdejong.org/python-stdnum/doc/2.2/stdnum.casrn.html>

## Quality

Score 95/100. Missing: translation.

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