Some Simple Searches

Create a PhotosSearchOptions object to set your search settings
The following would search for a particular users photos, returning 100 photos per page:

PhotoSearchOptions options = new PhotoSearchOptions();
options.UserId = "1234567@N01"; // Your NSID
options.PerPage = 100; // 100 is the default anyway
PhotoCollection photos = flickr.PhotosSearch(options);


The following would return all photos tagged with blue and sky:

PhotoSearchOptions options = new PhotoSearchOptions();
options.Tags = "blue,sky";
PhotoCollection photos = flickr.PhotosSearch(options);


The following would return all photos tagged with blue and sky, making sure to return the Date Taken and Original Format as well:

PhotoSearchOptions options = new PhotoSearchOptions();
options.Tags = "blue,sky";
options.Extras |= PhotoSearchExtras.DateTaken | PhotoSearchExtras.OriginalFormat;
PhotoCollection photos = flickr.PhotosSearch(options);


You can set all Extras options as follows:

PhotoSearchOptions options = new PhotoSearchOptions();
options.Extras = PhotoSearchExtras.All;

Last edited Mar 23, 2010 at 3:47 PM by samjudson, version 4

Comments

samjudson Jul 14, 2010 at 7:27 AM 
http://www.flickr.com/services/api/misc.overview.html

milkidis Jul 13, 2010 at 7:58 PM 
What is the address of web that the PhotosSearch do search?
Because I have a problem on response. Appear a message "HTTP Error 407, Access Denied.".
I have a proxy in my network, i need release this address.

Thanks.

samjudson Mar 30, 2010 at 5:50 PM 
To quote the previous page: "Below are a selection of short sharp snippets of code that provide examples of how to accomplish certain things with the Flickr API. Most pf the examples below use an instance of the Flickr class called flickr. It is assumed that this instance has been created with the relevant API Key, Shared Secret (and Auth Token where applicable)."

cemsisman Mar 30, 2010 at 4:48 PM 
where is it defined flickr ?