"Flickr" (Service Connection)

Search for and import photos from Flickr using the Wolfram Language.

Connecting & Authenticating

    ServiceConnect["Flickr"] creates a connection to the Flickr API. If a previously saved connection can be found, it will be used; otherwise, a new authentication request will be launched.
    Use of this connection requires an internet connection and a Flickr user account.

Requests

    ServiceExecute["Flickr","request",params] sends a request to the Flickr API, using parameters params. The following give possible requests.

    User Information

    Request:

    "UserData" profile information for the specified user

    Parameters:
  • "User"authenticated useruser ID, name, or email
  • Search Images

    Request:

    "ImageSearch" search photos by user, keyword, description, date range, or location

    Parameters:
  • "User"Noneuser ID, name, or email
    "Keywords"Nonegeneral search keywords
    "Description"Nonekeywords to search for in photo title, description, or tags
    "DateTaken"Nonedate or date range photos were taken
    "DateUploaded"Nonedate or date range photos were uploaded
    "Location"Nonelocation of photos
    "Elements""Data"data elements to return
    "Format""Dataset"output format
    "ImageSize""Medium"image size
    MaxItems30number of results to return
    "StartIndex"1index of first search result to return
    "SortBy"Nonesorting order parameter
  • Import Images

    Request:

    "ImportImage" import a specific image

    Parameters:
  • "Keys"(required)photo ID, farm, server, and secret keys, all provided by "Keys" field in "ImageSearch" request
    "ImageSize""Thumbnail"image size
  • User Image Collections

    Request:

    "UserGalleries" list of photo galleries for a specific user

    "UserAlbums" list of photo albums for a specific user

    Parameters:
  • "User"authenticated useruser ID, name, or email
    MaxItems100number of results to return
    "ShowPrimaryPhoto"Falsewhether to return a representative photo for each gallery
  • Photo Gallery Data

    Request:

    "GalleryImages" data about a specific photo gallery

    Parameters:
  • "GalleryID"(required)gallery ID
    "Elements""Data"data elements to return
    "Format""Dataset"output format of data elements
    "ImageSize""Medium"image size
  • Photo Album Data

    Request:

    "AlbumImages" data about a specific photo album

    Parameters:
  • "AlbumID"(required)album ID
    "Elements""Data"data elements to return
    "Format""Dataset"output format of data elements
    "ImageSize""Medium"image size
    MaxItems100number of elements to return

Parameter Details

    Possible specifications for "User" include:
  • usernamesimple username
    {"UserID",id}where id stands for the API user's ID
    {"UserNane", username}equivalent to passing the username
    {"UserEmail", address}where address stands for the email associated to the user's account
  • Possible values for "Elements" include:
  • "Images"return a list of images
    "Data"return a dataset with a limited set of fields
    "FullData"return a dataset with all available fields
    "ImageLinks"return a list of image hyperlinks
    "LinkedThumbnails"return a list of hyperlinked thumbnails
  • Possible values for "ImageSize" include:
  • "Small"320×240
    "Medium"800×600
    "Large"1024×768
    "Thumbnail"100×75
    "Original"original image size

Notes & Issues

    This product uses the Flickr API but is not endorsed or certified by Flickr.

Examples

Basic Examples  (7)

Create a new connection:

In[1]:=
Click for copyable input
Out[1]=

Search photos by keyword:

In[2]:=
Click for copyable input
Out[2]=

Links to original photos are provided in MetaInformation:

In[3]:=
Click for copyable input
Out[3]=

Search photos by location:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Search photos by location or keyword, taken during a specific date range:

In[1]:=
Click for copyable input
Out[1]=

Search user photos:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Create a photo collage:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Show information about a user's photo albums or galleries:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Show information about a specific photo gallery or album:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

See Also

ServiceExecute  ▪  ServiceConnect  ▪  Twitter  ▪  Instagram