This project has moved and is read-only. For the latest updates, please go here.

How to get all the photos when using PhotoSearch

Topics: Developer Forum, Project Management Forum, User Forum
Jul 8, 2010 at 1:34 PM
Edited Jul 8, 2010 at 1:36 PM

I want to get all the photos when searching tags with “microsoft” using the following piece of code:

     option.Tags = "microsoft";
     option.PerPage = 100;
     option.Extras = PhotoSearchExtras.All;
     PhotoCollection photos = flickr.PhotosSearch(option);

     for( int i = 0; i < photos.Count; i++ )


But this only return 100 pics, even if i set option.PerPage to 1000, it returns at most 500 pics.

My question is: is there any methods like flickr.GetNextPage(), thus i can get the following pages of the search result?




Jul 8, 2010 at 2:03 PM
You just need to set the Page property and keep searching, as it mentions in the examples page:

It might help if you got to know the actual Flickr API a bit better, as this is made clear in the Flickr API pages.

Also note that the Flickr API will start returning duplicate responses after about the first 4000 images if you are using the method.