EDIT: A much better version of this tool now has a GUI. This repo can only do a fraction of what the new one can do. New Version: https://github.com/ethanwheatthin/Snapchat_Memories_Downloader_GUI
A Python script to download Snapchat memories directly from your data export JSON file with full metadata preservation (dates, GPS coordinates, and EXIF data).
- 📥 Downloads all media from Snapchat JSON export files
- 📅 Preserves original creation dates
- 📍 Embeds GPS coordinates in EXIF metadata
- 🖼️ Sets EXIF data for images (date, location)
- ⏰ Updates file timestamps to match original dates
- 📁 Organizes files with date-based naming
- Python 3.6 or higher
- Required packages:
pip install requests pillow piexif
- Open Snapchat and go to your profile
- Tap the ⚙️ (Settings) icon
- Scroll down to Privacy Controls
- Select My Data
- Click Submit Request
- Wait for Snapchat to email you (usually takes 24-48 hours)
- Download the export ZIP file from the email link
- Extract the ZIP file and locate the JSON file (usually in
json/memories_history.jsonor similar)
Your Snapchat export JSON file should contain a structure like this:
{
"Saved Media": [
{
"Date": "2024-05-06 23:18:11 UTC",
"Media Type": "Image",
"Location": "Latitude, Longitude: 40.7128, -74.0060",
"Download Link": "https://app.snapchat.com/dmd/memories?uid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&sid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&mid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&ts=1234567890123&proxy=true&sig=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Media Download Url": "https://us-east1-aws.api.snapchat.com/dmd/mm?uid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&sid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&mid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&ts=1234567890123&sig=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"Date": "2024-05-07 14:32:45 UTC",
"Media Type": "Video",
"Location": "Latitude, Longitude: 34.0522, -118.2437",
"Download Link": "https://app.snapchat.com/dmd/memories?uid=...",
"Media Download Url": "https://us-east1-aws.api.snapchat.com/dmd/mm?uid=..."
}
]
}Saved Media: Array containing all media itemsDate: Creation date in format "YYYY-MM-DD HH:MM:SS UTC"Media Type: Either "Image" or "Video"Location: GPS coordinates in format "Latitude, Longitude: XX.XXXX, -XX.XXXX" (or "N/A")Media Download Url: Direct download URL for the media file
- Clone or download this repository
- Install required Python packages:
pip install requests pillow piexif
Run the script and follow the prompts:
python download_via_json.pyYou'll be asked to provide:
- JSON file path: Path to your Snapchat export JSON file
- Output folder: Where to save downloaded media (default:
downloads)
=== Snapchat Media Downloader with Metadata Preservation ===
Enter JSON file path: memories_history.json
Enter output folder (or press Enter for 'downloads'): my_snapchat_memories
Loading JSON from: memories_history.json
Found 150 media items to download
[1/150] Processing...
File: 20240506_231811_1.jpg
Date: 2024-05-06 23:18:11 UTC
Location: 40.7128, -74.0060
Downloading... ✓ Downloaded
✓ Set file timestamp to 2024-05-06 23:18:11
✓ Set EXIF metadata (date + GPS)
[2/150] Processing...
File: 20240507_143245_2.mp4
Date: 2024-05-07 14:32:45 UTC
Location: 34.0522, -118.2437
Downloading... ✓ Downloaded
✓ Set file timestamp to 2024-05-07 14:32:45
Note: Video EXIF requires additional tools (ffmpeg)
...
✓ Complete! Downloaded 150 files to 'my_snapchat_memories'
Files are named with the following pattern:
YYYYMMDD_HHMMSS_<index>.<extension>
Examples:
20240506_231811_1.jpg- Image taken on May 6, 2024 at 11:18:11 PM20240507_143245_2.mp4- Video taken on May 7, 2024 at 2:32:45 PM
- ✅ File modification/access timestamps
- ✅ EXIF creation date/time
- ✅ EXIF GPS coordinates (latitude/longitude)
- ✅ File modification/access timestamps
⚠️ EXIF metadata (requires additional tools like ffmpeg)
If you see this warning:
Warning: piexif not installed. Install with: pip install piexif pillow
Install the required packages:
pip install pillow piexif requestsIf items show "⚠ No download URL found, skipping", verify:
- Your JSON file has the
Media Download Urlfield - The JSON structure matches the expected format
- The export is complete and not corrupted
If EXIF metadata fails to set:
- Ensure
piexifandpilloware installed correctly - Verify the image file is a valid JPEG/JPG
- Check you have write permissions in the output directory
- Some images may have incompatible formats
If downloads fail:
- Check your internet connection
- Verify the download URLs haven't expired (Snapchat URLs are time-limited)
- Request a new data export if URLs are expired
- Ensure you have enough disk space
Video EXIF metadata embedding requires additional tools like ffmpeg. The script will attempt to use ffmpeg (if available in your system PATH) to write creation_time and certain location tags into MP4 files. If ffmpeg is not installed or not found, the script will skip embedding video metadata and only set file modification/access timestamps.
-
What it's for:
ffmpegis used to addcreation_timeand location metadata into MP4 containers so video files preserve original date and GPS information. -
Behavior in the script: If
ffmpegis missing, the script printsSkipping video metadata (ffmpeg not found)and continues — only file timestamps will be set. Ifffmpegis available, the script runsffmpegto copy streams and attach metadata. -
Check installation: Run
ffmpeg -versionin your shell to verify thatffmpegis installed and available on yourPATH. -
Install
ffmpeg(examples):-
Windows (Winget):
winget install ffmpeg -
Windows (Chocolatey):
choco install ffmpeg -y -
macOS (Homebrew):
brew install ffmpeg -
Debian/Ubuntu:
sudo apt update && sudo apt install -y ffmpeg
-
-
Notes:
- Ensure the
ffmpegexecutable is on yourPATH(open a new terminal after install if necessary). - After installing
ffmpeg, re-run the script to enable video metadata embedding.
- Ensure the
If you'd prefer not to install ffmpeg, the script still preserves timestamps and filenames but will not embed video EXIF/creation metadata.
-
Download Quickly: The download URLs in Snapchat's export are time-limited. Download your memories as soon as you receive the export email.
-
Keep Your JSON: Save your JSON file as a backup - it contains all the metadata for your memories.
-
Large Exports: For large exports (100+ files), be patient. The script processes one file at a time to avoid overwhelming your connection.
-
Organize by Date: Files are automatically named with timestamps, making them easy to sort chronologically in any file browser.
-
Check Output: After downloading, verify a few files to ensure dates and locations are correctly embedded.
-
Backup Originals: Keep your original Snapchat export until you've verified all downloads are complete and correct.
After running the script, your output directory will look like:
downloads/
├── 20240101_120000_1.jpg
├── 20240102_153045_2.mp4
├── 20240103_091523_3.jpg
├── 20240104_180932_4.mp4
└── ...
python download_via_json.py
# Enter: json/memories_history.json
# Enter: my_memoriespython download_via_json.py
# Enter: laura_memories.json
# Enter: laura_downloads
python download_via_json.py
# Enter: john_memories.json
# Enter: john_downloadspython download_via_json.py
# Enter: memories_2024.json
# Enter: memories/2024- Input format:
YYYY-MM-DD HH:MM:SS UTC - Output filename format:
YYYYMMDD_HHMMSS - EXIF format:
YYYY:MM:DD HH:MM:SS
- Input format:
Latitude, Longitude: XX.XXXX, -XX.XXXX - Converted to EXIF DMS (Degrees, Minutes, Seconds) format
- Includes hemisphere indicators (N/S for latitude, E/W for longitude)
- Images:
.jpg - Videos:
.mp4 - Unknown:
.bin
- Video EXIF metadata requires external tools (ffmpeg) for full support
- Download URLs from Snapchat expire after a certain period
- Large files may take time to download depending on your connection
- Some location data may be unavailable ("N/A") for certain memories
Free to use and modify for personal use.
This tool is not affiliated with or endorsed by Snapchat. It is designed to help users organize and preserve their own personal data exports. Use at your own discretion and in accordance with Snapchat's Terms of Service.
If you encounter issues:
- ✅ Verify your JSON file format matches the expected structure
- ✅ Check that all dependencies are installed:
pip list | findstr "requests pillow piexif" - ✅ Ensure you have internet connectivity for downloads
- ✅ Verify write permissions in the output directory
- ✅ Check that download URLs haven't expired (request new export if needed)