{"openapi":"3.1.0","info":{"title":"Snowflake ID API","version":"1.0.0","description":"Decode and build snowflake IDs — the 64-bit, time-sortable identifiers used by Twitter/X, Discord, Instagram and many distributed systems. Pass an ID and a platform and the service extracts the embedded creation timestamp (turn any Discord, Twitter/X or Instagram ID into the exact moment it was created) along with the machine and sequence components for that platform's epoch and bit layout. Supported platforms: twitter (X), discord, instagram, sony, and custom (supply your own epoch). The encode endpoint does the reverse: build the lower-bound snowflake for a given timestamp, so you can query \"all IDs created at or after this moment\" — the standard trick for time-based pagination on snowflake APIs. Everything is computed locally with exact 64-bit BigInt math and no network calls. Ideal for analytics, data forensics, API pagination and debugging distributed-ID systems. A snowflake-ID toolkit — distinct from UUID/ULID generation (uuid) and date/time math (datetime). No upstream key, no cache.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/snowflake-api","description":"oanor gateway"}],"tags":[{"name":"Snowflake"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/decode":{"get":{"operationId":"get_v1_decode","tags":["Snowflake"],"summary":"Decode a snowflake ID","description":"","parameters":[{"name":"id","in":"query","required":true,"description":"Snowflake ID","schema":{"type":"string"},"example":"175928847299117063"},{"name":"platform","in":"query","required":false,"description":"twitter, discord, instagram, sony, custom","schema":{"type":"string"},"example":"discord"},{"name":"epoch","in":"query","required":false,"description":"Custom epoch (unix ms) when platform=custom","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"id":"175928847299117063","epoch_ms":1420070400000,"platform":"discord","components":{"increment":7,"worker_id":1,"process_id":0},"timestamp_ms":1462015105796,"timestamp_iso":"2016-04-30T11:18:25.796Z"},"meta":{"timestamp":"2026-06-01T23:40:44.027Z","request_id":"ba60688a-2c85-4ff0-94f4-4aa1123a513d"},"status":"ok","message":"Snowflake decoded","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/encode":{"get":{"operationId":"get_v1_encode","tags":["Snowflake"],"summary":"Build a snowflake for a time","description":"","parameters":[{"name":"timestamp","in":"query","required":true,"description":"ISO 8601 or unix time","schema":{"type":"string"},"example":"2024-01-01T00:00:00Z"},{"name":"platform","in":"query","required":false,"description":"twitter, discord, instagram, sony, custom","schema":{"type":"string"},"example":"twitter"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"lower-bound id (machine & sequence fields zeroed) — use for 'IDs created at/after this time' queries","platform":"twitter","snowflake":"1741610183685046272","timestamp_ms":1704067200000,"timestamp_iso":"2024-01-01T00:00:00.000Z"},"meta":{"timestamp":"2026-06-01T23:40:44.130Z","request_id":"799c1c43-c9aa-439f-ae57-556ba1e92ca8"},"status":"ok","message":"Snowflake built","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Platform epochs & layouts","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Decode and build snowflake IDs — the 64-bit, time-sortable identifiers used by Twitter/X, Discord, Instagram and many distributed systems. /v1/decode?id=175928847299117063&platform=discord extracts the embedded creation timestamp (the headline use — turn any Discord/Twitter/Instagram ID into the exact moment it was created) plus the machine and sequence components for the chosen platform's epoch and bit layout. Supported platforms: twitter (X), discord, instagram, sony, and custom (pass your own epoch). /v1/encode?timestamp=2024-01-01T00:00:00Z&platform=twitter builds the lower-bound snowflake for a time, so you can query 'all IDs created at or after this moment' — the standard trick for time-based pagination on snowflake APIs. Everything is computed locally with BigInt math and no network calls. Ideal for analytics, data forensics, API pagination and debugging. A snowflake-ID toolkit — distinct from UUID/ULID generation (uuid) and date/time math (datetime). No key, no cache.","endpoints":["/v1/decode","/v1/encode","/v1/meta"],"platforms":{"sony":{"fields":["worker_id(10b)","sequence(12b)"],"epoch_ms":1420070400000,"epoch_iso":"2015-01-01T00:00:00.000Z"},"discord":{"fields":["worker_id(5b)","process_id(5b)","increment(12b)"],"epoch_ms":1420070400000,"epoch_iso":"2015-01-01T00:00:00.000Z"},"twitter":{"fields":["datacenter_id(5b)","worker_id(5b)","sequence(12b)"],"epoch_ms":1288834974657,"epoch_iso":"2010-11-04T01:42:54.657Z"},"instagram":{"fields":["shard_id(13b)","sequence(10b)"],"epoch_ms":1314220021721,"epoch_iso":"2011-08-24T21:07:01.721Z"}}},"meta":{"timestamp":"2026-06-01T23:40:44.234Z","request_id":"d53ab922-74ac-4aff-8a5c-3496c4f4ef1f"},"status":"ok","message":"Meta retrieved","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":2160,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":635,"monthly_call_quota":42000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2060,"monthly_call_quota":220000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":5370,"monthly_call_quota":830000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/snowflake-api"}