Does Google Maps block me?

I am programming a web application that works with Google Maps and I need to generate a PDF output, so I decided to use a static API. My application will use a set of 1,500 small map images (100 * 100 pixels). I don’t want to ask Google for each image a thousand times a day, so I wrote a script to upload all the images and save them on my server on which the images will be used. After uploading 300 images, my server gets this error:

Warning: readfile(http://maps.googleapis.com/maps/api/staticmap?size=100x100&maptype=roadmap&markers=icon:http://mediup.martinstrouhal.cz/arrs/210.png%7Cshadow:false%7C50.078522,14.436551&sensor=false&zoom=16) [function.readfile]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden 

Does this mean that Google is blocking me forever?

+4
source share
4 answers

Google Maps probably has a throttle that will disable anyone who abuses the API. Since you just save the images, put a random wait between each request and let it work for a long time until you get all the images you need.

+2
source

You are missing an API key.

Without including your API key. The Streetview Image API uses up to 1000 images per day and 5 images per minute via IP, both of which can suffer if you do not use the key. Using the key, you can pull out 25,000 images per day

The format should be: http://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,-73.988354&sensor=false&key=API_KEY

Street view docs include how to get an API key. https://developers.google.com/maps/documentation/streetview/?csw=1

+6
source

It depends on whether you use the static map API or if you use direct access to tiles.

Direct access to tiles is prohibited by Google, so they block you if the server suspects that you are pulling tiles for caching. They do not indicate limitations on this for safety reasons.

Static cards have a limit of 2500 per day per IP address, but it is throttled as to how much you can output per second.

In any case, the use of Static maps or direct access to tiles to save images for later use relates to Google ToS.

+3
source

According to many Googled sources, the ban lasts 24 hours, but did not find an official answer to this question.

Perhaps you could tell us how long your ban has been.

+1
source

Source: https://habr.com/ru/post/1383935/


All Articles