How do I retrieve all public geotagged photos from Flickr?

4.6k views Asked by At

I am currently creating a php app part of which involves placing geotagged photos on a Google map, I would like to be able to place all geotagged publics photos from Flickr on this map, rather than just those from a specific user. I have managed to grab some seemingly random photos using the following link:

http://api.flickr.com/services/feeds/geo/flickr.photos.search

But I want to grab all the photos available, does anyone know how I could go about doing this?

2

There are 2 answers

1
theDazzler On

Check out this from the flickr API. Use 1 for public photos. You may also want to check out min_upload_date as well from the API, which allows you to display photos after the date you specify.

privacy_filter (Optional) Return photos only matching a certain privacy level. This only applies when making an authenticated call to view photos you own. Valid values are: 1 public photos 2 private photos visible to friends 3 private photos visible to family 4 private photos visible to friends & family 5 completely private photos

0
Chris On

Having a very brief look through the Flickr API I would suggest you might need to do something like the following:

  • request recent public photos using flickr.panda.getPhotos
  • loop through and plot your photos on the map using the lat/long values returned in the results.

I don't think you will be able to request all public photos (other than maybe your own).

An example result from flickr.panda.getPhotos looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
  <photos interval="60" lastupdate="1327418852" total="62" panda="wang wang">
    <photo title="Disneyland Transport 3" id="6745836781" secret="5890dc399e" server="7162" farm="8" owner="40910903@N04" ownername="Wicked Transport" latitude="28.38113" longitude="-81.568336" accuracy="11" />
    <photo title="Mears Motor Coaches 1" id="6745840323" secret="cc0553ecd7" server="7155" farm="8" owner="40910903@N04" ownername="Wicked Transport" latitude="28.38113" longitude="-81.568336" accuracy="11" />
    <photo title="Igreja de Santa Rita" id="5586974263" secret="68ac3fcde2" server="5263" farm="6" owner="52904565@N03" ownername="Travessia Bacana" latitude="-18.645269" longitude="-43.433761" accuracy="10" />
    <photo title="Disneyland Transport 4" id="6745837615" secret="f72ef7e744" server="7012" farm="8" owner="40910903@N04" ownername="Wicked Transport" latitude="28.38113" longitude="-81.568336" accuracy="11" />
    <!-- SNIP! -->
  </photos>
</rsp>