Flickr API Tips From an Expert

The Flickr Developer Blog has posted an interview with Simon Willison co-creator of the Django Web framework and one of the developers of the sophisticated Flickr mashup The project took around 14 months to complete, and Simon shares some of the tips and tricks he picked up during that time working with the Flickr API.

Wildlife near you screenshot

Flickr machine tags featured heavily in the tips:

Here's a fun example: finding all of the Red Pandas that have been spotted in Europe. WildlifeNearYou doesn't yet have a concept of Europe, but Flickr's API can search using Yahoo! WhereOnEarth IDs. We can find the WOEID for Europe using the GeoPlanet API:'europe')?appid=[yourappidhere]

The WOEID for Europe is 24865675. Next we need the WildlifeNearYou identifier for red pandas, so we can figure out the correct machine tag to search for. We re-use the codes from our custom URL shortener for our machine tags, so we can find that ID by looking for the "Short URL" link on (at the bottom of the right hand column). The short URL is which means the machine tag we need is wlny:species=s2f

Armed with the WOEID and the machine tag, we can compose a Flickr search API call:

That gives us back a list of photos of Red Pandas taken in places that are within Europe.

The interview also asks what Flickr could add or do better, to which Simon replied he would like to see an OAuth-style flow for selecting photos:

I’d like to (for example) redirect my users to somewhere like  HTTP:// and have Flickr present them with a full UI for searching and selecting from their photos. Once they had selected some photos, Flickr could redirect them back to,4282571384,4282571396 and my application would know which photos they had selected.

This would make integrating “pick a photo / some photos from Flickr” in to any application much, much easier.

WildLife Near You was previously featured in the Flickr blog, which you can find here.

The interview is an interesting read, and those using the Flickr API are likely to pick up something new. For more examples of the Flickr API in action visit our Flick API profile, which lists over 500 Flickr mashups.

Be sure to read the next API article: 6 New APIs: Fraud Detection, Mobile Number Validation, Hosted Subversion, and Postcode Lookup