Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)
WOLFRAM LANGUAGE SERVICE CONNECTION

Instagram

Connect your Instagram account to the Wolfram Language to import and analyze photos, comments, and followers.

Connecting & AuthenticatingConnecting & Authenticating

    ServiceConnect["Instagram"] creates a connection to the Instagram API. If a previously saved connection can be found, it will be used; otherwise, a new authentication request will be launched.

RequestsRequests

    ServiceExecute[conn,"request",params] sends a request to the connection identified by conn, using parameters params. The following give possible requests.

    User Data

    Requests:

    "UserData" data about the authenticated user's account

    "UserID"  ▪  "Picture"

    Parameters:
  • "UserID"authenticated useruser ID
  • Followers

    Requests:

    "Followers" usernames of the user's followers

    "FollowerIDs" user IDs of the user's followers

    "Followings" usernames of people the user is following

    "FollowingIDs" user IDs of people the user is following

    "FollowingCount"  ▪  "FollowerCount"

    Parameters:
  • "UserID"authenticated useruser ID
  • User Media

    Requests:

    "LatestMedia" import the user's most recent published media

    "LatestPhotos" import a list of the user's most recent published photos

    "LatestVideos" link to the user's most recent videos

    "Liked" photos the user has liked

    "LikedIDs"  ▪  "LatestMediaIDs"  ▪  "CaptionedLatestPhotos"

    Parameters:
  • "UserID"authenticated useruser ID
  • Popular Media

    Requests:

    "PopularMedia" import popular media on Instagram

    "PopularPhotos" import popular photos

    "PopularVideos" links to popular videos

    "PopularMediaURLs" links to popular media

    "PopularMediaIDs"  ▪  "CaptionedPopularPhotos"

    Media Data

    Requests:

    "Media" import a photo

    "Caption" usernames of the user's followers

    "Comments" user IDs of the user's followers

    "Likes" usernames of people the user is following

    "Owner" user IDs of people the user is following

    "Type" type of media

    "CommentIDs"  ▪  "CommentCount"  ▪  "LikeIDs"  ▪  "LikeCount"  ▪  "OwnerID"  ▪  "CommentAuthors"  ▪  "CreationDate"  ▪  "Link"  ▪  "Location"  ▪  "MediaID"

    Parameters:
  • "MediaID"(required)media ID
  • Tags

    Requests:

    "TaggedMedia" import media with the specified tag

    "TaggedMediaURLs" link to media with the specified tag

    "TaggedMediaIDs" media IDs associated with a tag

    Parameters:
  • "Tag"(required)hashtag
  • Search

    Requests:

    "UserSearch" search for users

    "TagSearch" search for hashtags

    Parameters:
  • "Query"(required)query string

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Create a new connection by launching an authentication dialog:

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

Search for a user:

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

Import recent media from a user:

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

Find who is following a user:

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