Twitter Archive Format Explained: Complete Technical Guide
What is a Twitter Archive?
A Twitter archive is a complete downloadable copy of all your Twitter data, provided by Twitter as part of your account data rights under privacy regulations like GDPR and CCPA.
What's included in your Twitter archive:
- All your tweets from account creation to download date
- Retweets you've made
- Replies to other users
- Direct messages (DMs)
- Account information (bio, profile, settings)
- Follower and following lists (at time of archive creation)
- Interests and ad data
- Connected apps
- Account history
What's NOT included:
- Real-time analytics or engagement metrics
- Historical follower counts over time
- Engagement on individual tweets (likes, retweets received)
- Tweet impressions or reach data
- Deleted tweets (only tweets active at time of archive)
The Twitter archive is primarily designed as a personal backup and data portability tool, not an analytics solution. For comprehensive Twitter analytics with engagement metrics and historical tracking, you need specialized tools like Tweet Archivist.
Who should download their Twitter archive:
- Users wanting personal backup of their tweets
- Researchers analyzing their own Twitter behavior
- People considering deleting their Twitter account but wanting to keep data
- Users exercising data portability rights
- Developers learning Twitter's data structure
How to Request Your Archive
Twitter makes requesting your archive straightforward, though processing takes 24-48 hours.
Step-by-step process:
1. Access Settings
- Log into Twitter on desktop (mobile doesn't support archive requests)
- Click "More" in left sidebar
- Click "Settings and privacy"
2. Navigate to Archive Request
- Click "Your account"
- Click "Download an archive of your data"
- You may need to re-enter your password
3. Confirm Request
- Click "Request archive"
- Twitter will send confirmation email
4. Wait for Processing
- Twitter processes archive in background
- Typically takes 24-48 hours
- You'll receive email when ready
5. Download Archive
- Click link in notification email
- Or return to same settings page
- Download ZIP file (size varies by account activity)
Processing time factors:
- Account size: Accounts with millions of tweets take longer
- Twitter server load: High-traffic periods may slow processing
- Typical range: 12-48 hours for most accounts
Important notes:
- You can only request one archive at a time
- Must wait 24 hours between requests
- Download link expires after a few days
- Free with no limitations
For ongoing analytics rather than one-time backup, consider using Tweet Archivist which continuously collects and tracks your Twitter data without manual exports.
Archive File Structure
When you extract the downloaded ZIP file, you'll see a specific folder and file structure.
Root Directory Contents:
twitter-archive/ ├── Your archive.html (main browsing interface) ├── README.txt (basic instructions) ├── data/ (folder containing all your data) ├── assets/ (folder with images, styling, JavaScript)Key Files Explained:
Your archive.html
An interactive web interface for browsing your archive. Open this in a web browser to:
- Browse tweets chronologically
- Search your tweet history
- View by month and year
- See basic statistics
This is user-friendly but not designed for data analysis or exports.
data/ Directory
Contains all your actual data in JavaScript files (JSON format with JavaScript wrappers). Key files include:
- tweets.js - All your tweets (most important file)
- account.js - Account information and settings
- profile.js - Profile data (bio, location, etc.)
- follower.js - List of followers at archive time
- following.js - List of accounts you follow
- direct-messages.js - Your DM history
- like.js - Tweets you've liked
- ad-impressions.js - Ads Twitter has shown you
- personalization.js - Data Twitter uses for ad targeting
assets/ Directory
Contains CSS, JavaScript, and image files that make the HTML interface work. Not typically needed for data analysis.
File Format Note:
Data files use .js extension but contain JSON data with a JavaScript wrapper. Format looks like:
window.YTD.tweets.part0 = [
{"tweet": {...}},
{"tweet": {...}}
]To use data programmatically, you need to either:
- Remove the JavaScript wrapper to get pure JSON
- Parse it as JavaScript then extract data
- Use specialized tools that understand this format
Understanding Data Files
Let's examine the most important data files in detail.
tweets.js - Your Tweet History
The largest and most valuable file, containing every tweet you've posted.
File location: data/tweets.js
What it contains:
- Tweet text (full text)
- Tweet ID (unique identifier)
- Created timestamp
- Reply/retweet information
- Media attachments (URLs/metadata)
- URLs shared
- Hashtags used
- Mentions included
- Location data (if enabled)
What it does NOT contain:
- Engagement metrics (likes, retweets, replies received)
- Impression or reach data
- Performance analytics
For tweets with full analytics, use Tweet Archivist which captures engagement data.
account.js - Account Information
Contains:
- Account creation date
- Username and display name
- Email and phone
- Account status (protected, verified, etc.)
- Country and language settings
profile.js - Profile Data
Contains:
- Bio/description
- Location
- Website
- Profile and header image URLs
- Avatar history
follower.js & following.js - Connection Data
Contains:
- Account ID and username of each follower/following
- Snapshot from archive creation time only
- No historical follower growth data
Important limitation: These files only show followers at archive creation time. To track follower growth over time, you need continuous tracking like Tweet Archivist provides.
direct-messages.js - DM History
Contains:
- All sent and received DMs
- Conversation metadata
- Message timestamps
- Participant information
Privacy note: Be careful sharing archives as they include private messages.
like.js - Liked Tweets
Contains:
- Tweets you've liked
- Full tweet text and metadata
- Timestamp when you liked it
ad-impressions.js & personalization.js
Contains:
- Ads Twitter has shown you
- Interests Twitter has inferred
- Demographic info used for ad targeting
- Advertiser engagement data
Interesting for understanding how Twitter profiles you, but not typically useful for analytics.
Tweet Data Structure
Understanding the structure of individual tweets in your archive is crucial for extracting useful information.
Example tweet object structure:
{
"tweet": {
"edit_info": {
"initial": {
"editTweetIds": ["1234567890123456789"],
"editableUntil": "2024-01-15T10:30:00.000Z",
"editsRemaining": "5",
"isEditEligible": true
}
},
"retweeted": false,
"source": "Twitter Web App",
"entities": {
"hashtags": [{"text": "TwitterAnalytics", "indices": [10, 27]}],
"urls": [{"url": "https://t.co/abc123", "expanded_url": "https://example.com", "display_url": "example.com", "indices": [28, 51]}],
"user_mentions": [{"screen_name": "username", "name": "Display Name", "id": "123456789", "indices": [0, 9]}]
},
"display_text_range": ["0", "280"],
"favorite_count": "0",
"id_str": "1234567890123456789",
"truncated": false,
"retweet_count": "0",
"id": "1234567890123456789",
"possibly_sensitive": false,
"created_at": "Mon Jan 15 10:15:00 +0000 2024",
"favorited": false,
"full_text": "Your tweet text here #TwitterAnalytics https://t.co/abc123",
"lang": "en"
}
}Key fields explained:
id_str / id
Unique identifier for the tweet. Use id_str (string version) to avoid number precision issues in some programming languages.
created_at
Timestamp when tweet was posted. Format: "Day Mon DD HH:MM:SS +0000 YYYY"
full_text
Complete text of your tweet (up to 280 characters).
entities
Structured data about elements in the tweet:
- hashtags: Array of hashtags with text and position
- urls: Links with shortened (t.co) and original URLs
- user_mentions: @mentions with username and user ID
- media: Images/videos with URLs and metadata (if present)
source
Which app or interface you used to post (Twitter Web App, iPhone, Android, third-party app).
in_reply_to_status_id / in_reply_to_user_id
If tweet is a reply, IDs of the tweet and user being replied to.
retweet_count / favorite_count
NOTE: These show "0" in archives. Twitter doesn't include actual engagement metrics in archives. For engagement data, use analytics tools.
geo / coordinates / place
Location data if you enabled geotagging. Most tweets won't have this.
possibly_sensitive
Boolean indicating if tweet may contain sensitive content.
lang
Detected language of tweet (en, es, fr, etc.).
Extracting Useful Data
To analyze your Twitter archive, you need to convert it from JavaScript files to usable formats.
Method 1: Manual Conversion to JSON
For non-programmers using text editor:
- Open tweets.js in text editor
- Delete first line:
window.YTD.tweets.part0 = - Save as tweets.json
- Now you have valid JSON you can import to other tools
Method 2: Convert to CSV/Excel
Several free online tools can convert Twitter archive to spreadsheet format:
- Search for "Twitter archive to CSV converter"
- Upload your tweets.js file
- Download converted CSV
- Open in Excel or Google Sheets
Limitations: Simple conversions lose nested data like hashtags and URLs.
Method 3: Python Script
For programmers, Python makes extraction straightforward:
import json
import pandas as pd
# Read the tweets.js file
with open('data/tweets.js', 'r', encoding='utf-8') as f:
# Skip the first line (JavaScript wrapper)
f.readline()
# Parse JSON
tweets = json.loads(f.read())
# Extract key fields
tweet_data = []
for item in tweets:
t = item['tweet']
tweet_data.append({
'id': t['id_str'],
'created_at': t['created_at'],
'text': t['full_text'],
'retweet_count': t['retweet_count'],
'favorite_count': t['favorite_count'],
'hashtags': ','.join([h['text'] for h in t['entities']['hashtags']]),
'urls': ','.join([u['expanded_url'] for u in t['entities']['urls']])
})
# Convert to DataFrame and save to CSV
df = pd.DataFrame(tweet_data)
df.to_csv('tweets.csv', index=False)
print(f"Extracted {len(df)} tweets to tweets.csv")Method 4: Use Specialized Tools
Rather than manual extraction, consider tools designed for Twitter data analysis:
- Tweet Archivist can import Twitter archives and add engagement metrics
- Provides ready-to-use analytics without coding
- Combines archive data with real-time analytics
What to extract for analysis:
Essential fields:
- Tweet ID
- Date/time posted
- Tweet text
- Hashtags
- URLs
- Mentions
- Reply/retweet status
For analysis:
- Posting frequency over time
- Most-used hashtags
- Content themes and topics
- Posting time patterns
- Reply vs. original tweet ratio
- Links shared
Analysis Approaches
Once you've extracted data from your Twitter archive, here are valuable analyses you can perform.
1. Posting Pattern Analysis
What to analyze:
- Tweets per day/week/month over time
- Time of day you typically post
- Day of week patterns
- Posting frequency changes over account lifetime
Insights: Understand your posting habits and consistency. Compare to optimal posting times.
How to do it:
- Extract created_at timestamps
- Convert to your timezone
- Group by hour, day, month
- Create visualizations (line charts, heat maps)
2. Content Analysis
What to analyze:
- Most frequently used words and phrases
- Top hashtags
- Topics and themes
- Tweet length distribution
- Media usage (tweets with images/videos)
Insights: Understand what you talk about most and how your content has evolved.
Tools: Word cloud generators, text analysis tools, Excel pivot tables.
3. Engagement Pattern Analysis
What to analyze:
- Reply vs. original tweet ratio
- Who you mention most
- Conversation patterns
- Quote tweet frequency
Limitations: Archive doesn't show who engaged with you, only your outbound activity.
4. Network Analysis
What to analyze:
- Who you interact with most
- Mention network (who you @mention)
- Follower/following overlap
Insights: Identify key relationships and your position in Twitter networks.
5. Temporal Evolution
What to analyze:
- How your content focus has changed over years
- Evolution of posting frequency
- Changes in engagement style
- Topic shifts
Insights: See how your Twitter presence has matured and evolved.
6. Content Performance Indicators
While archives don't include engagement metrics, you can infer some patterns:
- Tweets with certain hashtags
- Tweets with media vs. text-only
- Tweet length patterns
- Time-of-day posting patterns
For actual performance analysis with engagement data, you need tools like Tweet Archivist that track likes, retweets, and impressions.
Archive Limitations and Alternatives
Understanding Twitter archive limitations helps you choose the right tool for your needs.
Critical Limitations:
1. No Engagement Metrics
Archives don't include:
- Actual likes, retweets, replies received
- Impressions or reach
- Click data
- Engagement rates
Impact: You can see what you posted but not how it performed. This makes archives unsuitable for analytics.
2. Point-in-Time Snapshot
Archives capture data at the moment of creation only:
- Follower list is current, not historical
- Can't see follower growth over time
- No tracking of changes
Impact: Can't analyze trends or growth patterns.
3. No Competitor or Hashtag Data
Archives only include your activity:
- Can't track competitors
- Can't analyze hashtag campaigns you didn't participate in
- Can't monitor brand mentions by others
Impact: No competitive intelligence or market research capability.
4. Manual, One-Time Process
- Must manually request each time
- 24-48 hour wait
- Can't automate or schedule
- Creates gaps if not requested regularly
Impact: Not suitable for ongoing analytics or monitoring.
5. Data Format Challenges
- JavaScript-wrapped JSON requires conversion
- Nested structure difficult to analyze without programming
- No built-in analysis tools
Impact: Technical barrier for non-programmers.
When Twitter Archives Are Sufficient:
- Personal backup before deleting account
- One-time analysis of your own tweets
- Exercising data portability rights
- Academic research on your own behavior
- Learning Twitter data structure
When You Need Professional Tools:
- Ongoing analytics: Regular performance tracking
- Engagement measurement: Understanding what works
- Competitor tracking: Competitive intelligence
- Campaign measurement: Hashtag and keyword tracking
- Business decisions: ROI analysis and strategy optimization
- Team collaboration: Shared analytics and reporting
Professional Alternative: Tweet Archivist
For comprehensive Twitter analytics, Tweet Archivist provides what archives can't:
- Complete engagement metrics: Likes, retweets, replies, impressions
- Historical tracking: Automatic daily data collection
- Unlimited accounts: Track yourself, competitors, anyone
- Campaign tracking: Monitor hashtags and keywords
- Easy export: Get data in Excel/CSV format
- No technical skills needed: User-friendly interface
- Real-time monitoring: Continuous tracking, not one-time snapshot
Try Tweet Archivist free for 14 days - no credit card required. Compare pricing plans.
Complementary Approach:
Use both for maximum value:
- Twitter Archive: One-time deep historical backup
- Tweet Archivist: Ongoing analytics with engagement data
This combination gives you complete tweet history plus actionable analytics.
Additional Resources:
- How to Export Twitter Data to Excel
- Twitter Analytics Best Practices
- Twitter Analytics Tools Overview
- Free Twitter Analytics Tools Comparison
Need help analyzing your Twitter archive?
Whether you're working with Twitter archives or need comprehensive analytics, Tweet Archivist makes Twitter data analysis simple and powerful. Start your free trial to access professional Twitter analytics without the technical complexity of parsing archive files.