Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get static image url from flickr URL?

Tags:

flickr

Is it possible to get static image URL from the flickr URL via an api call or some script ?
For eg :
Flickr URL -> http://www.flickr.com/photos/53067560@N00/2658147888/in/set-72157606175084388/
Static image URL -> http://farm4.static.flickr.com/3221/2658147888_826edc8465.jpg

like image 417
NM. Avatar asked Nov 26 '09 12:11

NM.


People also ask

How do I find the URL of an image link?

On your computer, go to images.google.com. Search for the image. In Images results, click the image. Under “Click to copy link,” click the URL.


1 Answers

With specifying extras=url_o you get a link to the original image:

https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=YOURAPIKEY&format=json&nojsoncallback=1&text=cats&extras=url_o 

For downscaled images, you use the following parameters: url_t, url_s, url_q, url_m, url_n, url_z, url_c, url_l

Alternatively, you can construct the URL as described:

http://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}.jpg or http://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}_[mstzb].jpg 
like image 182
mb21 Avatar answered Sep 21 '22 00:09

mb21