How to Use Your X Archive JSON File (Complete Guide 2026)
How to Use Your X Archive JSON File (Complete Guide 2026)
TL;DR: Your X data archive contains several JavaScript/JSON files. The most useful ones are like.js (your liked tweets), tweet.js (your own tweets), and bookmarks.js (your bookmarks). These files store tweet IDs and text, but they're not easy to search or browse raw. This guide explains the file structure, how to extract data from each file, and how to turn your archive into a searchable knowledge base without writing code.
So you finally requested your X data archive. Maybe you wanted to back up your likes before they disappeared, or maybe you're trying to find a specific tweet you saved months ago. Either way, you've downloaded a ZIP file and now you're staring at a folder full of .js files wondering what to do next.
This guide breaks down every important file in the archive, shows you exactly what the data looks like, and explains your options for actually using it — from opening files manually to importing them into tools that do the heavy lifting for you.
What's Inside Your X Archive ZIP
When you extract your X archive, you'll find a folder called data/ alongside a browser-viewable Your Archive.html file. The data/ folder is where the actual raw data lives.
Here's what the most important files contain:
| File | What it stores |
|------|----------------|
| like.js | Every tweet you've liked, with tweet ID, URL, and full text |
| tweet.js | Your own tweets, replies, and retweets |
| bookmarks.js | Your bookmarked tweets (separate from likes) |
| account.js | Your profile info, creation date, username history |
| follower.js | List of your followers (user IDs only) |
| following.js | List of accounts you follow (user IDs only) |
| direct-messages.js | Your DM history |
| profile.js | Your bio, website, location |
The files you'll care about most for building a personal knowledge base are like.js and bookmarks.js.
Understanding the File Format
Every file in your X archive follows the same pattern. They're technically JavaScript files, not pure JSON — each one starts with a variable assignment like this:
window.YTD.like.part0 = [ ... ]
That prefix exists so the files work directly in Your Archive.html. But it means you can't open them with a standard JSON parser without stripping that first line.
To read the data as JSON, you need to remove the window.YTD.like.part0 = part at the start of each file, leaving you with a plain JSON array.
What's in like.js
The like.js file contains an array of objects, one for each tweet you've liked. Here's what a single entry looks like:
{
"like": {
"tweetId": "1743289145638416544",
"fullText": "The single highest-leverage thing in your interview loop is the take-home. Optional, paid, scoped to 4 hours. Tells you more than any whiteboard ever will.",
"expandedUrl": "https://x.com/i/status/1743289145638416544"
}
}
Fields explained:
tweetId— the unique ID of the liked tweet. You can construct a URL ashttps://x.com/i/status/{tweetId}.fullText— the full tweet text as it appeared when you liked it. This is critical: X stores this at archive time, so you have the text even if the original tweet is later deleted.expandedUrl— the direct URL to the tweet.
What's missing from like.js:
- The author's username or display name
- The explicit date you liked the tweet (though tools can approximate this — see below)
- Media attachments
- Engagement metrics (likes, retweets)
- Thread context
A note on dates: The tweet ID is a Twitter Snowflake ID, which encodes a timestamp. Tools like X Brain use this to approximate when the tweet was created (not when you liked it, but close enough to be useful for filtering by year).
What's in bookmarks.js
Bookmarks follow a similar structure to likes, but with an important difference — newer X archives typically don't include fullText for bookmarks, only the tweet ID:
{
"bookmark": {
"tweetId": "1756892341234567890"
}
}
This means bookmarks without full text can't be searched or classified — you'd need to look up each tweet ID via the X API to get the content. Bookmarks are stored separately from likes regardless. If you want a complete picture of everything you've saved on X, you need to process both files, keeping in mind this limitation for bookmarks.
What's in tweet.js
Your own tweets are stored with much richer data:
{
"tweet": {
"id": "1798234567890123456",
"full_text": "Just shipped semantic search for liked tweets. The recall is surprisingly good.",
"created_at": "Thu May 05 2026 09:23:11 +0000",
"favorite_count": "47",
"retweet_count": "12",
"lang": "en",
"entities": {
"hashtags": [],
"urls": [],
"user_mentions": []
}
}
}
Your own tweets include timestamps, engagement counts, language detection, and entity extraction (hashtags, URLs, mentions). This is the most complete dataset in the archive.
How to Open and Read the Files Without Code
Option 1: The Built-in Archive Viewer
The easiest starting point is Your Archive.html — open it in any browser. It gives you a web interface to browse your tweets, likes, and DMs. The problem: it's read-only, has no search, and handles large archives poorly (10,000+ likes will make it sluggish).
Option 2: Convert to JSON Manually
If you're comfortable with a text editor:
- Open
like.jsin VS Code or any text editor - Delete the first line:
window.YTD.like.part0 = - Delete the trailing semicolon at the end of the file
- Save as
likes.json - Open with any JSON viewer or import into a spreadsheet tool
For small archives this works fine. For archives with thousands of likes, you'll want a programmatic approach or a dedicated tool.
Option 3: Use a Spreadsheet
Once you have clean JSON, tools like Google Sheets, Airtable, or Notion can import it directly. You'll get a table of tweet IDs and text — searchable by keyword, but no semantic search, no classification, and no way to find tweets by meaning.
Option 4: Import Into a Dedicated Tool
Tools purpose-built for X archive analysis handle the parsing for you. You drop in the ZIP, they extract the files, clean up the format, and give you a proper interface. X Brain goes further by running AI classification and vector embedding on every tweet, so you can search by concept rather than exact keywords.
The Biggest Problem With Raw Archive Data
The raw files have a fundamental gap: like.js only stores tweet text at the time of archiving, with no author information and no timestamps for when you liked the tweet.
This means:
- You can't filter your likes by who wrote them (no author field)
- You can't see when you liked something (only when the tweet was created, if you use the tweet ID to look it up)
- You can't easily connect related tweets from the same author or thread
Most people discover this gap after they've downloaded the archive and tried to make sense of it. The workaround is to either accept these limitations, use the tweet URL to look up additional metadata via the X API (which has become expensive and restricted), or use an import tool that enriches the data during processing.
How Large Can the Archive Get?
Archive size varies enormously depending on how long you've been on X and how active you are:
- Light user (a few hundred likes): archive under 10 MB,
like.jsunder 1 MB - Active user (5,000–20,000 likes): archive 50–200 MB,
like.js5–20 MB - Power user (50,000+ likes): archive can exceed 1 GB, with split files like
like-part0.js,like-part1.js
If your archive is split into multiple parts, you'll need to combine the arrays before processing.
Working With Split Archive Files
Large archives split each data type across multiple files:
data/
like-part0.js
like-part1.js
like-part2.js
Each file follows the same format with a different variable name:
window.YTD.like.part0 = [...]window.YTD.like.part1 = [...]
To combine them, strip each prefix, merge the arrays, and process as one file. Most dedicated tools — including X Brain — currently expect a single like.js file, so if your archive is split you may need to merge the parts manually before importing. Split archives typically only occur for very large accounts with tens of thousands of tweets.
How to Turn Your Archive Into a Knowledge Base
1. Request and Download Your Archive
2. Upload the ZIP
Most tools accept the original ZIP directly. You don't need to extract or clean anything.
3. Process and Enrich
Raw archive data is just text and IDs. Useful knowledge base features require additional processing:
- Categorization: grouping tweets by topic (engineering, career, finance, etc.)
- Semantic embedding: converting tweet text to vectors so you can search by meaning
- Knowledge extraction: pulling out key takeaways, tools mentioned, and references
- Language detection: filtering to your language of choice
X Brain runs all of this automatically using your own API key (Anthropic, OpenAI, or Google Gemini).
4. Search and Browse
Once processed, you can search by meaning ("tweets about hiring"), filter by category, browse by topic, and export to Obsidian, Markdown, CSV, or JSON.
Frequently Asked Questions
What is the like.js file in my X archive?
like.js is a JavaScript file in your X data archive that contains every tweet you've liked on X (formerly Twitter). Each entry includes the tweet ID, the full text of the tweet, and a URL. The file uses a window.YTD.like.part0 = [...] format rather than plain JSON, so you need to strip that prefix before parsing it with standard tools.
Why doesn't like.js have author names or dates?
X's archive format only stores the tweet ID, text, and URL — not the author username or the date you liked the tweet. This is a limitation of X's export format. To get author information, you would need to use the X API to look up each tweet ID individually, which has become expensive and rate-limited. Dedicated tools like X Brain work around this by extracting what's available and enriching the data in other ways.
How do I convert like.js to CSV or Excel?
Strip the window.YTD.like.part0 = prefix from the file, leaving a clean JSON array. Then use a JSON-to-CSV converter (many free online tools exist) or import directly into Google Sheets using =IMPORTDATA() on a hosted file. You'll get columns for tweetId, fullText, and expandedUrl.
What's the difference between likes and bookmarks in the X archive?
They're stored in separate files (like.js and bookmark.js). Likes are public (visible on your profile); bookmarks are private. The key practical difference: like.js includes full tweet text, while bookmark.js in newer archives often only includes tweet IDs — meaning bookmarks without text can't be meaningfully searched or classified without additional lookups.
Can I search my liked tweets from the raw archive file?
Not easily. The raw like.js file is just text and tweet IDs. You can do basic keyword search by opening the file in a text editor and using Ctrl+F, but it's slow, fragile, and won't find tweets that match a concept without the exact words. For real search, you need either a spreadsheet import (keyword search only) or a semantic search tool.
How do I use my X archive with Obsidian?
You can import your X archive into X Brain, which exports an Obsidian-ready vault ZIP — one Markdown note per tweet, with YAML frontmatter, tags, category labels, and index files organized by topic. Drop the exported vault into your Obsidian vault folder and your liked tweets become native Obsidian notes you can link, tag, and search.
Does X archive include deleted tweets?
Yes — the text in like.js is stored at the time you requested the archive. If a tweet was deleted after you liked it but before you downloaded your archive, the text won't be there. But if you have the archive, the text is preserved even if the original tweet is later deleted from X.