searchInstagram
retrieves public pictures and video whose caption
mentions a given hashtag, or that were sent within a given area, delimited
by a set of coordinates and a radius. It returns a data frame with
information about each picture or video, and optionally will download
all pictures to a specific folder
searchInstagram(tag = NULL, token, n = 100, lat = NULL, lng = NULL, distance = NULL, folder = NULL, mindate = NULL, maxdate = NULL, verbose = TRUE, sleep = 0)
instaOAuth
.NULL
, will download all pictures
to this folder.TRUE
(default), outputs details about progress
of function on the console.The mindate
and maxdata
search parameters only work when searching
by location, not when searching by tag.
IMPORTANT: After June 1st, 2016 only applications that have passed permission review by Instagram will be allowed to access this API endpoint. See https://www.instagram.com/developer/review/ for more information.
instaOAuth
## Not run:
# ## See examples for instaOAuth to know how token was created.
# ## Searching and downloading 100 public media that mention #obama
# load("my_oauth")
# obama <- searchInstagram( tag="obama", token=my_oauth, n=100, folder="obama")
# ## Searching and downloading pictures sent from Times Square with a minimum date
# ## of 2013-12-31 and a maximum date of 2014-01-01
# tsq <- searchInstagram( lat=40.7577, lng=-73.9857, distance=500,
# token=my_oauth, n=500, folder="timessquare",
# mindate="2014-12-31", maxdate="2014-01-01")
# ## End(Not run)
Run the code above in your browser using DataLab