Last updated
What is a Tweet ID?
A Tweet ID is a unique numeric identifier assigned to every tweet on Twitter. It's a Snowflake ID that encodes the tweet's creation timestamp and other metadata in a 64-bit integer format.
Why Do You Need Tweet IDs?
- Twitter API: Required for API calls to fetch, delete, or interact with specific tweets
- Analytics: Track and analyze specific tweets over time
- Embedding: Embed tweets on websites using their IDs
- Archiving: Save and reference tweets permanently
- Reporting: Report problematic tweets to Twitter support
- Research: Study tweet patterns and timelines
Tweet ID Format
Tweet IDs follow Twitter's Snowflake format:
- 18-19 digit numbers (e.g., 1382350606417817604)
- Encode timestamp since November 4, 2010
- Include worker ID, process ID, and sequence number
- Sortable chronologically (higher ID = newer tweet)
Common Use Cases
- Building Twitter bots and automation tools
- Creating Twitter analytics dashboards
- Embedding tweets on blogs and websites
- Archiving important tweets
- Reporting tweets to Twitter support
- Academic research on Twitter data
Troubleshooting
Problem: Can't see the full URL on mobile
Solution: Use the "Copy link" feature instead of trying to view the URL directly
Problem: Tweet ID looks different in API response
Solution: Use id_str field instead of id to get the full ID as a string
Problem: Deleted tweet - can't get ID
Solution: If you have a screenshot or cached version, the ID is still in the URL
Quick Reference
- Tweet IDs are 18–19 digit numbers (Snowflake format)
- Always use the string representation in JavaScript to avoid precision loss
- The tweet ID encodes the creation timestamp — decode it with the Snowflake decoder
- Reconstruct any tweet URL:
https://twitter.com/i/web/status/[ID] - Use
since_idin API calls to fetch only tweets newer than a known ID - Tweet IDs are permanent — they don't change even if the tweet is edited
Once you have a tweet ID, use the Snowflake decoder on this site to extract the exact creation timestamp and other metadata.
Examples
Example 1: Finding a Tweet ID from the URL
The easiest method — the tweet ID is always in the URL.
Tweet URL format:
https://twitter.com/[username]/status/[TWEET_ID]
Example:
https://twitter.com/user/status/1382350606417817604
^^^^^^^^^^^^^^^^^^^
Tweet ID: 1382350606417817604
Steps:
1. Open the tweet in your browser
2. Look at the address bar
3. Copy the number after "/status/"
Or: Right-click the tweet → "Copy link to Tweet"
The copied URL contains the tweet ID at the end.
Example 2: Finding Tweet IDs via Twitter API v2
// Fetch a user's recent tweets and extract IDs
// Using Twitter API v2 with Bearer Token
const response = await fetch(
'https://api.twitter.com/2/users/:id/tweets?max_results=10',
{
headers: {
'Authorization': `Bearer ${process.env.TWITTER_BEARER_TOKEN}`
}
}
);
const data = await response.json();
// Each tweet object contains:
// id: "1382350606417817604" ← always use the string version
// text: "Tweet content..."
data.data.forEach(tweet => {
console.log(`ID: ${tweet.id}`);
console.log(`Text: ${tweet.text}`);
console.log(`URL: https://twitter.com/i/web/status/${tweet.id}`);
});
Example 3: Search Tweets and Get IDs
// Twitter API v2 — Recent Search
const searchUrl = 'https://api.twitter.com/2/tweets/search/recent';
const params = new URLSearchParams({
query: 'from:username -is:retweet',
max_results: '10',
'tweet.fields': 'created_at,author_id'
});
const response = await fetch(`${searchUrl}?${params}`, {
headers: { 'Authorization': `Bearer ${BEARER_TOKEN}` }
});
const { data } = await response.json();
// data is an array of tweet objects
// Each has: id, text, created_at, author_id
data.forEach(tweet => {
console.log(tweet.id); // "1382350606417817604"
console.log(tweet.created_at); // "2021-04-14T17:05:00.000Z"
});
Frequently Asked Questions
The Tweet ID is the long number at the end of the tweet URL. For example, in 'twitter.com/user/status/1382350606417817604', the Tweet ID is '1382350606417817604'. Simply copy this number from the URL to get the Tweet ID.
On mobile: 1) Open the tweet, 2) Tap the share icon, 3) Select 'Copy link', 4) Paste the link to see the URL, 5) The Tweet ID is the number at the end of the URL. Works on both iOS and Android Twitter apps.
Yes, right-click the tweet timestamp or 'Share' button and select 'Copy link address' (Chrome) or 'Copy Link' (Firefox). The copied URL contains the Tweet ID at the end. This works on desktop browsers.
Twitter API responses include the Tweet ID in the 'id' or 'id_str' field. Use 'id_str' for accuracy as it's a string representation of the full 64-bit ID. Example: tweet.id_str returns the Tweet ID as a string.
Tweet IDs are 18-19 digit numbers (e.g., 1382350606417817604). They're Snowflake IDs that encode the tweet creation timestamp. Older tweets have shorter IDs, newer tweets have longer IDs.