Retrieve and display Flickr photos the easy way with getFlickrBy

As part of my talk on YQL for Open Hack London I’ve thought of an easy way to get Flickr photos that you are allowed to display in your products and hacks. The wrapper API getFlickrBy works around the somewhat convoluted data returned from Flickr’s API methods and uses YQL to cut the information you want down to the bare necessities. Furthermore the API only returns photos that are licenced with Creative Commons’ “By” license to avoid you using photos you have no right to use (which is a big thing with the Flickr crowd). The API endpoint is:

http://isithackday.com/api/getFlickrBy.php

You have several parameters to play with: locationThe location you want photos of as defined in the Yahoo Geo APIsearchA word you want to search forformatThe format of the returned data, XML, HTML or JSON - preset is XMLcallbackA name of a JavaScript function call to wrap the JSON data in, in case you want to use the API in a script nodeamountThe amount of photos returned, max is 100 – preset is 20sizethe photo size, “s” for 75×75px, “t” for thumbnail, “m” for medium, omit to get big size The API returns only what you need: the image title, the owner, the url of the image and the link to Flickr. If you use html as the output format it returns an HTML list of linked images. For output demos and explanations simply call the API without any parameters Here are some examples how to use the API:

Tags: api, creativecommons, flickr, openhacklondon, wrapper