Instagram Data Model

Instagram is a social media platform where users share photos and videos, connect with others, and discover new content.

Instagram Tables

The Instagram connector models the data in Instagram as a list of tables in a relational database that can be queried using standard SQL statements.

Comments

Create, delete, and query Comments on a media object. Requires the instagram_basic and instagram_manage_comments scopes.

Only the select, delete, and insert operations are supported.

Select

The connector will use the Instagram APIs to filter results by MediaId and will execute other filters client-side within itself.

  • The following query returns all comments on all media in your account. UserId will be null if the comment is from an account that is not a business account.

    SELECT * FROM Comments

  • To query comments for a specific media object, MediaId is required. The MediaId column supports the = operator. For example:

    SELECT * FROM Comments WHERE MediaId = '1501471279105199430_5380790872'

Insert

Create a comment on a media object with the following rules:

  • MediaId and Text are the only available and required fields.

  • The total length of the comment cannot exceed 300 characters.

  • The comment cannot contain more than 4 hashtags.

  • The comment cannot contain more than 1 URL.

  • The comment cannot consist of all capital letters.

Example:

INSERT INTO Comments (MediaId, Text) VALUES ('1501471279105199430_5380790872', 'My comment text #instadevelopers')

Columns

NameTypeReadOnlyDescription
Id [KEY]StringTrueThe unique identifier for the comment.
TextStringFalseThe text of the comment.
MediaIdStringFalseThe unique identifier for the media.
CreatedDatetimeTrueThe time when the media was created.
UserIdStringTrueThe unique identifier for the user.
UsernameStringTrueThe username for the user.
LikesStringTrueThe number of likes.
HiddenBooleanTrueThe boolean that shows if the comment is hidden.
InstagramBusinessAccountIdStringTrueThe unique identifier for the Instagram business account Id.

Replies

Query and insert replies on a media object. Requires the instagram_basic and instagram_manage_comments scopes.

Only the select and insert operations are supported.

Select

The connector will process a filter on CommentId server side and will execute other filters client-side within itself.

  • The following query returns replies from all comments in your account. UserId will be null if the reply is from an account that is not a business account.

    SELECT * FROM Replies

  • To query replies for a specific comment, CommentId is required. The supported operator for the CommentId column is =.

Example:

SELECT * FROM Replies WHERE CommentId = '1501471279105199430_5380790872'

Insert

Create a reply on a comment object with the following rules:

  • CommentId and Text are the only available and required fields.

  • The total length of the comment cannot exceed 300 characters.

  • The reply cannot contain more than 4 hashtags.

  • The reply cannot contain more than 1 URL.

  • The reply cannot consist of all capital letters.

Example:

INSERT INTO Replies (CommentId, Text) VALUES ('1501471279105199430_5380790872', 'My reply #instadevelopers')

Columns

NameTypeReadOnlyDescription
Id [KEY]StringTrueThe unique identifier for the reply.
UsernameStringTrueThe username for the user.
CommentIdStringFalseThe unique identifier for the comment.
CreatedDatetimeTrueThe time when the reply was created.
UserIdStringTrueThe unique identifier for the user.
MediaIdStringTrueThe unique identifier for the associated media.
TextStringFalseThe comment.
LikeCountIntTrueThe number of likes.
InstagramBusinessAccountIdStringTrueThe unique identifier for the Instagram business account Id.

Instagram Views

Views are similar to tables in the way that data is represented; however, views are read-only.

Queries can be executed against a view as if it were a normal table.

AccountContactButtonType

It returns the number of taps on the DIRECTION, CALLs and EMAILs button during the selected time period.

For this view, the Metric Type is total_value and Breakdown(dimension) is contact_button_type. Requires the instagram_basic and instagram_manage_insights scopes.

Select

The connector will use the Instagram APIs to process filters that refer to a date range or InstagramBusinessAccountId and will process other filters client-side within itself.

  • Metric supports the ‘=’ operator.

    The default query returns results for the ‘profile_links_taps’ metric.

    SELECT * FROM AccountContactButtonType

    SELECT * FROM AccountContactButtonType WHERE FromDateTime='2023-07-02T00:00:00Z' AND ToDateTime='2023-07-24T00:00:00Z'

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.
MetricStringMetric Type. Default value is profile_links_taps.

The allowed values are profile_links_taps.
DIRECTIONIntNumber of taps on DIRECTION button.
CALLIntNumber of taps on Calls button.
EMAILIntNumber of taps on Emails button.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
FromDateTimeDatetimeThe earliest time for insight data to have been collected.
ToDateTimeDatetimeThe latest time for insight data to have been collected.

AccountFollowersNonfollowers

The number of accounts that followed and the number of accounts that unfollowed or stopped using Instagram during the selected time period.

For this view, the Metric Type is total_value and Breakdown(dimension) is follow_type. Requires the instagram_basic and instagram_manage_insights scopes.

Select

The connector will use the Instagram APIs to process filters that refer to a date range or InstagramBusinessAccountId and will process other filters client-side within itself.

  • Metric supports the ‘=,IN’ operator.

    The default query returns results for the ‘follows_and_unfollows’ metric.

    SELECT * FROM AccountFollowersNonfollowers

    SELECT * FROM AccountFollowersNonfollowers WHERE FromDateTime='2023-06-20T00:00:00Z' AND ToDateTime='2023-07-12T00:00:00Z'

    To retrieve the result for other metrics, then explicitly specify the Metric in where clause. For example:

    SELECT * FROM AccountFollowersNonfollowers WHERE Metric = 'reach'

    SELECT * FROM AccountFollowersNonfollowers WHERE Metric IN ('follows\_and\_unfollows', 'reach')

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.
MetricStringMetric Type. Default value is follows_and_unfollows.

The allowed values are follows_and_unfollows, reach.
FollowerIntThe number of accounts that followed the Instagram business account
NonfollowerIntThe number of accounts that unfollowed the Instagram business account

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
FromDateTimeDatetimeThe earliest time for insight data to have been collected.
ToDateTimeDatetimeThe latest time for insight data to have been collected.

AccountInsights

Allows you to get insights for an Instagram business account. Requires the instagram_basic and instagram_manage_insights scopes.

Select

You can query the following metrics given a date range. The default date range is the last 7 days.

  • Impressions (accepts time periods of day, week, and days_28)

  • Reach (accepts time periods of day, week, and days_28)

  • FollowerCount (only accepts the day period)

  • EmailContacts (only accepts the day period)

  • PhoneCallClicks (only accepts the day period)

  • TextMessageClicks (only accepts the day period)

  • GetDirectionsClicks (only accepts the day period)

  • WebsiteClicks (only accepts the day period)

  • ProfileViews (only accepts the day period)

Specify a date range with the FromDateTime and ToDateTime columns. Specify the intervals of the date range by setting the Period column in the WHERE clause.

Note that you cannot use a period on a metric that does not support it.

For example, you cannot use Impressions AND FollowerCount with period days_28 because FollowerCount only supports the day period.

The connector will use the Instagram APIs to process filters that refer to a date range or Id.

The following examples show how to retrieve metrics over a given date range:

  • The default query returns results for the following metrics during the last seven days: Impressions, Reach, FollowerCount, EmailContacts, PhoneCallClicks, TextMessageClicks, GetDirectionsClicks, WebsiteClicks, and ProfileViews.

    SELECT * FROM AccountInsights

  • Filter on FromDateTime and ToDateTime to explicitly specify a different date range. The max date range cannot be more than 30 days (2592000 s).

    SELECT * FROM AccountInsights WHERE FromDateTime = '2018/01/01' AND ToDateTime = '2018/01/30' AND period = 'day'

  • Return results over a period of 7 days.

    SELECT * FROM AccountInsights WHERE FromDateTime = '2018/01/01' AND period = 'day'

  • Return results from 2018/01/01 to 2018/01/08.

    SELECT * FROM AccountInsights WHERE ToDateTime = '2018/01/08' AND period = 'day'

  • Return a custom projection on account insights for the date range from 2018/01/01 to 2018/01/08.

    SELECT Impressions, FollowerCount, EmailContacts FROM AccountInsights WHERE FromDateTime = '2018/01/01' AND ToDateTime = '2018/01/30' AND period = 'day'

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier of the Instagram business account Id.
EndTimeDateThe most recent date this insight data is relevant for.
ImpressionsIntegerTotal number of times this profile has been seen.
ReachIntegerTotal number of unique accounts that have seen this profile.
ProfileViewsIntegerTotal number of unique accounts that have viewed this profile within the specified period.
FollowerCountIntegerTotal number of unique accounts following this profile.
EmailContactsIntegerTotal number of taps on the email link in this profile.
PhoneCallClicksIntegerTotal number of taps on the call link in this profile.
TextMessageClicksIntegerTotal number of taps on the text message link in this profile.
GetDirectionsClicksIntegerTotal number of taps on the directions link in this profile.
WebsiteclicksIntegerTotal number of taps on the website link in this profile.
PeriodStringThe period for the insight. This controls how rows will be broken up (by day, week, 28 days, or lifetime). This must always be specified.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
FromDateTimeDatetimeThe earliest time for insight data to have been collected.
ToDateTimeDatetimeThe latest time for insight data to have been collected.

AccountMediaProductType

It returns the number of POSTs and IGTVs during the selected time period.

For this view, the Metric Type is total_value and Breakdown(dimension) is media_product_type. Requires the instagram_basic and instagram_manage_insights scopes.

Select

The connector will use the Instagram APIs to process filters that refer to a date range or InstagramBusinessAccountId and will process other filters client-side within itself.

  • Metric supports the ‘=,IN’ operator.

    The default query returns results for the ‘reach’ metric.

    SELECT * FROM AccountMediaProductType

    SELECT * FROM AccountMediaProductType WHERE FromDateTime='2023-06-20T00:00:00Z' AND ToDateTime='2023-07-12T00:00:00Z'

To retrieve the result for other available metric, then explicitly specify the Metric in where clause.

Example:

SELECT * FROM AccountMediaProductType WHERE Metric = 'total_interactions'

SELECT * FROM AccountMediaProductType WHERE Metric = 'likes'

SELECT * FROM AccountMediaProductType WHERE Metric = 'comments'

SELECT * FROM AccountMediaProductType WHERE Metric = 'saves'

SELECT * FROM AccountMediaProductType WHERE Metric = 'shares'

SELECT * FROM AccountMediaProductType WHERE Metric IN ('total_interactions', 'likes', 'comments', 'saves', 'shares')

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.
MetricStringMetric Type. Default value is reach.

The allowed values are reach, total_interactions, likes, comments, saves, shares.
POSTIntNumber of POSTs.
IGTVIntNumber of IGTVs.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
FromDateTimeDatetimeThe earliest time for insight data to have been collected.
ToDateTimeDatetimeThe latest time for insight data to have been collected.

AccountTimeSeriesFollowType

It returns the metric endtime and the value. For this view, the Metric type is time_series and breakdown is follow_type. Requires the instagram_basic and instagram_manage_insights scopes.

Select

The connector will use the Instagram APIs to process filters that refer to a date range or InstagramBusinessAccountId and will process other filters client-side within itself.

  • Metric supports the ‘=’ operator.

    The default query returns results for the ‘reach’ metric.

    SELECT * FROM AccountTimeSeriesFollowType

    SELECT * FROM AccountTimeSeriesFollowType WHERE FromDateTime='2023-06-20T00:00:00Z' AND ToDateTime='2023-07-12T00:00:00Z'

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.
MetricStringMetric Type. The supported Metric types are reach, impressions, website_clicks, profile_views. The default metric type is reach.
EndTimeDatetimeEnd time.
ValueIntegerTotal values of the metrics.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
FromDateTimeDatetimeThe earliest time for insight data to have been collected.
ToDateTimeDatetimeThe latest time for insight data to have been collected.

AccountTimeSeriesMediaProductType

It returns the metric endtime and the value. For this view, the Metric type is time_series and breakdown is media_product_type. Requires the instagram_basic and instagram_manage_insights scopes.

Select

The connector will use the Instagram APIs to process filters that refer to a date range or InstagramBusinessAccountId and will process other filters client-side within itself.

  • Metric supports the ‘=’ operator.

    The default query returns results for the ‘reach’ metric.

    SELECT * FROM AccountTimeSeriesMediaProductType

    SELECT * FROM AccountTimeSeriesMediaProductType WHERE FromDateTime='2023-06-20T00:00:00Z' AND ToDateTime='2023-07-12T00:00:00Z'

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.
MetricStringMetric Type. The supported Metric types are reach, impressions website_clicks, profile_views. The default metric type is reach.
EndTimeDatetimeEnd time.
ValueIntegerTotal values of the metrics.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
FromDateTimeDatetimeThe earliest time for insight data to have been collected.
ToDateTimeDatetimeThe latest time for insight data to have been collected.

AccountTimeSeriesWithoutBreakdown

It returns the metric endtime and the value. For this view, the Metric type is time_series. Requires the instagram_basic and instagram_manage_insights scopes.

Select

The connector will use the Instagram APIs to process filters that refer to a date range or InstagramBusinessAccountId and will process other filters client-side within itself.

  • Metric supports the ‘=’ operator.

    The default query returns results for the ‘impressions’ metric.

    SELECT * FROM AccountTimeSeriesWithoutBreakdown

    SELECT * FROM AccountTimeSeriesWithoutBreakdown WHERE FromDateTime='2023-06-20T00:00:00Z' AND ToDateTime='2023-07-12T00:00:00Z'

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.
MetricStringMetric Type. The supported Metric types are impressions, website_clicks, profile_views, reach. The default metric type is impressions.
EndTimeDatetimeEnd time.
ValueIntegerTotal values of the metrics.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
FromDateTimeDatetimeThe earliest time for insight data to have been collected.
ToDateTimeDatetimeThe latest time for insight data to have been collected.

AccountWithoutBreakdown

It returns the total values of the metric type in Instagram. For example, if the metric type is impressions, it will return the number of times your posts, stories, reels, videos and live videos were on screen, including in ads.

For this view, the Metric Type is total_value. Requires the instagram_basic and instagram_manage_insights scopes.

Select

The connector will use the Instagram APIs to process filters that refer to a date range or InstagramBusinessAccountId and will process other filters client-side within itself.

  • Metric supports the ‘=,IN’ operator.

    The default query returns results for the ‘impressions’ metric.

    SELECT * FROM AccountWithoutBreakdown

    SELECT * FROM AccountWithoutBreakdown WHERE FromDateTime='2023-06-20T00:00:00Z' AND ToDateTime='2023-07-12T00:00:00Z'

To retrieve the result for other available metric, then explicitly specify the Metric in where clause.

Example:

SELECT * FROM AccountWithoutBreakdown WHERE Metric = 'accounts_engaged'

SELECT * FROM AccountWithoutBreakdown WHERE Metric = 'replies'

SELECT * FROM AccountWithoutBreakdown WHERE Metric = 'website_clicks'

SELECT * FROM AccountWithoutBreakdown WHERE Metric = 'profile_views'

SELECT * FROM AccountWithoutBreakdown WHERE Metric IN ('accounts\_engaged', 'replies', 'website\_clicks', 'profile_views')

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.
TotalValueIntTotal values of the metrics.
MetricStringMetric Type. The supported Metric types are impressions, accounts_engaged, replies, website_clicks, profile_views, total_interactions, reach, likes, comments, saves, shares, follows_and_unfollows, profile_links_taps. The default metric type is impressions.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
FromDateTimeDatetimeThe earliest time for insight data to have been collected.
ToDateTimeDatetimeThe latest time for insight data to have been collected.

AudienceInsights

Retrieve follower insights for an Instagram business account.

Select

By default this table returns the following:

  • The countries of this profile’s followers.

To return any of the below demographic information about your followers:

  • The gender and age distribution of this profile’s followers.

  • The locales of this profile’s followers, by country code.

  • The cities of this profile’s followers.

you will need to filter on the AudienceType column:

SELECT * FROM AudienceInsights WHERE AudienceType='country'

SELECT * FROM AudienceInsights WHERE AudienceType IN ('city','country','genderandage')

The above query will return follower counts broken down by city, follower counts broken down by country, and follower counts broken down by gender and age.

Valid values for the AudienceType column are:

  • city

  • country

  • gender

  • age

  • genderandage

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.
AudienceTypeStringThe type of followers breakdown. Possible values: city, country, gender, age, genderandage.
AudienceGroupStringThe breakdown value for followers.
TotalAudienceIntegerThe total number of followers.
DescriptionStringThe total number of the followers for this profile who were online during the specified period.
TimeframeStringThe earliest time for insight data to have been collected. Possible values: last_14_days, last_30_days, last_90_days, prev_month, this_month, this_week.

IGMedia

This View Represents an Instagram Photo, Video, Story, Album, or IGTV media.

Select

The connector will use the Instagram API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.

  • Id supports the ‘=’ operator.

For example, the following query is processed server side:

SELECT * FROM IGMedia WHERE Id = '1234'

Columns

NameTypeDescription
Id [KEY]StringMedia ID.
IGIdStringInstagram media ID.
CaptionStringCaption for the IGMedia.
CommentsCountIntegerCount of comments on the media.
IsCommentEnabledBooleanIndicates if comments are enabled or disabled. Excludes album children.
LikeCountIntegerCount of likes on the media.
MediaProductTypeStringSurface where the media is published.
MediaTypeStringMedia type.
MediaUrlStringMedia URL.
OwnerStringID of Instagram user who created the media.
PermanentURLStringPermanent URL to the media.
ShortCodeStringShortcode to the media.
ThumbnailUrlStringMedia thumbnail URL.
TimestampDatetimeISO 8601 formatted creation date in UTC.
UsernameStringUsername of user who created the media.
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.

InstagramBusinessProfile

Get information about the Instagram Business account. Requires the instagram_basic scope, business_management, manage_pages .

Select

The connector will process all filters on this table client-side within itself.

Columns

NameTypeDescription
InstagramBusinessAccountId [KEY]StringThe unique identifier of the Instagram business account
UserNameStringThe username of the person.
FullNameStringThe full name of the person.
ProfilePictureUrlStringThe profile picture of the person.
BioStringThe bio of the person.
WebsiteStringThe website of the person.
MediaCountIntegerThe media count of the profile.
FollowsCountIntegerThe follows count of the profile.
FollowersCountIntegerThe followers count of the profile.

InstagramPages

Query information about pages connected to the Facebook account. Requires the instagram_basic scope.

Select

The connector will process all filters client-side within itself. You can use this table to obtain the value of the BusinessAccountId connection property:

SELECT Name, InstagramBusinessAccountId FROM Pages

Columns

NameTypeDescription
Id [KEY]StringThe unique identifier for the pages.
NameStringThe unique identifier for the instagram.
InstagramBusinessAccountIdStringThe unique identifier for the instagram.
AccessTokenStringAccess Token

Media

Query media objects. Requires the instagram_basic and instagram_content_publish scopes.

Select

The connector will use the Instagram APIs to process filters by Id and will process other filters client-side within itself.

The following query gets all media published by the authenticated user:

SELECT * FROM Media

To retrieve a single media object, the Id is required. The Id column supports the = operator. For example:

SELECT * FROM Media WHERE Id = '1501471279105199430_5380790872'

Columns

NameTypeDescription
Id [KEY]StringThe unique identifier for the media object.
InstagramBusinessAccountIdStringThe unique identifier of the Instagram business account Id.
UsernameStringThe username.
MediaTypeStringThe type of media (image or video or reels or carousel).
MediaProductTypeStringThe Surface where the media is published Can be AD, FEED, STORY or REELS.
CaptionStringThe caption for the media. Excludes carousel children.
CommentsCountIntegerThe number of comments.
LikesCountIntegerThe number of likes.
MediaurlStringThe video URL of the media.
LinkStringThe link of the media.
CreatedDatetimeThe time when the media was created.

MediaInsightReels

Allows you to get insights for reel media object. Requires the instagram_basic and instagram_manage_insights scopes.

Select

You can query the following metrics using server-side processing:

  • Reach

  • Comments

  • Likes

  • Saved

  • Plays

  • Shares

  • TotalInteractions

The connector will use the Instagram APIs to process filters by a MediaId and will process filters on other columns client-side within itself.

  • MediaInsightReels will only return the result of reels object.

  • Return results for the following metrics, saved for all the reels objects: Reach, Saved, Comments, Likes, Plays, Shares and TotalInteractions.

    SELECT * FROM MediaInsightReels WHERE MediaId = 17905513811523370"

    SELECT Reach, Saved, Comments, Likes, Plays, Shares, TotalInteractions FROM MediaInsightReels WHERE MediaId = 17905513811523370

Columns

NameTypeDescription
MediaIdStringThe unique identifier of the insight.
ReachIntegerTotal number of unique accounts that have seen the media object.
SavedIntegerTotal number of unique accounts that have saved the media object.
CommentsIntegerTotal number of unique accounts that have Comments on the media object.
LikesIntegerTotal number of unique accounts that have likes the media object.
PlaysIntegerTotal number of unique accounts that have plays the media object.
SharesIntegerTotal number of unique accounts that have Shared the media object.
TotalInteractionsIntegerTotal number of unique accounts that involved in the media object.
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.

MediaInsights

Allows you to get insights for an individual media object. Requires the instagram_basic and instagram_manage_insights scopes.

Select

You can query the following metrics using server-side processing:

  • Impressions

  • Engagement (likes, comments, and saves)

  • Reach

  • Saved

  • Videoviews (only on a video object)

  • TapsForward (only on a story object)

  • TapsBack (only on a story object)

  • Exits (only on a story object)

  • Replies (only on a story object)

The connector will use the Instagram APIs to process filters by a MediaId and will process filters on other columns client-side within itself.

  • MediaInsights will return result of all media objects except reels object.

  • Return results for the following metrics, saved for all the image and carousel objects: impressions, engagement, and reach.

    SELECT * FROM MediaInsights

  • Query the MediaInsights view using a different object, for example, stories.

    SELECT TapsForward, TapsBack FROM MediaInsights WHERE MediaId = "132155564886465"

  • Query the MediaInsights view using a different object, for example, videos.

    SELECT Impressions, Engagement, Reach, Saved, VideoViews FROM MediaInsights WHERE MediaId = "1321555648546465"

Columns

NameTypeDescription
MediaIdStringThe unique identifier of the insight.
ImpressionsIntegerTotal number of times the media object has been seen.
EngagementIntegerTotal number of likes and comments on the media object. Only available when Version< 18.0
TotalInteractionsIntegerTotal number of likes, comments, saves, and shares on the media object. Only available when Version >= 18.0
ReachIntegerTotal number of unique accounts that have seen the media object.
SavedIntegerTotal number of unique accounts that have saved the media object.
VideoViewsIntegerTotal number of unique accounts that have viewed the video.
TapsForwardIntegerTotal number of unique accounts that have tapped forward.
TapsBackIntegerTotal number of unique accounts that have tapped backwards.
ExitsIntegerTotal number of exits from unique accounts.
RepliesIntegerTotal number of unique accounts that have replied.
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account Id.

MediaInsightsPost

Allows you to get insights for an individual media object for POSTs. Requires the instagram_basic and instagram_manage_insights scopes.

Select

You can query the following metrics using server-side processing:

  • Comments

  • Follows

  • Likes

  • ProfileActivity

  • ProfileVisits

  • Shares

  • TotalInteractions

The connector will use the Instagram APIs to process filters by a MediaId and will process filters on other columns client-side within itself.

  • Return results for the following metrics, saved for all the POSTs objects: Comments, Follows, Likes, ProfileActivity, ProfileVisits, Shares and TotalInteractions.

    SELECT * FROM MediaInsightsPost WHERE MediaId = 17945732813652602"

    SELECT Comments, Follows, Likes, ProfileActivity, ProfileVisits, Shares, TotalInteractions FROM MediaInsightsPost WHERE MediaId = 17945732813652602

Columns

NameTypeDescription
MediaIdStringThe unique identifier of the insight.
CommentsIntegerThe number of comments on your post.
FollowsIntegerThe number of accounts that started following you.
LikesIntegerThe number of likes on your post.
ProfileActivityIntegerThe number of actions people take when they visit your profile after engaging with your post.
ProfileVisitsIntegerThe number of times your profile was visited.
SharesIntegerThe number of shares of your post.
TotalInteractionsIntegerThe number of likes, saves, comments and shares on your post minus the number of unlikes, unsaves and deleted comments.

MediaInsightsStory

Allows you to get insights for an individual media object for Story. Requires the instagram_basic and instagram_manage_insights scopes.

Select

You can query the following metrics using server-side processing:

  • Follows

  • ProfileActivity

  • ProfileVisits

  • Shares

  • TotalInteractions

The connector will use the Instagram APIs to process filters by a MediaId and will process filters on other columns client-side within itself.

  • Return results for the following metrics, saved for all the Story objects: Follows, ProfileActivity, ProfileVisits, Shares and TotalInteractions.

    SELECT * FROM MediaInsightsStory WHERE MediaId = 17945732813652602"

    SELECT Comments, Follows, Likes, ProfileActivity, ProfileVisits, Shares, TotalInteractions FROM MediaInsightsStory WHERE MediaId = 17945732813652602

Columns

NameTypeDescription
MediaIdStringThe unique identifier of the insight.
FollowsIntegerThe number of accounts that started following you.
ProfileActivityIntegerThe number of actions people take when they visit your profile after engaging with your story.
ProfileVisitsIntegerThe number of times your profile was visited.
SharesIntegerThe number of times your profile was visited.
TotalInteractionsIntegerThe number of replies and shares for your story.

OnlineFollowers

Query Online Followers insights as hourly totals. Requires the instagram_basic and instagram_manage_insights scopes.

Select

You can use the FromDateTime and ToDateTime columns to filter the results by a timeframe. The connector uses the Instagram API to process filters that refer to a timeframe or Id and will process other filters client-side within itself.

  • The default query returns results as hourly totals during the last 7 days.

    SELECT * FROM OnlineFollowers

  • The maximum timeframe you can specify with the FromDateTime and ToDateTime columns is 30 days (2592000 s).

    SELECT * FROM OnlineFollowers WHERE FromDateTime = '2018/01/01' AND ToDateTime = '2018/01/30'

Columns

NameTypeDescription
InstagramBusinessAccountIdStringThe unique identifier for the business account.
StartTimeDatetimeThe start datetime of the insight.
EndTimeDatetimeThe end datetime of the insight.
OnlinefollowersIntegerThe number of the online followers at the specific time.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
FromDateTimeDatetimeThe earliest time for insight data to have been collected.
ToDateTimeDatetimeThe latest time for insight data to have been collected.

Pages

Get details of Pages. Requires ‘pages_read_engagement’ permission or the ‘Page Public Content Access’ feature or the ‘Page Public Metadata Access’ feature.

Select

The connector will use the Instagram API to process WHERE clause conditions built with the following column and operator. The SearchTerms is required to make a request and the rest of the filter is executed client side within the connector.

  • SearchTerms supports the ‘=’ comparison.

    Example:

    SELECT * FROM Pages WHERE SearchTerms = 'facebook'

Columns

NameTypeDescription
Id [KEY]StringThe ID of the Facebook Page.
EligibleForBrandedContentBooleanDisplay whether the Facebook Page is eligible to post branded content.
IsUnclaimedBooleanDisplay whether a Facebook Page that was automatically generated has been claimed by the business it represents.
LinkStringThe link to the Facebook Page.
CityStringThe city where the business represented by the Facebook Page is located.
CountryStringThe country where the business represented by the Facebook Page is located.
LatitudeDoubleThe latitude of the business represented by the Facebook Page.
LongitudeDoubleThe longitude of the business represented by the Facebook Page.
StateStringThe state where the business represented by the Facebook Page is located.
StreetStringThe street on which the business represented by the Facebook Page is located.
ZipIntegerThe postal code of the business represented by the Facebook Page.
NameStringThe name of the Facebook Page.
VerificationStatusStringThe verification status of the Facebook Page that represents a business.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

NameTypeDescription
SearchTermsStringThe term that is to be searched.

Permissions

Query the Permissions the User has granted the current application.

Select

To query the Permissions view.

SELECT * FROM Permissions

Columns

NameTypeDescription
PermissionName [KEY]StringThe name of the permission.
StatusStringThe status of the requested permission.

Stories

Query Stories. Requires the instagram_basic and instagram_manage_insights scopes.

Select

The connector process all filters on this table client-side within itself.

Columns

NameTypeDescription
Id [KEY]StringThe unique identifier for the story.
InstagramBusinessAccountIdStringThe unique identifier of the Instagram business account Id.

Tags

Query tags. Requires the instagram_basic and instagram_manage_comments scopes.

Select

The connector processes all filters on this table client-side within itself.

Columns

NameTypeDescription
Id [KEY]StringThe unique identifier for the tag.
UsernameStringThe unique identifier for the user.
CaptionStringThe caption for the tag.
ComentsCountIntThe number of coments.
LikeCountIntThe number of likes.
MediTypeStringThe type of media (image or video).
MediUrlStringThe media URL.
UserIdStringThe Id of the user.
TimestampDatetimeTime the media was created.
InstagramBusinessAccountIdStringThe unique identifier for the Instagram business account.
Top