Back to ChatToMap

Images

The CLI can fetch images for your activities from multiple sources. These images appear on your map pins and in exports.

Image Sources

The CLI fetches images in the following priority order:

SourcePriorityAPI KeyNotes
CDN Defaults1 (highest)NoneFree, pre-cached category images
Google Places2GOOGLE_MAPS_API_KEYActual photos of the place
Wikipedia3NoneFree, for well-known places
Pixabay4 (lowest)PIXABAY_API_KEYFree API, category-based search

Usage

Images are fetched automatically during the analyze pipeline. You can also run the image fetcher separately:

chat-to-map fetch-image-urls chat.zip

Options

FlagDescription
--no-image-cdnSkip CDN defaults, fetch all from APIs
--skip-pixabaySkip Pixabay image search
--skip-wikipediaSkip Wikipedia image lookup
--skip-google-placesSkip Google Places photos
--json [file]Output as JSON (to file or stdout)
-n, --max-results <num>Max results to display (default: 10)
-a, --allShow all activities with images

CDN Default Images

To minimize API calls and costs, the CLI uses pre-cached category images from our CDN by default. These cover common categories like restaurants, hikes, beaches, museums, etc.

If you want more specific images (actual photos of the places), use the --no-image-cdn flag to fetch from Google Places, Wikipedia, or Pixabay:

chat-to-map fetch-image-urls chat.zip --no-image-cdn

API Keys

Google Places (Optional)

If you already have a GOOGLE_MAPS_API_KEY for geocoding, the same key works for Places photos. Make sure the "Places API" is enabled in your Google Cloud Console.

Pixabay (Optional)

Pixabay offers a free API with generous rate limits. Sign up to get an API key:

  1. Create an account at pixabay.com
  2. Go to API documentation
  3. Copy your API key
export PIXABAY_API_KEY="your-key-here"

Image Caching

Like all API responses, fetched image URLs are cached locally. Running the command again won't make duplicate API calls. Use --no-cache to force a refresh.