Search code examples
javascriptapiflickr

Limit call to Flickr's API while dynamically browsing a map


I have a little project that I am trying to implement with D3 and the Flickr API. My idea is to display some photos based on the geo-tagging they have, quite like what the Flickr map does right now. So what I am doing is first looking for all pictures within a certain geolocation and then asking for each of these pictures the Flickr API about their exact geolocation. But then, every time a zoom or pan operation happens, I would need to update the map, so that means making an other call to the API.

So far my code is working just fine. However, the API is said to be limited to 3600 calls per hour (https://www.flickr.com/services/developer/api/). So while this number seems reasonable, do you think that there might be a smarter way for me to do it (and maybe save to API calls)?

Have a good day


Solution

  • It turns out that the first call I made to the Flickr API flickr.photos.search can also return the geolocation by adding extras=geo (see https://www.flickr.com/services/api/flickr.photos.search.html)