Last updated
Twitter Snowflake ID Examples 2024
This page provides current examples of Twitter Snowflake IDs from 2024, showing what IDs look like today and how to decode them. The Snowflake algorithm hasn't changed since 2010 — the same code works for all IDs.
What 2024 Twitter IDs Look Like
Twitter IDs in 2024 are 19-digit numbers, reflecting billions of tweets and accounts created since 2010. Examples:
- IDs in early 2024 start around
1740000000000000000 - IDs in mid-2024 are around
1800000000000000000 - IDs in late 2024 are around
1860000000000000000
Decoding a 2024 ID
// JavaScript — decode a 2024-era Twitter ID
const TWITTER_EPOCH = 1288834974657n;
function decodeSnowflake(idStr) {
const id = BigInt(idStr);
const timestampMs = (id >> 22n) + TWITTER_EPOCH;
const date = new Date(Number(timestampMs));
return {
date: date.toISOString(),
unixMs: timestampMs.toString(),
datacenterId: Number((id >> 17n) & 0x1Fn),
workerId: Number((id >> 12n) & 0x1Fn),
sequence: Number(id & 0xFFFn)
};
}
// 2024 example IDs
const ids2024 = [
"1740000000000000000",
"1760000000000000000",
"1800000000000000000",
"1840000000000000000",
];
ids2024.forEach(id => {
const decoded = decodeSnowflake(id);
console.log(`${id} → ${decoded.date}`);
});
Python: Decode 2024 IDs
# Python — decode 2024 Twitter IDs
from datetime import datetime, timezone
TWITTER_EPOCH_MS = 1288834974657
def decode(id_str):
id_val = int(id_str)
ts_ms = (id_val >> 22) + TWITTER_EPOCH_MS
return datetime.fromtimestamp(ts_ms / 1000, tz=timezone.utc)
# 2024 reference IDs
ids_2024 = {
"1740000000000000000": "Early 2024",
"1760000000000000000": "Q1 2024",
"1800000000000000000": "Mid 2024",
"1840000000000000000": "Late 2024",
}
for id_str, label in ids_2024.items():
dt = decode(id_str)
print(f"{label}: {dt.strftime('%Y-%m-%d')} (ID: {id_str})")
Finding the ID Range for 2024
// Get the approximate ID range for the entire year 2024
function getYearIdRange(year) {
const TWITTER_EPOCH = 1288834974657n;
const startDate = new Date(`${year}-01-01T00:00:00Z`);
const endDate = new Date(`${year}-12-31T23:59:59Z`);
const startMs = BigInt(startDate.getTime()) - TWITTER_EPOCH;
const endMs = BigInt(endDate.getTime()) - TWITTER_EPOCH;
return {
year,
minId: (startMs << 22n).toString(),
maxId: ((endMs << 22n) | 0x3FFFFFn).toString()
};
}
console.log(getYearIdRange(2024));
// Use minId as since_id and maxId as max_id in API queries
Handling 2024 IDs in JavaScript
// 2024 IDs are 19 digits — well beyond Number.MAX_SAFE_INTEGER
// Always use BigInt or string representation
const MAX_SAFE = Number.MAX_SAFE_INTEGER;
console.log("Max safe integer:", MAX_SAFE);
// 9007199254740991 (16 digits)
// 2024 Twitter IDs are ~19 digits — MUST use BigInt
const id2024 = "1800000000000000000";
// WRONG — precision loss
const wrong = Number(id2024);
console.log("Wrong:", wrong); // May be imprecise
// CORRECT — BigInt
const correct = BigInt(id2024);
console.log("Correct:", correct.toString()); // "1800000000000000000"
// When receiving from Twitter API v2, IDs come as strings by default
// Always parse with BigInt() before doing arithmetic
Using 2024 IDs for API Queries
# Python — fetch tweets from a specific 2024 time window
import requests
from datetime import datetime, timezone
TWITTER_EPOCH_MS = 1288834974657
def date_to_min_id(dt):
ts_ms = int(dt.timestamp() * 1000) - TWITTER_EPOCH_MS
return str(ts_ms << 22)
def fetch_tweets_from_2024(query, start_date, bearer_token):
since_id = date_to_min_id(start_date)
headers = {"Authorization": f"Bearer {bearer_token}"}
params = {
"query": query,
"since_id": since_id,
"max_results": 100,
"tweet.fields": "created_at,author_id"
}
response = requests.get(
"https://api.twitter.com/2/tweets/search/recent",
headers=headers,
params=params
)
return response.json()
# Fetch tweets from January 2024
start = datetime(2024, 1, 1, tzinfo=timezone.utc)
results = fetch_tweets_from_2024("#python", start, "YOUR_TOKEN")
Verifying Your Decoder Works with 2024 IDs
// Test your decoder against known 2024 reference points
function testDecoder() {
const TWITTER_EPOCH = 1288834974657n;
const tests = [
{ id: "1740000000000000000", expectedYear: 2024 },
{ id: "1800000000000000000", expectedYear: 2024 },
];
tests.forEach(({ id, expectedYear }) => {
const tsMs = (BigInt(id) >> 22n) + TWITTER_EPOCH;
const year = new Date(Number(tsMs)).getUTCFullYear();
const pass = year === expectedYear;
console.log(`${id}: year=${year} ${pass ? "✓" : "✗"}`);
});
}
testDecoder();
ID Growth Rate in 2024
Twitter generates IDs at a high rate in 2024. Comparing milestone IDs shows the pace:
- Each 100 million IDs represents a very short time window at current activity levels
- High-traffic events (breaking news, sports) produce bursts of IDs with high sequence numbers
- The sequence number (bits 11–0) can reach 4095 during peak activity on a single worker
- Across 1024 workers, Twitter can generate over 4 million IDs per millisecond
The Snowflake algorithm is unchanged from 2010 — the same decoder that works for 2010 IDs works perfectly for 2024 IDs. The only difference is the numeric magnitude of the IDs, which requires BigInt handling in JavaScript.