---
id: "ipfs_cid"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["identifiers", "internet", "cryptography"]
langs: ["common"]
quality: 80
url: "http://registry.apicrafter.io/datatype/ipfs_cid"
---

# Content identifier (CID) of IPFS and IPLD (`ipfs_cid`)

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

Self-describing content address of the multiformats CID specification, used by IPFS, IPLD, Filecoin and the AT Protocol. It is made from a cryptographic hash of the content, so the same content always has the same CID. A CIDv0 is 46 base58btc characters starting with Qm and always holds a SHA-256 hash of a dag-pb block. A CIDv1 starts with a multibase prefix that names its encoding; the default is b for lowercase base32, as in bafy... strings. The regexp covers CIDv0 and base32 CIDv1, not CIDv1 in other encodings such as base58btc (prefix z) or base36 (prefix k).

- Personal data (PII): no
- Categories: Universal unique identifiers (identifiers), Internet (internet), Cryptographic identifiers (cryptography)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|b[a-z2-7]{58,})$
```

## Examples

- `QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR` — CIDv0 of the IPFS content addressing documentation
- `bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi` — The same content as a base32 CIDv1, IPFS documentation
- `QmY7Yh4UquoXHLPFo2XbhXkhBvFoPwmQUSa92pxnxjQuPU` — Sample CID of the IPFS CID Inspector
- `zb2rhe5P4gXftAwvA4eXQ5HJwsER2owDyS9sKaQRRVQPn93bA` (invalid example) — CIDv1 in base58btc, not covered
- `QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMn0` (invalid example) — 0 is not a base58btc character

## Translations

- ru: Идентификатор содержимого (CID) IPFS и IPLD

## Sources

- doc: <https://github.com/multiformats/cid>
- doc: <https://docs.ipfs.tech/concepts/content-addressing/>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

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