Flickr API tutorial

14 Nov 2015 . TUTORIALS . Comments #tutorials

I recently made a photo porfolio generator using Flickr API and Angular. The documentation of Flickr API is very well written and easy to use.

You can get a Flickr API key from here.

Here is an example using the flickr.photosets.getList method:



  var findPhotoSetByUser = "https://api.flickr.com/services/rest/" + // connect to the Flickr API
    "?method=flickr.photosets.getList" + // returns all the photosets belong to the user
    "&api_key=YOURAPIKEY" + // your API key
    "&user_id=" + userId + // The user ID.
    "&privacy_filter=1" + // 1 signifies all public photos.
    "&per_page=100" + // limiting it to 100 photos.
    "&format=json&nojsoncallback=1"; // return in JSON format. 

Instead of writing this yourself, you could also API Explorer : flickr.photosets.getList to generate these code for you. All the API explorer links for each method can be found at the bottom of each method’s page.

Finished product