title: How to use Google geocoding API?
body: <p>I have an Android application and I am using the Google geocoding API to get GPS coordinates for an address. Currently I am using the following URL which works correctly:</p>
  
  <blockquote>
    <p><a href="http://maps.googleapis.com/maps/api/geocode/json?sensor=false&amp;address=1600+Amphitheatre+Parkway,+Mountain+View,+CA" rel="nofollow noreferrer">http://maps.googleapis.com/maps/api/geocode/json?sensor=false&amp;address=1600+Amphitheatre+Parkway,+Mountain+View,+CA</a></p>
  </blockquote>
  
  <p>The problem is, will the above API continue to work after the Google's 'new pricing changes' starting July 16, 2018? According to the Google API documentation here, <a href="https://developers.google.com/maps/documentation/geocoding/intro#GeocodingResponses" rel="nofollow noreferrer">https://developers.google.com/maps/documentation/geocoding/intro#GeocodingResponses</a>, the correct way to perform geocoding is using the following format: </p>
  
  <blockquote>
    <p><a href="https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&amp;key=YOUR_API_KEY" rel="nofollow noreferrer">https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&amp;key=YOUR_API_KEY</a></p>
  </blockquote>
  
  <p>I have tried using the suggested format (created a project, enabled billing, enabled the Places and Maps APIs, created an API key, added security to the key so that only my app can access the key) but when I use the suggested format I get the error, </p>
  
  <blockquote>
    <p>This IP, site or mobile application is not authorized to use this API
    key</p>
  </blockquote>
  
  <p>Reading other questions on StackOverflow, I found the following suggestions, among others:</p>
  
  <ol>
  <li>Creating a server key and using it instead of the API key</li>
  <li>Not adding restrictions to the API key</li>
  <li>Using the first format of the API request (without the API_KEY)</li>
  <li>Wait for 10 minutes until the new KEY becomes active</li>
  </ol>
  
  <p>I tried all of them except 1 and none works. Regarding solution #1, according to the documentation, the API needs an API key so I cannot see why a Server key would work.</p>
  
  <p>Solution 2 is risky, solution 3 is not certain that it will continue to work with the pricing changes and solution 4 does not work either (I waited for hours without success).</p>
  
  <p>I even created a new API KEY and added no restrictions to it and I got a limit exceeded error.</p>
  
  <p>Can anyone provide any help on this?</p>