Export and backup your X/Twitter account data — tweets, likes, bookmarks, followers, and following — as downloadable JSON. Also triggers X's official data archive download. Use when users want to backup, export, or archive their X account data.
Browser console scripts for exporting your X/Twitter account data without an API key.
| Goal | File | Navigate to |
|---|---|---|
| Backup profile, tweets, likes, bookmarks, followers/following | src/backupAccount.js | x.com/USERNAME |
| Trigger X's official data archive download | src/downloadAccountData.js | x.com/settings/download_your_data |
| Export data via API | api/routes/portability.js | API endpoint /api/portability/export |
x.com/USERNAMEsrc/backupAccount.js → Enterx.com/settings/download_your_datasrc/downloadAccountData.js → EnterbackupAccount.js)const CONFIG = {
maxTweets: 100, // Max tweets to scrape
maxLikes: 100, // Max likes to scrape
maxBookmarks: 100, // Max bookmarks to scrape
maxFollowing: 200, // Max following accounts
maxFollowers: 200, // Max follower accounts
scrollDelay: 2000, // ms between scroll actions
autoDownload: true, // Auto-download JSON on completion
sections: {
profile: true,
tweets: true,
likes: true,
bookmarks: true,
following: true,
followers: true,
},
};
backupAccount.js exports a single JSON with:
{
"meta": { "createdAt": "...", "source": "XActions Backup Tool", "version": "2.0.0" },
"profile": { ... },
"tweets": [ ... ],
"likes": [ ... ],
"bookmarks": [ ... ],
"following": [ ... ],
"followers": [ ... ]
}
backupAccount.js scrapes live DOM — accuracy improves with higher scroll countsdownloadAccountData.js relies on X's official export, which can take hours to daysmaxTweets / maxFollowers in CONFIG for deeper exports (slower)