This Python script provides a comprehensive tool to download and backup your Bluesky social network data. It offers a user-friendly way to archive your digital presence on Bluesky.
- Download complete profile information
- Retrieve full followers list
- Export following list
- Archive recent posts and interactions
- Save data in organized JSON format
- Timestamp-based backup directories
- Rate-limit compliant
- Secure authentication handling
- Python 3.8+
- Bluesky account
- Clone this repository to your local machine
- Create a virtual environment (recommended):
python -m venv venv # On Windows: venv\Scripts\activate # On Unix or MacOS: source venv/bin/activate
- Install required dependencies:
pip install -r requirements.txt
Required packages:
- atproto (v0.8.1)
- Ensure your virtual environment is activated
- Run the script:
python bluesky_download.py
- When prompted:
- Enter your Bluesky handle (e.g., user.bsky.social)
- Provide your password
- Wait while the script downloads your data
- Find your downloaded data in the timestamped directory created in the script's location
The downloaded data is organized in the data
folder with the following structure:
followers.json
: List of accounts following youfollowing.json
: List of accounts you followposts.json
: Archive of your recent postsprofile.json
: Your profile informationfollowing_network.json
: Extended network data
following_network/
: Contains individual JSON files, one for each account that the user is following, with detailed information about that account's network
The following data (stored in example_following.json
) follows this structure:
{
"did": "unique-identifier",
"handle": "username.bsky.social",
"associated": {
"chat": {
"allow_incoming": "all",
"py_type": "app.bsky.actor.defs#profileAssociatedChat"
}
},
"avatar": "profile-image-url",
"created_at": "timestamp",
"description": "user bio",
"display_name": "User Display Name",
"indexed_at": "timestamp",
"labels": []
}
- Your login credentials are only used for authentication and are never stored
- Consider using environment variables for credentials in automated scenarios
- The script uses official Bluesky API endpoints through the atproto library
- All data is stored locally in your specified directory
Common issues and solutions:
- Authentication errors: Verify your handle and password
- Connection timeouts: Check your internet connection
- Rate limiting: The script handles rate limits automatically
- Package conflicts: Ensure you're using the correct atproto version (0.8.1)
This tool is designed for personal use and data backup purposes. Please:
- Respect Bluesky's terms of service
- Be mindful of API rate limits
- Do not use the downloaded data for unauthorized purposes
- Consider the privacy implications of storing social network data
Contributions are welcome! Please feel free to submit issues or pull requests.