1

How can I automatically retrieve the exact URL of a Flickr photo when I pass the ID to the API?

I have the IDs of all pictures and I'm currently using the flickr.photos.getInfo method that takes the ID as parameter and it gives me an XML file with the picture page URL as an answer.

However the picture page URL is not the URL of the picture (which is displayed in this page).

How can I automatically retrieve the exact URL of the picture?

1 Answer 1

2

From the Official Flickr documentation:

Photo Source URLs

You can construct the source URL to a photo once you know its ID, server ID, farm ID and secret, as returned by many API methods.

The URL takes the following format:

http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{secret}.jpg
or
http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{secret}_[mstzb].jpg
or
http://farm{farm-id}.static.flickr.com/{server-id}/{id}_{o-secret}_o.(jpg|gif|png)

1
  • The answer says "once you know its ID, server ID, farm ID and secret". So my question is how do you find those?
    – user10433
    Commented Apr 25, 2011 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.