Skip to main content

Download high-resolution Google Street View panoramas from the command line

Project description

streetview-dl

CI

Download high-resolution Google Street View panoramas from the command line.

What it does

Converts Google Maps Street View URLs into full-resolution equirectangular panorama images. Downloads the raw tiles from Google's official Map Tiles API and stitches them together, preserving maximum quality and adding proper 360° metadata.

For example, the 6th Street Bridge in Los Angeles:

6th Street Bridge

Installation

# From PyPI (coming soon)
pip install streetview-dl

# From source (current)
git clone https://github.com/yourusername/streetview-dl
cd streetview-dl
pip install -e .

📚 Looking for more examples? See EXAMPLES.md for comprehensive usage examples with real commands and outputs.

Quick start

# Basic download
streetview-dl "https://www.google.com/maps/@33.99,-118.40,3a,75y,148h,98t/..."

# Specify output file
streetview-dl --output beach-pano.jpg "https://maps.url..."

# Lower quality for smaller files
streetview-dl --quality medium "https://maps.url..."

# Black and white filter
streetview-dl --filter bw "https://maps.url..."

Understanding Street View URLs

Google Maps Street View URLs contain parameters that determine the viewing perspective. Understanding these helps you use --fov and --clip options effectively.

Example URL breakdown:

https://www.google.com/maps/@34.1309317,-118.4732331,3a,75y,32.27h,103.53t/data=...
                              │          │            │  │   │      │
                              │          │            │  │   │      └─ Pitch/tilt angle
                              │          │            │  │   └─ Heading (yaw) in degrees  
                              │          │            │  └─ Field of view in degrees
                              │          │            └─ Street View mode token
                              │          └─ Longitude
                              └─ Latitude

Key parameters for image processing:

  • 32.27h - Heading/Yaw (32.27°): Compass direction the camera faces

    • 0°/360° = North, 90° = East, 180° = South, 270° = West
    • Used by --clip left|right to determine forward/rear direction
  • 75y - Field of View (75°): How much the camera "sees" horizontally

    • Smaller values = zoomed in, larger = zoomed out
    • Note: URL FOV is different from --fov - URL FOV is the original view, --fov crops the downloaded panorama
  • 103.53t - Pitch/Tilt (103.53°): Up/down angle of camera

    • Lower values look up, higher values look down
    • Affects what you see when using --crop-bottom

How URL parameters relate to options:

# URL shows heading 32° - clip to forward-facing 180°
streetview-dl --clip right "https://maps.url.../32.27h/..."

# URL shows heading 32° - clip to rear-facing 180° (32° + 180° = 212°)  
streetview-dl --clip left "https://maps.url.../32.27h/..."

# Crop 120° around the URL's heading direction (32°)
streetview-dl --fov 120 "https://maps.url.../32.27h/..."

# Combine: 200° crop in the forward direction from URL heading
streetview-dl --fov 200 --clip right "https://maps.url.../32.27h/..."

Setup

Get a Google Maps API key

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable the "Map Tiles API"
  4. Create credentials → API Key
  5. Set up billing (required for Map Tiles API)

Configure authentication

Choose one method:

# Environment variable (recommended)
export GOOGLE_MAPS_API_KEY="your_api_key_here"

# CLI argument
streetview-dl --api-key "your_key" "https://maps.url..."

# Config file
streetview-dl --configure

Options

Quality and output

--quality high|medium|low    # Default: medium (8K resolution, good balance)
--output filename.jpg        # Custom output filename
--format jpg|png|webp        # Image format (default: jpg)
--jpeg-quality 85            # JPEG compression (1-100)
--max-width 8192             # Resize if larger

Image processing

--fov 180                    # Field of view in degrees (60-360, crops around viewing direction)
--filter bw|sepia|vintage    # Apply artistic filters
--brightness 1.2             # Adjust brightness
--contrast 1.1               # Adjust contrast
--saturation 0.8             # Adjust color saturation
--clip left|right|none       # Clip to 180° half relative to view yaw (overrides FOV if < 180°)
--crop-bottom 0.75           # Keep top fraction of height (e.g., 0.75)

Metadata and batch processing

--metadata                   # Save metadata as JSON
--metadata-only              # Extract metadata without downloading
--batch urls.txt             # Process multiple URLs
--output-dir ./panoramas/    # Output directory for batch

Advanced

--no-xmp                     # Skip 360° metadata embedding
--timeout 30                 # Request timeout seconds
--retries 3                  # HTTP retry attempts
--backoff 0.5                # Retry backoff factor
--concurrency 0              # Parallel tile workers (0=auto by CPU/quality)
--configure                  # Configure API key interactively
--verbose                    # Verbose output

Usage

You can run the CLI on a single URL or a batch file.

streetview-dl 'https://www.google.com/maps/place/...'

Options of interest

  • --accent-color [cyan|yellow]: changes terminal accent color
  • --timeout SECONDS: request timeout (default 30)
  • --retries N: HTTP retry attempts for transient errors (default 3)
  • --backoff SECONDS: exponential backoff factor between retries (default 0.5)

Examples

Basic usage

# Download full resolution panorama
streetview-dl "https://www.google.com/maps/@40.7589,-73.9851,3a,75y,200h,90t/data=..."

Quality options

# High quality for maximum detail (16K resolution, ~10MB)
streetview-dl --quality high "https://maps.url..."

# Default medium quality (8K resolution, ~4MB, good balance)
streetview-dl "https://maps.url..."

# Low quality for thumbnails (4K resolution, ~1MB)
streetview-dl --quality low "https://maps.url..."

Field of view examples

# Narrow 90° view for architectural details
streetview-dl --fov 90 "https://maps.url..."

# Standard 180° half-panorama
streetview-dl --fov 180 "https://maps.url..."

# Wide 270° view for context
streetview-dl --fov 270 "https://maps.url..."

# Combine with quality for detailed crops
streetview-dl --quality high --fov 120 "https://maps.url..."

Artistic filters

# Black and white
streetview-dl --filter bw "https://maps.url..."

# Vintage sepia tone
streetview-dl --filter sepia --brightness 1.1 --contrast 0.9 "https://maps.url..."

Framing and cropping

# Crop to specific field of view around the viewing direction
streetview-dl --fov 180 "https://maps.url..."

# Clip to forward-facing 180° half (ignores --fov if smaller than 180°)
streetview-dl --clip right "https://maps.url..."

# Clip to rear-facing 180° half
streetview-dl --clip left "https://maps.url..."

# Combine FOV cropping with directional clipping (FOV should be ≥ 180°)
streetview-dl --fov 220 --clip right "https://maps.url..."

# Remove the bottom 25% to avoid car blur
streetview-dl --crop-bottom 0.75 "https://maps.url..."

# Combine all framing options
streetview-dl --fov 200 --clip right --crop-bottom 0.75 "https://maps.url..."

Framing examples (Venice)

100°, 180°, 220°, 280°, and the full panorama captured from the same spot in Venice:

100° 180° 220° 280°

Full panorama

Command pattern used:

streetview-dl 'https://www.google.com/maps/@45.4360629,12.3305426,3a,60y,236.1h,86.64t/data=!3m7!1e1!3m5!1sjGaYvr31o-KsarHZtXbc5w!2e0!6shttps:%2F%2Fstreetviewpixels-pa.googleapis.com%2Fv1%2Fthumbnail%3Fcb_client%3Dmaps_sv.tactile%26w%3D900%26h%3D600%26pitch%3D3.357981416541378%26panoid%3DjGaYvr31o-KsarHZtXbc5w%26yaw%3D236.10458342884988!7i13312!8i6656?entry=ttu' \
  --quality high --fov <100|180|220|280> --clip right --crop-bottom 0.75

💡 Want to see more examples? Check out EXAMPLES.md for comprehensive CLI usage examples, or run python generate_examples.py to create your own sample outputs using the Venice location above.

Batch processing

# Create urls.txt with one URL per line, then:
streetview-dl --batch batch_urls.txt --output-dir ./example_panoramas/

Metadata extraction

# Get location data, capture date, copyright info
streetview-dl --metadata-only "https://maps.url..."

# Save both image and metadata
streetview-dl --metadata "https://maps.url..."

Output

Downloads create equirectangular panorama images with:

  • Full resolution (typically 16384×8192 pixels with the "high" flag)
  • Proper XMP metadata for 360° photo viewers
  • Geographic and temporal metadata when available
  • Copyright and attribution information

Files are compatible with:

  • Facebook 360° photos
  • VR headsets and viewers
  • Google Photos spherical view
  • Any software supporting equirectangular panoramas

API limits and costs

Uses Google's official Map Tiles API:

  • Requires billing enabled
  • No charge for less than 100k requests per month
  • Quality impacts number of requests: high = 512 tiles, medium = 128 tiles, low = 32 tiles
    • Defaults to medium
  • Virtually free and cheaper than commercial alternatives
  • Respects Google's terms of service

Requirements

  • Python 3.8+
  • Google Maps API key with Map Tiles API enabled

License

MIT License

Contributing

Issues and pull requests welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streetview_dl-0.3.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streetview_dl-0.3.0-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file streetview_dl-0.3.0.tar.gz.

File metadata

  • Download URL: streetview_dl-0.3.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for streetview_dl-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d5ff5389eb0e5055016c9bfe23b6461f64abc3ec3fa13c6a0ee171deaaf5be0c
MD5 75764cd93754b4d8861c328237dc12df
BLAKE2b-256 785b64ab78b61c6ad5064b1d69a520754e22419acdb72ad782878f2a4b67fbc8

See more details on using hashes here.

File details

Details for the file streetview_dl-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: streetview_dl-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for streetview_dl-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cedf01a564b3f340db760bcc7f788779ba9c82b631f6253c0dbfe5dcde5fe28b
MD5 2b7b6d4f925d7efbe18e6e7830ca60e5
BLAKE2b-256 1a22fe898916139adf869d4ea1ed72c6d122d94dc8d38ebd4dde975368b208d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page