🗺️ Mapillary Downloader
Download your Mapillary data before it's gone.
▶️ Installation
Installation is optional, you can prefix the command with uvx or pipx to
download and run it. Or if you're oldskool you can do:
pip install mapillary-downloader
❓ Usage
First, get your Mapillary API access token from the developer dashboard
# Set token via environment variable (recommended)
export MAPILLARY_TOKEN=YOUR_TOKEN
mapillary-downloader USERNAME1 USERNAME2 USERNAME3
# Or pass token directly, and have it in your shell history 💩👀
mapillary-downloader --token YOUR_TOKEN USERNAME1 USERNAME2
# Download to specific directory
mapillary-downloader --output ./downloads USERNAME1
| option | because | default |
|---|---|---|
usernames |
One or more Mapillary usernames | (required) |
--token |
Mapillary API token (or env var) | $MAPILLARY_TOKEN |
--output |
Output directory | ./mapillary_data |
--quality |
256, 1024, 2048 or original | original |
--bbox |
west,south,east,north |
None |
--no-webp |
Don't convert to WebP | False |
--max-workers |
Maximum number of parallel download workers | CPU count |
--max-size |
Approximate output batch size, or none |
900GB |
--min-free-space |
Stop before disk fills, or none |
50GB |
--max-images |
Approximate output batch image count | None |
--no-tar |
Don't tar bucket directories | False |
--no-check-ia |
Don't check if exists on Internet Archive | False |
--debug |
Enable verbose downloader logging | False |
--stats |
Show archive.org collection statistics | False |
--clean-up |
Remove cache dirs containing only log files | False |
The downloader will:
- 🏛️ Check Internet Archive to avoid duplicate downloads
- 📷 Download multiple users' images organized by sequence
- 📜 Inject EXIF metadata (GPS coordinates, camera info, timestamps, compass direction) and XMP data for panoramas.
- 🗜️ Convert to WebP (by default) to save ~70% disk space
- 🛟 Save progress every 5 minutes so you can safely resume if interrupted
- 📦 Tar sequence directories (by default) for faster uploads to Internet Archive
🖼️ WebP Conversion
You'll need the cwebp binary installed:
# Debian/Ubuntu
sudo apt install webp
# macOS
brew install webp
To disable WebP conversion and keep original JPEGs, use --no-webp:
📦 Tarballs
Images are organized by capture date (YYYY-MM-DD) for incremental archiving:
mapillary-username-quality/
2024-01-15/
abc123/
image1.webp
image2.webp
bcd456/
image3.webp
2024-01-16/
def789/
image4.webp
By default, these date directories are automatically tarred after download
(2024-01-15.tar, 2024-01-16.tar, etc.). Reasons:
- ⤴️ Incremental uploads. Add more to a collection. Well, eventually anyway. This won't work yet unless you delete the jsonl file and start again.
- 📂 Fewer files - ~365 days/year × 10 years = 3,650 tars max. IA only want 5k items per collection
- 🧨 Avoids blowing up IA's derive workers. We don't want Brewster's computers to create thumbs for 2 billion images.
- 💾 I like to have a few inodes available for things other than this. I'm sure you do too.
To keep individual files instead of creating tars, use the --no-tar flag.
🧱 Batch limits
By default the downloader finalizes output in roughly 900GB batches:
mapillary-username-1024-webp/
mapillary-username-1024-webp-2/
mapillary-username-1024-webp-3/
The master resume state stays in the cache directory until the user download is complete, so finalized batches can be uploaded or moved away before rerunning. Chunks are resume-safe output batches, not chronological partitions.
Use --max-size none to restore the old unbounded single-collection behavior.
--min-free-space is an emergency guard: if free space falls below the limit,
the downloader stops without finalizing the current payload.
🏛️ Internet Archive upload
I've written a bash tool to rip media then tag, queue, and upload to The
Internet Archive. The metadata is in the same format. If you symlink your
./mapillary_data dir to rip's 4.ship dir, they'll be queued for upload.
See inlay for details:
📊 Stats
To see overall project progress, or an estimate, use --stats
🚧 Development
make dev # Setup dev environment
make test # Run tests. Note: requires `exiftool`
make dist # Build the distribution
make help # See other make options
🔗 Links
⚖️ License
WTFPL with one additional clause
- Don't blame me
Do wtf you want, but don't blame me if it makes jokes about the size of your disk.
Metadata
Release files for mapillary-downloader 0.13.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mapillary_downloader-0.13.2.tar.gz | 37.8 kB | Without provenance | Details for mapillary_downloader-0.13.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mapillary_downloader-0.13.2-py3-none-any.whl | Python 3 | none | any | Details for mapillary_downloader-0.13.2-py3-none-any.whl |
Total release size: 83.5 kB
Release files / mapillary_downloader-0.13.2.tar.gz
| Download URL | mapillary_downloader-0.13.2.tar.gz |
|---|---|
| Size | 37.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
facf24d49434368bb1beaa02adad575b3abbf6d74612672a31d3605b60100b35
|
|
BLAKE2b-256 checksum How to use checksums |
5168578d4adc069160201b5022c200785c6d8969cce5df39a0cfaee16606e000
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / mapillary_downloader-0.13.2-py3-none-any.whl
| Download URL | mapillary_downloader-0.13.2-py3-none-any.whl |
|---|---|
| Size | 45.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8466d71d7d589ec2e90d80559955cbe016b86efdb1b6bf21a87ea5ed1480e215
|
|
BLAKE2b-256 checksum How to use checksums |
300bd5435f9760f686692266dde6241065627fb743a1873e57839a45400aa3f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Security for mapillary-downloader 0.13.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.