WOODSEE Network Main Site Library FUSV SwiftMaestro Merch Github

fb-metadata-recovery

Recover original dates from Facebook uploads.

When you upload photos or videos to Facebook, the original EXIF metadata — including capture date — is stripped. When you later use Facebook's "Download Your Information" tool, the compressed files often have incorrect or missing dates. This tool helps you rebuild that metadata.

Python PyPI CLI MIT License
fb-metadata-recovery

What it does

The tool runs a four-step pipeline entirely on your machine:

  1. Download your photos from Facebook via the Graph API, organised by album.
  2. Parse your Facebook bulk-download HTML files for metadata.
  3. Match items using perceptual hashing to handle Facebook's re-compression.
  4. Recover original publish dates and rename files accordingly.

Highlights

Graph API download

Download all photos by album using your own Facebook access token.

Bulk export parser

Extract dates, camera info, and captions from Facebook's HTML export.

Perceptual hashing

Matches photos even after Facebook re-compresses them.

CSV reports

Photos, videos, and recovery reports in easy-to-audit formats.

Full pipeline

One fb-recovery full command to run download, parse, match, and recover.

Runs locally

Your token and media files never leave your machine.

Quick start

pip install fb-metadata-recovery
fb-recovery download -o ~/fb_photos

Setup

1. Get a Facebook Access Token

  1. Go to the Facebook Graph API Explorer.
  2. Create or select an app.
  3. Click Generate Access Token.
  4. Select permissions: user_photos, user_videos, user_posts (optional).
  5. Copy the token.

2. Download Your Information from Facebook

  1. Go to Facebook Settings → Your Information → Download Your Information.
  2. Select Format: JSON, Quality: High, Date range: All time.
  3. Select: Posts, Photos, Videos.
  4. Download and extract the ZIP file.

Commands

fb-recovery download -o ~/fb_photos
fb-recovery parse ~/Downloads/facebook-export/ -o metadata.json
fb-recovery match metadata.json --bulk-dir ~/fb_export/ -o report.csv
fb-recovery full --bulk-dir ~/Downloads/facebook-export/ -o output/

Output formats

Privacy

This tool runs entirely locally. Your access token and media files never leave your machine. No data is sent to third parties.

License

MIT License.