Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Geocoding API - REQUEST_DENIED

Apparently I do not need a 'Maps API key' to use the 'Google Geocoding API' according to:

http://code.google.com/apis/maps/documentation/geocoding/index.html

However, I obtain this:

{   "status": "REQUEST_DENIED",   "results": [ ] } 

Does this mean that my IP is blocked? What can I do to overcome this?

like image 707
cs0815 Avatar asked Jul 09 '10 12:07

cs0815


People also ask

How do I see Geocodes on Google Maps?

Go to the Google Cloud Console. Click the Select a project button, then select the same project you set up for the Maps JavaScript API and click Open. From the list of APIs on the Dashboard, look for Geocoding API. If you see the API in the list, you're all set.

Is Google geocoding API free?

The Geocoding API uses a pay-as-you-go pricing model. Geocoding API requests generate calls to one of two SKUs depending on the type of request: basic or advanced.

What happens when you exceed the Google geocoding API rate limit py4e?

According to Google's API Usage and Billing page, there is a limit of 50 requests per second. If you exceed this amount, subsequent requests to the API will fail with the OVER_DAILY_LIMIT or OVER_QUERY_LIMIT status code and the geocoded data will not be returned.


2 Answers

Until the end of 2014, a common source of this error was omitting the mandatory sensor parameter from the request, as below. However since then this is no longer required:

The sensor Parameter

The Google Maps API previously required that you include the sensor parameter to indicate whether your application used a sensor to determine the user's location. This parameter is no longer required.


Did you specify the sensor parameter on the request?

"REQUEST_DENIED" indicates that your request was denied, generally because of lack of a sensor parameter.

sensor (required) — Indicates whether or not the geocoding request comes from a device with a location sensor. This value must be either true or false

like image 131
Rup Avatar answered Oct 08 '22 20:10

Rup


Remove the API key parameter and its value.

eg. https://maps.googleapis.com/maps/api/geocode/json?address=[YOUR ADDRESS]&sensor=true

like image 28
PARTH DAVE Avatar answered Oct 08 '22 20:10

PARTH DAVE