Reputation: 11
I know that mean I exceeded my daily request, but the problem is it's happens when I'm doing only few requests per day, it haven't worked once.
I'm only trying a simple use of the API, so no way I'm exceeding my daily requests (which are 2,500 requests per 24 hour period).
Maybe I'm missing something...
Here is my Code:--
$loc_array = json_decode( file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address='.str_replace(" ","+",$address).'&sensor=true') );
if($loc_array->status != 'ZERO_RESULTS'){
$data['lat1'] = $loc_array->results[0]->geometry->location->lat;
$data['lon1'] = $loc_array->results[0]->geometry->location->lng;
$data['status'] = true;
return $data;
}
else
{
$data = array("status"=>false);
return $data;
}
And I am getting JSON response from this API with
{
"error_message" : "You have exceeded your daily request quota for this API.",
"results" : [],
"status" : "OVER_QUERY_LIMIT"
}
Please help how i can resolve it. Give me any suggestion.
Thanks in advance.
Upvotes: 0
Views: 503
Reputation: 1273
This error comes when you have exceeded daily limit of 2500 request per day. As you have not included any API key in your request, you will not be able to track how much API request are made by you.
So you should include API key from your Google Developers API console and can check your consumed no of requests on the current day. It will give all the statistics of API usage.
You can check it here: https://console.developers.google.com/iam-admin/quotas?project=YOUR_PROJECT_NAME
Thank you
Upvotes: 2