# Google Maps API Setup Guide

## Overview
The Address Finder + Jigger tool supports Google Maps API as an alternative data source for finding addresses, especially useful for locations outside of Europe where FreeMap data may be limited.


## Pricing
Google provides **$200 free credit per month** for Maps Platform APIs.


### Free Tier
With the $200 monthly credit, you can geocode approximately:
- **40,000 requests** per month for free
- This equals roughly **25,000-30,000 addresses** per month at no cost


## Required APIs
You need to enable **two APIs** in your Google Cloud Console:

1. **Geocoding API** - For converting addresses to coordinates and reverse geocoding
2. **Places API** - Required for the API key to work properly


## Setup Instructions
### Step 1: Create a Google Cloud Project

1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project or select an existing one
3. Make sure billing is enabled for your project


### Step 2: Enable Required APIs
1. Go to **APIs & Services** > **Library**
2. Search for and enable:
   - **Geocoding API**
   - **Places API**


### Step 3: Create an API Key
1. Go to **APIs & Services** > **Credentials**
2. Click **Create Credentials** > **API Key**
3. Copy your new API key


### Step 4: (Recommended) Restrict Your API Key
1. Click on your API key to edit it
2. Under **API restrictions**, select **Restrict key**
3. Select the following APIs:
   - Geocoding API
   - Places API
4. Save your changes


### Geocoding API Pricing
| Monthly Volume | Price per 1,000 Requests |
|----------------|--------------------------|
| 0 - 100,000 | $5.00 |
| 100,001 - 500,000 | $4.00 |


### Cost Estimation
| Addresses | Approximate Requests | Estimated Cost |
|-----------|---------------------|----------------|
| 100 | ~150-200 | ~$0.75 - $1.00 |
| 500 | ~750-1,000 | ~$3.75 - $5.00 |
| 1,000 | ~1,500-2,000 | ~$7.50 - $10.00 |

**Note:** The tool generates ~2x sample points per requested address to ensure enough unique addresses are found.



## Troubleshooting

### "API key is not authorized" Error

- Make sure both **Geocoding API** and **Places API** are enabled
- Check that your API key restrictions include both APIs
- Verify that billing is enabled on your Google Cloud project

### "Query limit exceeded" Error

- You've exceeded your daily quota or billing limit
- Check your Google Cloud Console for quota usage
- Consider enabling billing or increasing your quota

### Few or No Results

- The specified location may have limited address data
- Try increasing the search radius
- For rural areas, results may be sparse