jsonflickr

Flickr API - photos_public how to get more than 19 photos


An example api call is: https://api.flickr.com/services/feeds/photos_public.gne?tags=dog&tagmode=any&format=json

Which only returns 20 images. Is there a way to get the next 20 images, or load more images?


Solution

  • It's API page doesn't say anything: https://www.flickr.com/services/feeds/docs/photos_public/

    But I found another query to work with:

    https://api.flickr.com/services/rest?sort=relevance&parse_tags=1&content_type=7&extras=can_comment%2Ccount_comments%2Ccount_faves%2Cdescription%2Cisfavorite%2Clicense%2Cmedia%2Cneeds_interstitial%2Cowner_name%2Cpath_alias%2Crealname%2Crotation%2Curl_c%2Curl_l%2Curl_m%2Curl_n%2Curl_q%2Curl_s%2Curl_sq%2Curl_t%2Curl_z%2Cis_marketplace_licensable&per_page=50&page=1&lang=en-US&text=dog&viewerNSID=&method=flickr.photos.search&csrf=&api_key=fb4c82e7cd32fc74eb349aa61fc1b1aa&format=json&hermes=1&hermesClient=1&reqId=f866abd5&nojsoncallback=1

    This one has all you need, including tag (text param), page and per_page. I think you should to sing up your app here and you gonna to receive your own api_key.