What is an Instagram Shortcode?
An Instagram shortcode is the unique identifier you see in Instagram URLs. For example, in https://instagram.com/p/CwkxyiVP2MU/, the shortcode is CwkxyiVP2MU.
This shortcode encodes the post's media ID, which contains the creation timestamp. By decoding it, you can find out exactly when a post or reel was created.
Step-by-Step Decoding Process
Get the shortcode from the Instagram URL. It's the part after /p/ or /reel/.
Example:
URL: https://instagram.com/p/CwkxyiVP2MU/
Shortcode: CwkxyiVP2MU
Instagram uses a custom Base64 alphabet. Convert the shortcode to a numeric media ID using this alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_
Right shift the media ID by 22 bits to extract the Unix timestamp (in seconds).
Convert the Unix timestamp to a human-readable date and time.