This vignette provides a quick tour of the R package “FlickrAPI”. This package is maintained by Koki Ando.
There are two functions for searching Flickr photos:
getPhotos()
getPhotoSearch()
getPhotos()
allows you to get public photos for any
Flickr user or all photos from the account associated with the Flickr
API key.
getPhotoSearch()
supports a broader range of search
options including:
# Search for photos of cats and dogs in North Carolina
nc_bbox <- c(-84.32385, 33.88199, -75.45698, 36.58965)
getPhotoSearch(tags = c("cats", "dogs"), bbox = nc_bbox)
getPhotoSearch()
returns 100 photos per page by default
but this can be increased to 250 if using the bbox parameter searching
by location or 500 otherwise. Additional pages can be accessed using the
page parameter.
The extras parameter can be used to return additional information about the photos including “description”, “date_upload”, “date_taken”, “owner_name”, and urls for all available image sizes.