Account Backup & Data Export
Browser console scripts for exporting your X/Twitter account data without an API key.
Script Selection
| 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 |
Quick Start
Browser backup (no API needed)
- Navigate to
x.com/USERNAME (your own profile)
- Open DevTools (F12) → Console
- Paste
src/backupAccount.js → Enter
- JSON file auto-downloads when complete
Official X data archive
- Navigate to
x.com/settings/download_your_data
- Open DevTools (F12) → Console
- Paste
src/downloadAccountData.js → Enter
- Script triggers the request and monitors progress (checks every 30s, up to 60 min)
Configuration (backupAccount.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,
},
};
Output Format
backupAccount.js exports a single JSON with:
{
"meta": { "createdAt": "...", "source": "XActions Backup Tool", "version": "2.0.0" },
"profile": { ... },
"tweets": [ ... ],
"likes": [ ... ],
"bookmarks": [ ... ],
"following": [ ... ],
"followers": [ ... ]
}
Notes
backupAccount.js scrapes live DOM — accuracy improves with higher scroll counts
downloadAccountData.js relies on X's official export, which can take hours to days
- Official export includes full history; browser scrape is limited to visible/scrolled content
- Increase
maxTweets / maxFollowers in CONFIG for deeper exports (slower)
Related Skills
- twitter-scraping — Scrape any profile, not just your own
- bookmarks-management — Export and organize bookmarks
- follower-monitoring — Track follower changes over time
- content-cleanup — Delete tweets and likes after backing up
1---2name: account-backup3description: 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.4license: Apache-2.05---67# Account Backup & Data Export89Browser console scripts for exporting your X/Twitter account data without an API key.1011## Script Selection1213| Goal | File | Navigate to |14|------|------|-------------|15| Backup profile, tweets, likes, bookmarks, followers/following | `src/backupAccount.js` | `x.com/USERNAME` |16| Trigger X's official data archive download | `src/downloadAccountData.js` | `x.com/settings/download_your_data` |17| Export data via API | `api/routes/portability.js` | API endpoint `/api/portability/export` |1819## Quick Start2021### Browser backup (no API needed)22231. Navigate to `x.com/USERNAME` (your own profile)242. Open DevTools (F12) → Console253. Paste `src/backupAccount.js` → Enter264. JSON file auto-downloads when complete2728### Official X data archive29301. Navigate to `x.com/settings/download_your_data`312. Open DevTools (F12) → Console323. Paste `src/downloadAccountData.js` → Enter334. Script triggers the request and monitors progress (checks every 30s, up to 60 min)3435## Configuration (`backupAccount.js`)3637```js38const CONFIG = {39 maxTweets: 100, // Max tweets to scrape40 maxLikes: 100, // Max likes to scrape41 maxBookmarks: 100, // Max bookmarks to scrape42 maxFollowing: 200, // Max following accounts43 maxFollowers: 200, // Max follower accounts44 scrollDelay: 2000, // ms between scroll actions45 autoDownload: true, // Auto-download JSON on completion46 sections: {47 profile: true,48 tweets: true,49 likes: true,50 bookmarks: true,51 following: true,52 followers: true,53 },54};55```5657## Output Format5859`backupAccount.js` exports a single JSON with:6061```json62{63 "meta": { "createdAt": "...", "source": "XActions Backup Tool", "version": "2.0.0" },64 "profile": { ... },65 "tweets": [ ... ],66 "likes": [ ... ],67 "bookmarks": [ ... ],68 "following": [ ... ],69 "followers": [ ... ]70}71```7273## Notes7475- `backupAccount.js` scrapes live DOM — accuracy improves with higher scroll counts76- `downloadAccountData.js` relies on X's official export, which can take hours to days77- Official export includes full history; browser scrape is limited to visible/scrolled content78- Increase `maxTweets` / `maxFollowers` in CONFIG for deeper exports (slower)7980## Related Skills8182- **twitter-scraping** — Scrape any profile, not just your own83- **bookmarks-management** — Export and organize bookmarks84- **follower-monitoring** — Track follower changes over time85- **content-cleanup** — Delete tweets and likes after backing up