5

I am getting some irrelevant and low (subjective) image quality from the flickr api. I notice that sites such as haiku deck use flickr api and they get relevant results

desired flickr search result

I am using the flickrnet api. Below is the code I am using, along with the results when query = 'cow'

  Flickr flickr = new Flickr(flickrKey, flickrSecret);

            PhotoSearchOptions options = new PhotoSearchOptions();

            options.SafeSearch = SafetyLevel.Safe;
            options.Licenses.Add(LicenseType.AttributionCC);
            options.MediaType = MediaType.Photos;

            options.Text = query; 

            options.Extras = PhotoSearchExtras.AllUrls;

            PhotoCollection photos = flickr.PhotosSearch(options);

actual results

CodeToad
  • 4,656
  • 6
  • 41
  • 53

1 Answers1

4

the solution is to set sort by relevance. default is by date

  options.SortOrder = PhotoSearchSortOrder.Relevance;
CodeToad
  • 4,656
  • 6
  • 41
  • 53
  • There is the order by `relevance` AND another field called `accuracy`. Also I usually set `safe_search` to true in case of. (avoid some NSFW, but is not 100% perfect) – Vadorequest May 08 '16 at 10:02
  • accuracy applies to geographic search. I am indeed setting safe search to true. – CodeToad May 08 '16 at 10:25