---
id: "snowflake_id"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["identifiers"]
langs: ["common"]
quality: 58
url: "http://registry.apicrafter.io/datatype/snowflake_id"
---

# Snowflake ID (`snowflake_id`)

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

64-bit identifier scheme that Twitter introduced in 2010 and that X, Discord, Instagram, Mastodon and other services use, each with its own epoch and bit layout. In the Twitter form the highest bit is 0, then come 41 bits of milliseconds since the epoch 1288834974657 (4 November 2010), 10 bits of machine ID and a 12-bit sequence number, so IDs sort by creation time. Discord uses the same layout with the epoch 1420070400000 (1 January 2015). Values are written as decimal numbers, today of 18 or 19 digits, and APIs often send them as strings because JavaScript numbers cannot hold 64-bit integers exactly. Any large integer looks the same, so there is no regexp; detect Snowflake IDs by field name.

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

## Examples

- `1888944671579078978` — Tweet ID from the Wikipedia article, created 2025-02-10 13:34:39.256 UTC

## Metacrafter rules

1 rules: 1 match the field name, 0 match values.

- `snowflakeidfield` (field, `basic/identifiers.yaml`)

## Supported by tools

- `metacrafter`

## Translations

- ru: Идентификатор Snowflake: 64-битный идентификатор, введённый Twitter. Он состоит из метки времени в миллисекундах, номера машины и порядкового номера. Его используют X, Discord, Instagram, Mastodon и другие сервисы.

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Snowflake_ID>
- wikidata: <https://www.wikidata.org/wiki/Q104889222>
- doc: <https://docs.discord.com/developers/reference#snowflakes>

## Quality

Score 58/100. Missing: regexp, second example, negative example, mapping (Wikidata, Schema.org, ...).

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