This Image Fetcher API is a powerful tool for generating random geographical locations and retrieving corresponding Street View images. Perfect for geolocation games, geographic research, or random location exploration.
- 🎲 Random Location Generation
- 🗺️ Google Street View Image Retrieval
- 🔥 Firebase Cloud Firestore Integration
- 🛡️ API Key Validation
- 🩺 Health Check Endpoint
Before you begin, ensure you have the following:
git clone https://github.com/Augmented-Reality-Geoguessr/ImageFetchAPI.git
cd ImageFetchAPICreate a .env file in the project root with the following contents:
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
FIREBASE_CREDENTIALS_PATH=/path/to/firebase-credentials.json
# Create virtual environment
python -m venv myvenv
# Activate virtual environment
# On Windows
myvenv\Scripts\Activate
# On macOS/Linux
source myvenv/bin/activatepip install -r requirements.txtEnsure the following Google Cloud APIs are activated:
python app.pyGET /: API Key and path validationGET /api/random-location: Generate location and retrieve Street View imageGET /health: Application health check
To decode the base64 encoded image:
- Retrieve the encoded text from Cloud Firestore
- Use base64 decoding to convert back to an image
- Flask
- Google Maps API
- Firebase Admin SDK
- Python-dotenv
Report issues on the GitHub Issues page
Daya Lokesh Duddupudi - LinkedIn
Project Link: https://github.com/Augmented-Reality-Geoguessr/ImageFetchAPI
Disclaimer: Ensure you comply with Google Maps API and Firebase terms of service when using this application.