Ir para o conteúdo

Instagram Connection Details

Introduction

Connector Version

This documentation is based on version 25.0.9368 of the connector.

Get Started

Instagram Version Support

The connector models entities in the Instagram Graph API as relational tables.

Establish a Connection

Connect to Instagram

Instagram supports OAuth authentication only.

Desktop Applications

An embedded OAuth application is provided that simplifies OAuth desktop Authentication. Alternatively, you can create a custom OAuth application. See Creating a Custom OAuth App for information about creating custom applications and reasons for doing so.

Get and Refresh the OAuth Access Token

After setting the following, you are ready to connect:

  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
  • OAuthClientId (custom applications only): Set this to the client ID assigned when you registered your application.
  • OAuthClientSecret (custom applications only): Set this to the client secret assigned when you registered your application.
  • CallbackURL (custom application only): Set this to the redirect URI defined when you registered your application.

When you connect, the connector opens Instagram's OAuth endpoint in your default browser. Log in and grant permissions to the application. The connector then completes the OAuth process:

  1. The connector obtains an access token from Instagram and uses it to request data.
  2. The OAuth values are saved in the location specified in OAuthSettingsLocation. These values persist across connections.

The connector refreshes the access token automatically when it expires.

Create a Custom OAuth App

When to Create a Custom OAuth App

OAuth application credentials are embedded with branding that can be used when connecting via a desktop application. Web applications require a custom OAuth application. You may choose to use your own OAuth Application Credentials when you want to

  • control branding of the Authentication Dialog
  • control the redirect URI that the application redirects the user to after the user authenticates
  • customize the permissions that you are requesting from the user

Allow Access to Instagram Data

To allow users to connect through the connector, complete the tasks below:

  1. Connect a Facebook Page to an Instagram account.
  2. Create and register the connector as an app with Instagram.
  3. Submit your app for Facebook's review.

Connect a Facebook Page to an Instagram Account

To access Instagram data, users need a role on a page that is associated with an Instagram account. Any user with a role on the page has access.

To connect a page and an Instagram account, log into Facebook and from your Page's settings, click Instagram, and log into your Instagram account. If your account is not an Instagram Business Account, follow the prompts to set up a business profile.

Create and Register the App

Register an app to obtain the values for the OAuthClientId and OAuthClientSecret properties. The OAuth client credentials authenticate the connector to Facebook.

  1. Log into Facebook and navigate to https://developers.facebook.com/apps.
  2. Create a new app and click Settings > Basic. The OAuthClientId is the App ID displayed. The OAuthClientSecret is the App Secret.
  3. Click Add Platform and select Website. Enter a Site URL. This value is not used in authentication.

Add the Facebook Login Product

Follow these steps to configure the OAuth redirect URI.

  1. Go to your app settings and add the Facebook Login product from the "Products" section.

  2. In the product settings, define the OAuth redirect URI.

    If you are building a desktop application, set the redirect URI to https://localhost:33333/, or a similar https URL.

    If you are building a web application, set the redirect URI you want to be used as the callback URL that users return to with the token that verifies that they have granted your app access.

Add the Instagram API Product

Follow these steps to configure the Instagram API permissions your app requests:

  1. Go to your app settings and add the Instagram product from the "Products" section.

  2. Configure the permissions in the product settings. To access all the tables and views, include the following scopes:

    • instagram_basic
    • instagram_manage_comments
    • instagram_manage_insights

    See the Data Model section for detailed information about the scopes required for specific tables.

Submit the App for Review to Go Live

While you can still with an application without review, to go live and fully access Instagram content, you must submit your application for review and approval.

  1. Click Manage for your application and on the Permissions tab click Start a Submission.
  2. Select the use case that best describes your Instagram integration.
  3. Fill in the form and wait for your application to be approved.

Authenticate to Instagram

Desktop Applications

After setting the following connection properties, you are ready to connect:

  • OAuthClientId: Set this to the App ID for your OAuth app.

  • OAuthClientSecret: Set this to the App Secret for your OAuth app.

  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.

  • BusinessAccountId: If you have more than one Facebook page connected with an Instagram account, set the BusinessAccountId connection property to specify the ID of a business account you have associated with a Facebook page.

    You can get a business account ID by querying the Page view.

When you connect, the connector opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The connector then completes the OAuth process:

  1. Extracts the access token from the callback URL and authenticates requests.
  2. Obtains a new access token when the old one expires.
  3. Saves OAuth values in OAuthSettingsLocation. These values persist across connections.
Web Applications

Follow the steps below to use the connector to get the OAuth token values and connect from a web application. Get an Access Token

Set the following connection properties to obtain the OAuthAccessToken:

Then follow these steps to complete the OAuth exchange:

  1. Call the GetOAuthAuthorizationURL stored procedure. Set the AuthMode input to WEB and set the CallbackURL input to the OAuth redirect URI you specified in your app settings. The stored procedure returns the URL to the OAuth endpoint.

  2. Log in and authorize the application. You are redirected back to the callback URL.

    The callback URL contains the verifier code in a query string parameter. Extract the verifier code from the callback URL.

  3. Set the following parameters and call GetOAuthAccessToken: | | | |-------------|----------------------------------------------------| | | | | Name | Value | | AuthMode | WEB | | Verifier | Set this to the verifier code. | | CallbackURL | Set this to the callback URL in your app settings. |

Connect to Data

To make requests to Instagram, set the OAuthAccessToken property. The OAuthAccessToken has a limited lifetime. When the token expires, you need to call the preceding stored procedures to reauthenticate.

Connect to Multiple Pages

If you have more than one Facebook page connected with an Instagram business account, set BusinessAccountId in addition to OAuthAccessToken. The BusinessAccountId property specifies the ID of a business account you have associated with a Facebook page.

You can get a business account ID by querying the Page View.

Important Notes

Configuration Files and Their Paths

  • All references to adding configuration files and their paths refer to files and locations on the Jitterbit agent where the connector is installed. These paths are to be adjusted as appropriate depending on the agent and the operating system. If multiple agents are used in an agent group, identical files will be required on each agent.

Advanced Features

This section details a selection of advanced features of the Instagram connector.

User Defined Views

The connector supports the use of user defined views, virtual tables whose contents are decided by a pre-configured user defined query. These views are useful when you cannot directly control queries being issued to the drivers. For an overview of creating and configuring custom views, see User Defined Views.

SSL Configuration

Use SSL Configuration to adjust how connector handles TLS/SSL certificate negotiations. You can choose from various certificate formats. For further information, see the SSLServerCert property under "Connection String Options".

Proxy

To configure the connector using private agent proxy settings, select the Use Proxy Settings checkbox on the connection configuration screen.

Query Processing

The connector offloads as much of the SELECT statement processing as possible to Instagram and then processes the rest of the query in memory (client-side).

For further information, see Query Processing.

Log

For an overview of configuration settings that can be used to refine logging, see Logging. Only two connection properties are required for basic logging, but there are numerous features that support more refined logging, which enables you to use the LogModules connection property to specify subsets of information to be logged.

User Defined Views

The Instagram connector supports the use of user defined views: user-defined virtual tables whose contents are decided by a preconfigured query. User defined views are useful in situations where you cannot directly control the query being issued to the driver; for example, when using the driver from Jitterbit.

Use a user defined view to define predicates that are always applied. If you specify additional predicates in the query to the view, they are combined with the query already defined as part of the view.

There are two ways to create user defined views:

  • Create a JSON-formatted configuration file defining the views you want.
  • DDL statements.

Define Views Using a Configuration File

User defined views are defined in a JSON-formatted configuration file called UserDefinedViews.json. The connector automatically detects the views specified in this file.

You can also have multiple view definitions and control them using the UserDefinedViews connection property. When you use this property, only the specified views are seen by the connector.

This user defined view configuration file is formatted so that each root element defines the name of a view, and includes a child element, called query, which contains the custom SQL query for the view.

For example:

{
    "MyView": {
        "query": "SELECT * FROM Users WHERE MyColumn = 'value'"
    },
    "MyView2": {
        "query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)"
    }
}

Use the UserDefinedViews connection property to specify the location of your JSON configuration file. For example:

"UserDefinedViews", "C:\Users\yourusername\Desktop\tmp\UserDefinedViews.json"

Define Views Using DDL Statements

The connector is also capable of creating and altering the schema via DDL Statements such as CREATE LOCAL VIEW, ALTER LOCAL VIEW, and DROP LOCAL VIEW.

Create a View

To create a new view using DDL statements, provide the view name and query as follows:

CREATE LOCAL VIEW [MyViewName] AS SELECT * FROM Customers LIMIT 20;

If no JSON file exists, the above code creates one. The view is then created in the JSON configuration file and is now discoverable. The JSON file location is specified by the UserDefinedViews connection property.

Alter a View

To alter an existing view, provide the name of an existing view alongside the new query you would like to use instead:

ALTER LOCAL VIEW [MyViewName] AS SELECT * FROM Customers WHERE TimeModified > '3/1/2020';

The view is then updated in the JSON configuration file.

Drop a View

To drop an existing view, provide the name of an existing schema alongside the new query you would like to use instead.

DROP LOCAL VIEW [MyViewName]

This removes the view from the JSON configuration file. It can no longer be queried.

Schema for User Defined Views

In order to avoid a view's name clashing with an actual entity in the data model, user defined views are exposed in the UserViews schema by default. To change the name of the schema used for UserViews, reset the UserViewsSchemaName property.

Work with User Defined Views

For example, a SQL statement with a user defined view called UserViews.RCustomers only lists customers in Raleigh:

SELECT * FROM Customers WHERE City = 'Raleigh';

An example of a query to the driver:

SELECT * FROM UserViews.RCustomers WHERE Status = 'Active';

Resulting in the effective query to the source:

SELECT * FROM Customers WHERE City = 'Raleigh' AND Status = 'Active';

That is a very simple example of a query to a user defined view that is effectively a combination of the view query and the view definition. It is possible to compose these queries in much more complex patterns. All SQL operations are allowed in both queries and are combined when appropriate.

SSL Configuration

Customize the SSL Configuration

By default, the connector attempts to negotiate TLS with the server. The server certificate is validated against the default system trusted certificate store. You can override how the certificate gets validated using the SSLServerCert connection property.

To specify another certificate, see the SSLServerCert connection property.

Data Model

The Instagram connector models Instagram objects as an easy-to-use SQL database, using tables, views, and stored procedures. These are defined in schema files, which are simple, easy-to-read text files that define the structure and organization of data.

Tables

The Tables section, which details standard SQL tables, and the Views section, which lists read-only SQL tables, contain samples of what you might have access to in your Instagram account.

Commonly used tables include:

Table Description
InstagramBusinessProfile Retrieves metadata and configuration details for an Instagram Business profile, such as username, profile picture, bio, and linked Facebook page. This view is foundational for mapping the Instagram presence of a business.
InstagramPages Offers visibility into Facebook Pages linked to an Instagram Business account. This is helpful for verifying page connections and managing cross-platform presence.
IGMedia Represents all media types published via an Instagram business account, including photos, videos, reels, stories, albums, and IGTV. This allows for querying and performance analysis at the media object level.
Media Offers a complete overview of all media objects published on an Instagram Business or Creator account, including images, videos, and carousel posts. It is essential for retrieving metadata such as captions, media types, timestamps, and permalinks.
Stories Offers a filtered view of Instagram Story content linked to a specific account. It includes metadata such as timestamps, viewer counts, and interaction metrics. This view facilitates the extraction of insights and performance analysis for temporary story posts.
Comments Manages and stores Instagram comment interactions, including creating, deleting, and retrieving comments linked to media content. It includes features for moderation and analysis of user engagement.
Replies Stores user-generated replies associated with Instagram media objects, including comments on posts and conversations within threads. It supports both querying existing replies and inserting new ones.
MediaInsights Provides performance insights for any media object published by the account. The metrics include reach, engagement, and interactions across different content types. This view aids in developing data-driven content strategies by revealing how individual posts perform across various user segments.
MediaInsightsPost Provides insights specifically for photo and video posts, while excluding stories and reels. It delivers detailed metrics such as post reach, save counts, and engagement ratios. This tool is intended for evaluating the performance of static content and traditional video posts.
MediaInsightsReels Compiles performance metrics specifically for Instagram Reels. It provides detailed insights, including the number of plays, likes, comments, saves, and shares. This analysis is designed to help you examine engagement trends over time for short-form video content
MediaInsightsStory Provides performance insights for Instagram Stories, analyzing metrics such as reach, exits, replies, and taps forward/backward. This perspective allows for detailed analysis of temporary content.
AccountInsights Aggregates key performance metrics for an Instagram business account, including reach, engagement, and profile activity data. This summary serves as a central view for tracking account-level trends over time.
AudienceInsights Analyzes comprehensive demographic and behavioral data of followers for an Instagram business account, including age, gender, location, and active times. This analysis is crucial for effectively understanding and targeting audience segments.
OnlineFollowers Aggregates hourly breakdowns of when a user's Instagram followers are typically online, helping to identify the best posting times for maximum visibility and engagement.
AccountTimeSeriesWithoutBreakdown Returns time-series metrics without a specific breakdown dimension, making it useful for monitoring aggregated metrics like reach over time. It includes end-time and value pairs for temporal analysis.
AccountTimeSeriesFollowType Provides time-based metrics on follower changes, tracking the fluctuations of follows and unfollows over specific intervals. This view uses follow_type as a breakdown dimension and facilitates time-series analysis for identifying trends.
AccountTimeSeriesMediaProductType Provides chronological data on various media types, such as Posts, Stories, IGTV, shared from an Instagram business account. It helps visualize performance trends over time by using media_product_type as a breakdown dimension and supports time-series metric evaluation.
AccountWithoutBreakdown Summarizes cumulative Instagram performance metrics, including total views and engagements across various content types like posts, stories, and reels. No breakdown is provided, making it suitable for overall metric tracking.
AccountFollowType Captures follower dynamics by reporting the number of new followers, unfollows, and users who deactivated accounts over a defined period. This data is aggregated under the 'follow_type' breakdown and can be used to understand audience growth trends.
AccountMediaProductType Analyzes content performance by media type, including standard posts and IGTV videos, over a chosen time period. Metrics are categorized by media_product_type and offer insights into which formats enhance user engagement.

Stored Procedures

Stored Procedures are SQL scripts that extend beyond standard CRUD operations. They accept parameters, execute functions, and manage OAuth authentication tokens.

Discovering the Schemas Programmatically

The available System Tables provide programmatic access to schema information as well as other connector metadata, such as the data source's querying capabilities.

Tables

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

Instagram Connector Tables

Name Description
Comments Manages and stores Instagram comment interactions, including creating, deleting, and retrieving comments linked to media content. It includes features for moderation and analysis of user engagement. The required permissions are instagram_basic and instagram_manage_comments.
Replies Stores user-generated replies associated with Instagram media objects, including comments on posts and conversations within threads. It supports both querying existing replies and inserting new ones. To ensure access and modification rights in the comment ecosystem, it requires the instagram_basic and instagram_manage_comments permissions.

Comments

Manages and stores Instagram comment interactions, including creating, deleting, and retrieving comments linked to media content. It includes features for moderation and analysis of user engagement. The required permissions are instagram_basic and instagram_manage_comments.

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.

For example:

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

UPDATE is not supported.

Delete

Id (the comment's primary key) is required. For example, the following query removes a comment either on the authenticated user's media object or authored by the authenticated user.

DELETE FROM Comments WHERE ID = '1668776136772254'
Columns
Name Type ReadOnly Description
Id [KEY] String True A unique string identifier automatically assigned to each comment. This value can be used to retrieve or reference specific comments across the platform.
Text String False The full text content of the comment, as written by the user. This can include emojis, mentions, hashtags, or links, depending on the user's input.
MediaId String False The unique identifier associated with the media item (image, video, carousel) on which the comment was made. It links the comment to its corresponding media post.
Created Datetime True The exact Coordinated Universal Time (UTC) timestamp indicating when the comment was created. This is useful for sorting chronologically or filtering based on time.
UserId String True The unique identifier of the Instagram user who authored the comment. This ID is persistent across sessions and media interactions.
Username String True The Instagram handle of the user who posted the comment. This is the public-facing username visible on the platform.
Likes Int True The total number of likes that the comment has received from other users, indicating its popularity or relevance.
Hidden Boolean True Indicates whether the comment is hidden from public view. A value of true means the comment has been hidden due to moderation or user action.
InstagramBusinessAccountId String True The unique identifier for the Instagram business account that owns the media or manages the interaction. Used to differentiate comment data across multiple business profiles.

Replies

Stores user-generated replies associated with Instagram media objects, including comments on posts and conversations within threads. It supports both querying existing replies and inserting new ones. To ensure access and modification rights in the comment ecosystem, it requires the instagram_basic and instagram_manage_comments permissions.

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 =. For 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.

For example:

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

UPDATE is not supported.

Delete

Delete is not supported.

Columns
Name Type ReadOnly Description
Id [KEY] String True A unique string that identifies the reply within the system, ensuring traceability and reference across operations and data models.
Username String True The handle or screen name of the Instagram user who posted the reply, used for display and attribution in the user interface.
CommentId String False A unique identifier that links this reply to the original comment it is responding to, maintaining conversational thread integrity.
Created Datetime True The exact timestamp, in Coordinated Universal Time (UTC), indicating when the reply was submitted on the platform.
UserId String True A unique string that identifies the Instagram user who authored the reply, used for authentication, permission checks, and data association.
MediaId String True A unique identifier referencing the media object (photo, video, reel, etc.) associated with the original comment and reply.
Text String False The full textual content of the reply entered by the user, which can include hashtags, mentions, and emojis.
LikeCount Int True The total number of likes that the reply has received, reflecting user engagement and visibility.
InstagramBusinessAccountId String True The unique identifier of the Instagram business account that owns or is associated with the media and interactions captured in this reply.

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.

Instagram Connector Views

Name Description
AccountContactButtonType Provides detailed engagement metrics for the contact buttons (DIRECTION, CALL, EMAIL) displayed on an Instagram business profile during a specific time range. It tracks the total interactions for each type of contact button tapped, allowing for in-depth analysis using the 'contact_button_type' dimension. The permissions needed for access are Instagram_basic and Instagram_manage_insights.
AccountFollowType Captures follower dynamics by reporting the number of new followers, unfollows, and users who deactivated accounts over a defined period. This data is aggregated under the 'follow_type' breakdown and can be used to understand audience growth trends. The permissions required are instagram_basic and instagram_manage_insights.
AccountInsights Aggregates key performance metrics for an Instagram business account, including reach, engagement, and profile activity data. This summary serves as a central view for tracking account-level trends over time. The permissions required are instagram_basic and instagram_manage_insights.
AccountMediaProductType Analyzes content performance by media type, including standard posts and IGTV videos, over a chosen time period. Metrics are categorized by media_product_type and offer insights into which formats enhance user engagement. The permissions required are instagram_basic and instagram_manage_insights permissions.
AccountTimeSeriesFollowType Provides time-based metrics on follower changes, tracking the fluctuations of follows and unfollows over specific intervals. This view uses follow_type as a breakdown dimension and facilitates time-series analysis for identifying trends. The permissions required include instagram_basic and instagram_manage_insights.
AccountTimeSeriesMediaProductType Provides chronological data on various media types, such as Posts, Stories, IGTV, shared from an Instagram business account. It helps visualize performance trends over time by using media_product_type as a breakdown dimension and supports time-series metric evaluation. The required scopes include instagram_basic and instagram_manage_insights.
AccountTimeSeriesWithoutBreakdown Returns time-series metrics without a specific breakdown dimension, making it useful for monitoring aggregated metrics like reach over time. It includes end-time and value pairs for temporal analysis. This requires the instagram_basic and instagram_manage_insights scopes.
AccountWithoutBreakdown Summarizes cumulative Instagram performance metrics, including total views and engagements across various content types like posts, stories, and reels. No breakdown is provided, making it suitable for overall metric tracking. The permissions required are instagram_basic and instagram_manage_insights.
AudienceInsights Analyzes comprehensive demographic and behavioral data of followers for an Instagram business account, including age, gender, location, and active times. This analysis is crucial for effectively understanding and targeting audience segments. The permissions required are instagram_basic and instagram_manage_insights.
IGMedia Represents all media types published via an Instagram business account, including photos, videos, reels, stories, albums, and IGTV. This allows for querying and performance analysis at the media object level, requiring appropriate permissions based on media access.
InstagramBusinessProfile Retrieves metadata and configuration details for an Instagram Business profile, such as username, profile picture, bio, and linked Facebook page. This view is foundational for mapping the Instagram presence of a business. The required permissions are instagram_basic, business_management, and manage_pages.
InstagramPages Offers visibility into Facebook Pages linked to an Instagram Business account. This is helpful for verifying page connections and managing cross-platform presence. It requires the instagram_basic scope.
Media Offers a complete overview of all media objects published on an Instagram Business or Creator account, including images, videos, and carousel posts. It is essential for retrieving metadata such as captions, media types, timestamps, and permalinks. To access this information, the required permissions are instagram_basic and instagram_content_publish.
MediaInsights Provides performance insights for any media object published by the account. The metrics include reach, engagement, and interactions across different content types. This view aids in developing data-driven content strategies by revealing how individual posts perform across various user segments. The permissions required for this analysis are instagram_basic and instagram_manage_insights.
MediaInsightsPost Provides insights specifically for photo and video posts, while excluding stories and reels. It delivers detailed metrics such as post reach, save counts, and engagement ratios. This tool is intended for evaluating the performance of static content and traditional video posts. The required permissions for access are instagram_basic and instagram_manage_insights.
MediaInsightsPostAlbum Offers comprehensive analytics for individual carousel album posts shared on Instagram. It includes metrics such as reach, engagement, and saves. To access this information, the application must have the instagram_basic and instagram_manage_insights OAuth scopes, which allow it to retrieve performance data for content posted by the user.
MediaInsightsReels Compiles performance metrics specifically for Instagram Reels. It provides detailed insights, including the number of plays, likes, comments, saves, and shares. This analysis is designed to help you examine engagement trends over time for short-form video content. The required permissions for access are instagram_basic and instagram_manage_insights.
MediaInsightsStory Provides performance insights for Instagram Stories, analyzing metrics such as reach, exits, replies, and taps forward/backward. This perspective allows for detailed analysis of temporary content and requires both the instagram_basic and instagram_manage_insights OAuth scopes for data access.
OnlineFollowers Aggregates hourly breakdowns of when a user's Instagram followers are typically online, helping to identify the best posting times for maximum visibility and engagement. This requires the instagram_basic and instagram_manage_insights scopes to access follower activity patterns.
Pages Retrieves detailed metadata about Facebook Pages that are linked to an Instagram Business account. The information includes the page name, category, verification status, and any connected Instagram profiles. To access this data, you need permissions from a custom OAuth app, including either pages_read_engagement or approval for Page Public Content Access or Page Public Metadata Access.
Permissions Lists the specific permissions granted by a user to the application, such as access to media, insights, or account metadata. This information is useful for auditing user consent and ensuring that the app operates within its authorized scope.
Stories Offers a filtered view of Instagram Story content linked to a specific account. It includes metadata such as timestamps, viewer counts, and interaction metrics. This view facilitates the extraction of insights and performance analysis for temporary story posts. To access this feature, both instagram_basic and instagram_manage_insights permissions are required.
Tags Provides a read-only interface to access hashtags and tagged media metadata, including related posts, captions, and tagging users. This view aids in analyzing user-generated tags and community trends and requires the instagram_basic and instagram_manage_comments permissions for access.

AccountContactButtonType

Provides detailed engagement metrics for the contact buttons (DIRECTION, CALL, EMAIL) displayed on an Instagram business profile during a specific time range. It tracks the total interactions for each type of contact button tapped, allowing for in-depth analysis using the 'contact_button_type' dimension. The permissions needed for access are Instagram_basic and Instagram_manage_insights.

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
Name Type Description
InstagramBusinessAccountId String A unique identifier associated with the Instagram Business Account from which the insights data is retrieved. This ID is required to accurately query engagement metrics specific to a business profile.
Metric String Specifies the type of engagement metric to retrieve for contact buttons. The default metric is profile_links_taps, which reflects total interactions with all contact methods on the profile. The allowed values are profile_links_taps.
DIRECTION Int The number of times users tapped the Direction button on the Instagram business profile, typically used to get directions to a physical business location.
CALL Int The number of times users tapped the Call button on the Instagram profile, indicating intent to place a phone call to the business.
EMAIL Int The number of times users tapped the Email button, showing user interest in initiating contact with the business via email directly through the profile.
BOOKNOW Int The number of times users engaged with the Book Now button, commonly linked to booking or reservation services integrated with the Instagram business profile.
TEXT Int The number of times users tapped the Text button on the business profile, which allows users to send a text message to the business directly.
INSTANTEXPERIENCE Int The number of taps on Instant Experience components refers to full-screen, mobile-optimized experiences launched from contact actions within Instagram, which include media, interactive elements, and links.
UNDEFINED Int The number of taps on contact components that could not be categorized into any predefined button types, which can include unsupported, experimental, or custom implementations.
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.

Name Type Description
FromDateTime Datetime Represents the start of the time window for the insights data, indicating the earliest timestamp for which interaction data is included.
ToDateTime Datetime Represents the end of the time window for the insights data, marking the most recent timestamp for collected interaction metrics.

AccountFollowType

Captures follower dynamics by reporting the number of new followers, unfollows, and users who deactivated accounts over a defined period. This data is aggregated under the 'follow_type' breakdown and can be used to understand audience growth trends. The permissions required are instagram_basic and instagram_manage_insights.

Columns
Name Type Description
InstagramBusinessAccountId String The globally unique identifier assigned to the Instagram business account, used to distinguish it from other accounts within the platform's ecosystem.
Metric String Indicates the type of account follow activity metric to be retrieved. The default setting is follows_and_unfollows, which encompasses both new followers and unfollowers during the specified date range. The allowed values are follows_and_unfollows, reach.
Follower Int Represents the total number of new followers who began following the Instagram business account during the specified time window.
Nonfollower Int Represents the total number of users who stopped following the Instagram business account within the defined reporting period.
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.

Name Type Description
FromDateTime Datetime Indicates the beginning of the time interval for which insight metrics should be queried. Only data collected at or after this timestamp is considered.
ToDateTime Datetime Marks the end of the time range for insight metric collection. The metrics returned will include data recorded up until this timestamp.

AccountInsights

Aggregates key performance metrics for an Instagram business account, including reach, engagement, and profile activity data. This summary serves as a central view for tracking account-level trends over time. The permissions required are instagram_basic and instagram_manage_insights.

Select

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

  • Reach (accepts time periods of day, week, and days_28)
  • FollowerCount (only accepts the day period)
  • Views (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 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 connector processes other filters client-side within itself.

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: Reach, FollowerCount, and Views.

    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 FollowerCount, Views FROM AccountInsights WHERE FromDateTime = '2018/01/01' AND ToDateTime = '2018/01/30' AND period = 'day'
    
Columns
Name Type Description
InstagramBusinessAccountId String The unique identifier assigned to an Instagram Business Account. This value links the insights data to a specific business entity on Instagram.
EndTime Date The final date for which insight data is relevant in the queried range. This value is not applicable when the MetricType is set to total_value.
Views Integer The total number of times your content — including Reels, posts, and Stories — has been viewed. This metric is exclusively available when using the total_value setting for MetricType.
Reach Integer The total number of distinct Instagram accounts that have seen any content associated with the business profile during the selected time frame.
FollowerCount Integer The current count of unique Instagram accounts that follow this profile. This metric is only accessible when the MetricType is set to default.
MetricType String Specifies the type of metric being used for the query. The common values include default and total_value, which determine the scope and structure of the data returned. The allowed values are default, total_value, time_series.
Period String Defines the time aggregation used for breaking down the insight data. The valid values include day, week, 28 days, and lifetime. This field is required for all queries.
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.

Name Type Description
FromDateTime Datetime Indicates the beginning of the time window used to retrieve the insight data. This helps determine the range over which metrics are aggregated.
ToDateTime Datetime Defines the end of the time window for retrieving insight data. This, combined with FromDateTime, establishes the complete time range for the query.

AccountMediaProductType

Analyzes content performance by media type, including standard posts and IGTV videos, over a chosen time period. Metrics are categorized by media_product_type and offer insights into which formats enhance user engagement. The permissions required are instagram_basic and instagram_manage_insights permissions.

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 =, and IN operators.

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. For 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
Name Type Description
InstagramBusinessAccountId String The unique identifier associated with the Instagram business account used to retrieve media insights. This ID is essential for querying metrics across various media formats tied to the business profile.
Metric String Specifies the type of performance metric to retrieve for the business account's media content. Acceptable values include reach, engagement, and others. The default metric is reach. The allowed values are reach, total_interactions, likes, comments, saves, shares, views.
POST Int Represents the total number of standard feed posts (images or videos) published by the business account within the specified time range.
IGTV Int Represents the total number of IGTV videos published by the business account during the selected reporting period. IGTV content is long-form video hosted on the Instagram platform.
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.

Name Type Description
FromDateTime Datetime Defines the start of the reporting window for which insights are retrieved. Only data collected on or after this timestamp will be included in the result set.
ToDateTime Datetime Defines the end of the reporting window for which insights are retrieved. Only data collected up to and including this timestamp will be considered in the output.

AccountTimeSeriesFollowType

Provides time-based metrics on follower changes, tracking the fluctuations of follows and unfollows over specific intervals. This view uses follow_type as a breakdown dimension and facilitates time-series analysis for identifying trends. The permissions required include instagram_basic and instagram_manage_insights.

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
Name Type Description
InstagramBusinessAccountId String A unique string identifier representing the Instagram Business Account associated with the data. This ID is used to link insights to a specific business profile within the Instagram Graph Application Programming Interface (API).
Metric String Defines the type of engagement metric being measured. The supported values are reach and views. Reach refers to the number of unique accounts that have seen the content. Views typically represent the number of times a video has been played.
EndTime Datetime The timestamp marking the end of the data collection period for the metric. This defines the upper boundary of the time range for the reported insights.
Value Integer The total number of reach or views for the specified time period. This value quantifies overall engagement.
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.

Name Type Description
FromDateTime Datetime The beginning of the data collection period. Insight metrics are included only if they occurred on or after this date and time.
ToDateTime Datetime The ending point of the data collection window. Insight metrics are only included if they occurred on or before this datetime value.

AccountTimeSeriesMediaProductType

Provides chronological data on various media types, such as Posts, Stories, IGTV, shared from an Instagram business account. It helps visualize performance trends over time by using media_product_type as a breakdown dimension and supports time-series metric evaluation. The required scopes include instagram_basic and instagram_manage_insights.

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
Name Type Description
InstagramBusinessAccountId String A unique identifier assigned to an Instagram Business Account. This ID is used to associate the retrieved time series insights with the correct account across Application Programming Interface (API) operations and data aggregations.
Metric String Describes the different types of engagement metrics being measured. The supported values are reach and views. Reach refers to the number of unique accounts that have seen the content. Views typically represent the number of times a video has been played.
EndTime Datetime Represents the endpoint of the time window for which the insight metric data was collected. This is used to define the boundary of the measurement period.
Value Integer Indicates the total value of the specified metric within the defined time frame. For example, the number of unique views accumulated up to the end 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.

Name Type Description
FromDateTime Datetime The beginning of the time interval during which Instagram insight data was collected. Used to filter or slice metrics based on a defined reporting window.
ToDateTime Datetime The end of the time interval during which Instagram insight data was collected. Marks the upper boundary of the time range for data analysis and filtering.

AccountTimeSeriesWithoutBreakdown

Returns time-series metrics without a specific breakdown dimension, making it useful for monitoring aggregated metrics like reach over time. It includes end-time and value pairs for temporal analysis. This 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 AccountTimeSeriesWithoutBreakdown
SELECT * FROM AccountTimeSeriesWithoutBreakdown WHERE FromDateTime='2023-06-20T00:00:00Z' AND ToDateTime='2023-07-12T00:00:00Z'
Columns
Name Type Description
InstagramBusinessAccountId String A unique identifier assigned to the Instagram business account. This ID is used to retrieve account-specific insights and is required for linking Application Programming Interface (API) responses to the corresponding Instagram entity.
Metric String Specifies the type of engagement metric being measured. The supported values include reach, and views. By default, the reach metric is used. Values must be comma-separated as: reach, views.
EndTime Datetime Represents the timestamp marking the end of the reporting interval for the metrics. This value is used to define the boundary of the aggregated insight data.
Value Integer Indicates the total numeric value of the chosen metric, such as reach or views, for the specified time period. The value is computed as a cumulative count over the defined reporting duration.
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.

Name Type Description
FromDateTime Datetime Defines the beginning of the time range for which insight data has been collected. This is a pseudo-column used for internal filtering of historical metrics.
ToDateTime Datetime Defines the end of the time range for which insight data has been collected. This is a pseudo-column used for internal filtering and aggregation of recent metric data.

AccountWithoutBreakdown

Summarizes cumulative Instagram performance metrics, including total views and engagements across various content types like posts, stories, and reels. No breakdown is provided, making it suitable for overall metric tracking. The permissions required are instagram_basic and instagram_manage_insights.

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 =, and IN operators.

The default query returns results for the 'reach' 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. For 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
Name Type Description
InstagramBusinessAccountId String A unique string identifier assigned to the Instagram Business Account. This value is used to query and aggregate metrics specific to a business profile across the platform.
TotalValue Int The aggregate numeric value corresponding to the selected metric across the specified date range. This represents the total engagement or performance depending on the metric type selected.
Metric String Specifies the types of Instagram metrics available for reporting. The supported metrics include: accounts engaged, replies, website clicks, profile views, total interactions, reach, likes, comments, saves, shares, follows and unfollows, profile link taps, and views. For clarity, a space is added after each comma. The default metric is reach.
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.

Name Type Description
FromDateTime Datetime The start timestamp defining the earliest point in time from which the insight metrics are calculated. Must be in ISO 8601 format.
ToDateTime Datetime The end timestamp defining the latest point in time for which the insight metrics are included in the calculation. Must be in ISO 8601 format.

AudienceInsights

Analyzes comprehensive demographic and behavioral data of followers for an Instagram business account, including age, gender, location, and active times. This analysis is crucial for effectively understanding and targeting audience segments. The permissions required are instagram_basic and instagram_manage_insights.

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
Name Type Description
InstagramBusinessAccountId String A unique identifier assigned to the Instagram business account associated with the data. This ID is used to distinguish insights by account.
AudienceType String Specifies the category by which follower demographics are segmented. Supported values include: city, country, gender, age, gender and age. Each represents a different type of audience insight breakdown.
AudienceGroup String Represents the specific group within the selected AudienceType category. For example, if AudienceType is 'city', this could be 'New York'.
TotalAudience Integer Indicates the total count of Instagram users who follow the business account and match the specified AudienceType and AudienceGroup.
Description String The number of followers associated with the Instagram business profile who were actively online during the designated insight collection period.
Timeframe String Defines the reporting window for the insight data. Available values include: last_14_days, last_30_days, last_90_days, prev_month, this_month, this_week. Each denotes a distinct range of time used for aggregating the audience insights.

IGMedia

Represents all media types published via an Instagram business account, including photos, videos, reels, stories, albums, and IGTV. This allows for querying and performance analysis at the media object level, requiring appropriate permissions based on media access.

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
Name Type Description
Id [KEY] String A unique identifier assigned to the media object by the system. This ID can be used to retrieve, reference, or manipulate the media through various Application Programming Interface (API) operations.
IGId String The Instagram-specific identifier for the media object. This ID is directly used within Instagram's ecosystem for identifying media content.
Caption String The textual description or commentary provided by the user when posting the media. This can include hashtags, mentions, and other user-generated content.
CommentsCount Integer The total number of comments posted on the media. This count includes only top-level comments and not replies to comments.
IsCommentEnabled Boolean A boolean flag indicating whether users are allowed to post comments on the media. This field excludes child items in album posts.
LikeCount Integer The total number of likes that the media has received. This metric reflects the audience engagement for the content.
MediaProductType String The publishing surface or product context of the media, such as feed, story, or reel, helps differentiate where the content was shared within Instagram.
MediaType String The type of media content, such as IMAGE, VIDEO, or CAROUSEL_ALBUM. This value determines the rendering and functionality of the media object.
MediaUrl String The direct Uniform Resource Locator (URL) to the actual media content (image or video). This link can be used for display or download purposes.
Owner String The unique identifier of the Instagram user who originally published the media. This value links to the user profile associated with the content.
PermanentURL String A stable, publicly accessible URL that leads directly to the media on Instagram. This link remains constant over time.
ShortCode String A short alphanumeric code used by Instagram to create a compact link to the media. It can be appended to Instagram URLs for direct access.
ThumbnailUrl String The URL of the thumbnail image generated for the media, typically used as a preview in listings or galleries.
Timestamp Datetime The Coordinated Universal Time (UTC) timestamp of when the media was created, formatted using ISO 8601. This is useful for chronological sorting and filtering.
Username String The Instagram handle (username) of the user who posted the media. This is the publicly visible account name.
InstagramBusinessAccountId String The unique identifier assigned to the Instagram Business Account associated with the media. This is used for account-level filtering or insights.

InstagramBusinessProfile

Retrieves metadata and configuration details for an Instagram Business profile, such as username, profile picture, bio, and linked Facebook page. This view is foundational for mapping the Instagram presence of a business. The required permissions are instagram_basic, business_management, and manage_pages.

Select

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

Columns
Name Type Description
InstagramBusinessAccountId [KEY] String A system-generated unique identifier for the Instagram business account used to differentiate it from personal accounts and other business profiles. This ID is required to perform Application Programming Interface (API)-based interactions with Instagram's business features.
UserName String The publicly visible handle or username associated with the Instagram business account. This is used by other users to search for or tag the business.
FullName String The full display name associated with the Instagram business account, typically reflecting the brand or entity name.
ProfilePictureUrl String The direct Uniform Resource Locator (URL) link to the current profile image associated with the business account. This image is displayed on the account's profile and in comments or posts.
Bio String The biography or self-description section on the Instagram business profile. This is a free-form text area where businesses provide a summary of their purpose, brand message, or other relevant details.
Website String The link to the business's official website, as displayed on their Instagram profile, directs users to the specified site.
MediaCount Integer The total number of media items—such as photos, videos, and reels—that the business account has published on Instagram.
FollowsCount Integer The total number of other Instagram accounts that the business account is currently following.
FollowersCount Integer The number of Instagram users who follow the business account. This metric is a key indicator of reach and audience size.

InstagramPages

Offers visibility into Facebook Pages linked to an Instagram Business account. This is helpful for verifying page connections and managing cross-platform presence. It 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
Name Type Description
Id [KEY] String The unique identifier assigned to each Instagram page record in the dataset. This value ensures each row can be uniquely referenced and is typically sourced from the platform's internal record system.
Name String The display name of the Instagram page, typically representing the profile or brand name associated with the account. This name is visible to Instagram users and helps distinguish different pages.
InstagramBusinessAccountId String The unique identifier that links this page to its corresponding Instagram business account. This ID is critical for tracking analytics, managing assets, and making Application Programming Interface (API) calls related to business-level features.
AccessToken String A string token used to authenticate access to the Instagram Business Account's data. This access token is required for performing authorized actions via the Instagram Graph API and should be securely stored.

Media

Offers a complete overview of all media objects published on an Instagram Business or Creator account, including images, videos, and carousel posts. It is essential for retrieving metadata such as captions, media types, timestamps, and permalinks. To access this information, the required permissions are instagram_basic and instagram_content_publish.

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
Name Type Description
Id [KEY] String A system-generated unique identifier that distinguishes each individual media object posted by the Instagram business account.
InstagramBusinessAccountId String A globally unique identifier assigned to the Instagram business account that owns or published the media content.
Username String The handle or username of the Instagram business account that published the media. This is the public-facing account name.
MediaType String Indicates the format of the media, which can be image, video, reels, or carousel. This helps categorize the type of content for engagement analysis.
MediaProductType String Specifies the platform surface where the media was published. The possible values include AD, FEED, STORY, or REELS, representing different user experiences.
Caption String The text description or commentary included with the media post. This does not include captions from individual carousel child media items.
CommentsCount Integer The total number of comments received on the media post, providing a basic measure of user engagement and interaction.
LikesCount Integer The total number of likes the media post has received from users, reflecting its popularity or resonance.
Mediaurl String The direct Uniform Resource Locator (URL) to the video file or media asset, typically used to display or retrieve the actual content programmatically.
Link String The public-facing link to view the media post on Instagram. This URL can be shared or embedded.
Created Datetime The date and time in Coordinated Universal Time (UTC) when the media content was first published on Instagram.
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.

Name Type Description
FromDateTime Datetime The start of the date-time range used to filter media records based on their creation timestamp.
ToDateTime Datetime The end of the date-time range used to filter media records based on their creation timestamp.

MediaInsights

Provides performance insights for any media object published by the account. The metrics include reach, engagement, and interactions across different content types. This view aids in developing data-driven content strategies by revealing how individual posts perform across various user segments. The permissions required for this analysis are instagram_basic and instagram_manage_insights.

Select

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

  • Views
  • TotalInteractions (likes, comments, shares, and saves)
  • Reach
  • Saved
  • 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: views, engagement, and reach.

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

    SELECT Views, Engagement, Reach, Saved FROM MediaInsights WHERE MediaId = "1321555648546465" 
    
Columns
Name Type Description
MediaId String A system-generated string that uniquely identifies the media content associated with the insight, used for data tracking and retrieval across reports and analytics systems.
Views Integer The total number of times the media object was visible to users on the Instagram platform. This metric excludes bot activity and includes multiple views by the same user.
TotalInteractions Integer The combined total of all engagement actions taken on the media object, including likes, comments, shares, and saves. This metric provides a comprehensive measure of audience interaction.
Reach Integer The total count of unique Instagram accounts that have viewed the media object at least once, indicating the breadth of the content's audience exposure.
Saved Integer The number of distinct users who saved the media object to their profile collection, signaling the perceived value or interest in revisiting the content.
Replies Integer The count of unique responses or replies submitted by users, typically applicable for Stories or Reels where direct responses are enabled.
InstagramBusinessAccountId String A unique identifier string that links the insight data to the corresponding Instagram Business Account. This is used for organizational segmentation and reporting.

MediaInsightsPost

Provides insights specifically for photo and video posts, while excluding stories and reels. It delivers detailed metrics such as post reach, save counts, and engagement ratios. This tool is intended for evaluating the performance of static content and traditional video posts. The required permissions for access are instagram_basic and instagram_manage_insights.

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 image and video 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
Name Type Description
MediaId String The unique identifier assigned to each media insight record. This ID helps in tracking specific media objects across reporting and analytical workflows.
Comments Integer The total count of user-generated comments posted in response to the associated media content, representing audience engagement through direct textual feedback.
Follows Integer The number of new followers who began following the account as a direct result of interactions with this specific post, indicating its effectiveness in attracting new audiences.
Likes Integer The total number of likes received on the post, reflecting user approval or positive sentiment toward the content shared.
ProfileActivity Integer The total count of actions performed on the profile page, such as taps on contact buttons or story highlights, after a user viewed or interacted with the post.
ProfileVisits Integer The total number of times users navigated to the account's profile from the media post, indicating interest in learning more about the account or viewing additional content.
Shares Integer The number of times the media post was shared by users to others through direct messages or stories, amplifying content reach and visibility.
TotalInteractions Integer The net total of engagement actions including likes, saves, comments, and shares, adjusted by subtracting negative actions such as unlikes, unsaves, and deleted comments to reflect true interaction performance.
Views Integer The total number of times the media object has been displayed on users' screens, regardless of unique viewers, serving as a measure of total content exposure.

MediaInsightsPostAlbum

Offers comprehensive analytics for individual carousel album posts shared on Instagram. It includes metrics such as reach, engagement, and saves. To access this information, the application must have the instagram_basic and instagram_manage_insights OAuth scopes, which allow it to retrieve performance data for content posted by the user.

Select

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

  • 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 carousel album objects: TotalInteractions.

         SELECT * FROM MediaInsightsPostAlbum WHERE MediaId = 17945732813652602"
    
         SELECT TotalInteractions FROM MediaInsightsPostAlbum WHERE MediaId = 17945732813652602
    
Columns
Name Type Description
MediaId String The unique identifier assigned to each media insight record. This ID is used to link the insight data to a specific post within the album and ensures traceability across datasets.
TotalInteractions Integer The aggregate number of user engagement actions related to the album post, including likes, saves, comments, and shares. This total excludes negative actions such as unlikes, unsaves, and deleted comments to reflect net positive interaction.
Views Integer The cumulative count of how many times the album post was displayed to users. This metric includes repeated views by the same user and reflects overall visibility or exposure.

MediaInsightsReels

Compiles performance metrics specifically for Instagram Reels. It provides detailed insights, including the number of plays, likes, comments, saves, and shares. This analysis is designed to help you examine engagement trends over time for short-form video content. The required permissions for access are instagram_basic and instagram_manage_insights.

Select

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

  • Reach
  • Comments
  • Likes
  • Saved
  • Views
  • 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.

  • MediaInsightsReels will only return the result of reels object.

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

         SELECT * FROM MediaInsightsReels WHERE MediaId = 17905513811523370"
    
         SELECT Reach, Saved, Comments, Likes, Views, Shares, TotalInteractions FROM MediaInsightsReels WHERE MediaId = 17905513811523370
    
Columns
Name Type Description
MediaId String A unique string that identifies the specific Instagram media object (reel) associated with the insight record. Used as the primary reference key for analytics.
Reach Integer The total count of distinct Instagram accounts that viewed the reel at least once. This metric reflects the unique reach and exposure of the media.
Saved Integer The total count of unique Instagram accounts that bookmarked or saved the reel for later viewing is recorded. This metric indicates strong content relevance and a clear intent to revisit.
Comments Integer The total number of unique Instagram users who commented on the reel reflects user engagement. It also captures feedback through written responses.
Likes Integer The total number of unique Instagram accounts that liked the reel indicates positive sentiment. This metric also demonstrates the level of engagement from the audience.
Shares Integer The total number of unique accounts that shared the reel with others, either through direct messages or their own stories, indicates organic distribution and content amplification.
TotalInteractions Integer The total number of unique accounts that engaged with the reel through any combination of likes, comments, shares, or saves. Measures overall engagement volume.
Views Integer The total number of times the reel was viewed, regardless of whether the same user viewed it multiple times. This reflects total exposure including repeat views.
InstagramBusinessAccountId String The unique identifier of the Instagram business account that owns or published the reel. This is used to link media insights back to the originating business profile.

MediaInsightsStory

Provides performance insights for Instagram Stories, analyzing metrics such as reach, exits, replies, and taps forward/backward. This perspective allows for detailed analysis of temporary content and requires both the instagram_basic and instagram_manage_insights OAuth scopes for data access.

Select

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

  • Follows
  • ProfileActivity
  • ProfileVisits
  • Shares
  • TotalInteractions
  • TapsForward (only on version < 18.0)
  • TapsBack (only on version < 18.0)
  • Exits (only on version < 18.0)
  • Navigation (only on version >= 18.0)

The connector will use the Instagram APIs to process filters by a MediaId and will process filters on other columns client-side within itself. Please note that following the nature of Stories on Instagram, insights and metrics related to stories expire after 24 hours.

  • 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
Name Type Description
MediaId String A unique identifier representing the specific story media object for which the insight data is being collected. This ID can be used to link metrics back to the original content.
Views Integer The number of times the story was viewed across all users, counting each view regardless of whether it came from the same or different users.
Reach Integer The total count of unique Instagram accounts that viewed the story at least once. This metric helps gauge the breadth of audience exposure.
Follows Integer The number of new followers acquired as a direct result of viewing the story. This can indicate how compelling the story content was in converting viewers into followers.
ProfileActivity Integer The total number of actions users took on your profile after interacting with the story, such as visiting your profile, clicking links, or initiating messages.
ProfileVisits Integer The number of distinct visits to your Instagram profile that occurred after users viewed your story. It reflects how many viewers were motivated to explore your full profile.
Shares Integer The number of times the story content was shared by viewers through Instagram's share features. This value is currently misattributed and should not represent profile visits.
TotalInteractions Integer The aggregate count of user interactions with the story, including replies and shares. It is an indicator of how engaging the content was.
Navigation Integer The sum of navigational actions taken on the story, including exiting the story, tapping forward to the next story, or tapping back to the previous one. These behaviors reflect user engagement flow.

OnlineFollowers

Aggregates hourly breakdowns of when a user's Instagram followers are typically online, helping to identify the best posting times for maximum visibility and engagement. This requires the instagram_basic and instagram_manage_insights scopes to access follower activity patterns.

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
Name Type Description
InstagramBusinessAccountId String A unique string identifier assigned to each Instagram business account. This is used to retrieve or associate insight data with the correct business entity.
StartTime Datetime The precise timestamp indicating when the measurement period for online follower activity begins, typically used to define the lower bound of the insight window.
EndTime Datetime The exact timestamp that marks the end of the online follower activity measurement period, defining the upper limit of the analyzed time range.
Onlinefollowers Integer The recorded number of followers who were actively online during the defined insight interval. This value provides insight into follower engagement trends over 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.

Name Type Description
FromDateTime Datetime The earliest timestamp from which the underlying insight data is available or was first collected for this account. This is used to define the historical data boundary.
ToDateTime Datetime The most recent timestamp for which insight data has been collected for this account, indicating the most recent data available in the reporting period.

Pages

Retrieves detailed metadata about Facebook Pages that are linked to an Instagram Business account. The information includes the page name, category, verification status, and any connected Instagram profiles. To access this data, you need permissions from a custom OAuth app, including either pages_read_engagement or approval for Page Public Content Access or Page Public Metadata Access.

Table Specific Information
Select

For information on how to create a custom OAuth app, please see Creating a Custom OAuth App. Please refer to Instagram's latest documentation for information on how to get this view's requisite permissions for a custom OAuth app.

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.

For example:

SELECT * FROM Pages WHERE SearchTerms = 'facebook'
Columns
Name Type Description
Id [KEY] String A unique identifier assigned to the Facebook Page, used to distinguish it from other pages within the platform.
EligibleForBrandedContent Boolean Indicates whether the Facebook Page has been approved and meets all criteria to publish branded content, such as sponsored posts or paid partnerships.
IsUnclaimed Boolean Specifies whether the Facebook Page was automatically generated by Facebook and has not yet been officially claimed or managed by the associated business entity.
Link String The full Uniform Resource Locator (URL) hyperlink that directs users to the Facebook Page's public profile.
City String The city name extracted from the location information provided for the business associated with the Facebook Page.
Country String The country in which the business linked to the Facebook Page is physically located, based on its registered address.
Latitude Double The geographical latitude coordinate that pinpoints the exact location of the business represented by the Facebook Page.
Longitude Double The geographical longitude coordinate that defines the east-west position of the business associated with the Facebook Page.
State String The state, province, or administrative region listed as part of the physical address of the business linked to the Facebook Page.
Street String The street address component of the physical location of the business represented on the Facebook Page, typically including building number and street name.
Zip Integer The ZIP code used for mail delivery to the listed business location on the Facebook Page.
Name String The official or display name of the Facebook Page, which typically reflects the name of the associated business, organization, or entity.
VerificationStatus String Describes the current verification status of the Facebook Page, indicating whether the page has been authenticated by Facebook as a legitimate representation of 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.

Name Type Description
SearchTerms String A non-stored, computed value representing one or more keywords used to facilitate text-based searches on the Facebook Page dataset.

Permissions

Lists the specific permissions granted by a user to the application, such as access to media, insights, or account metadata. This information is useful for auditing user consent and ensuring that the app operates within its authorized scope.

Select

To query the Permissions view.

SELECT * FROM Permissions
Columns
Name Type Description
PermissionName [KEY] String The specific name of the permission being requested from the user or system, such as pages_show_list, ads_management, or instagram_basic. This field identifies the exact scope or feature access the application is attempting to obtain.
Status String Indicates the current state of the permission request, such as granted, declined, or expired. This value reflects whether the user has allowed or denied the permission or if it has been revoked.

Stories

Offers a filtered view of Instagram Story content linked to a specific account. It includes metadata such as timestamps, viewer counts, and interaction metrics. This view facilitates the extraction of insights and performance analysis for temporary story posts. To access this feature, both instagram_basic and instagram_manage_insights permissions are required.

Select

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

Columns
Name Type Description
Id [KEY] String A system-generated unique identifier for each Instagram story. This value is used to distinguish one story record from another within the dataset and can be used as a primary key when performing queries or joining related tables.
InstagramBusinessAccountId String A unique string identifier that links the story to a specific Instagram business account. This ID enables traceability of story performance and ownership back to the originating business profile, and is essential for cross-referencing business-specific content across datasets.

Tags

Provides a read-only interface to access hashtags and tagged media metadata, including related posts, captions, and tagging users. This view aids in analyzing user-generated tags and community trends and requires the instagram_basic and instagram_manage_comments permissions for access.

Select

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

Columns
Name Type Description
Id [KEY] String A system-generated unique identifier that represents an individual tag record within the database.
Username String The Instagram handle of the user who created the content associated with the tag. This is used to attribute content to the correct profile.
Caption String The full text caption accompanying the media, which can include hashtags, mentions, and descriptive text entered by the user.
ComentsCount Int The total number of comments submitted by other users on the media item associated with this tag.
LikeCount Int The total number of likes received by the media item, indicating engagement and popularity among viewers.
MediType String The type of media associated with the tag can be specified, with common values such as image or video.
MediUrl String The direct Uniform Resource Locator (URL) where the media asset (image or video) can be accessed. This URL typically points to a content delivery network.
UserId String The unique identifier for the user who owns or posted the media content, used internally for relational mapping.
Timestamp Datetime The exact date and time when the media was created or posted, represented in Coordinated Universal Time (UTC) to ensure consistency across time zones.
InstagramBusinessAccountId String The unique identifier assigned to the connected Instagram business account. This links the media to a specific business entity for analytics and reporting.

Stored Procedures

Stored procedures are function-like interfaces that extend the functionality of the connector beyond simple SELECT/INSERT/UPDATE/DELETE operations with Instagram.

Stored procedures accept a list of parameters, perform their intended function, and then return any relevant response data from Instagram, along with an indication of whether the procedure succeeded or failed.

Instagram Connector Stored Procedures

Name Description
GetOAuthAccessToken Fetches the OAuth Access Token, which is used to authenticate and authorize API calls made to Microsoft Entra ID.
GetOAuthAuthorizationURL Retrieves the OAuth Authorization URL, allowing the client to direct the user's browser to the authorization server and initiate the OAuth process.
RefreshOAuthAccessToken Refreshes an expired OAuth Access Token to maintain continuous authenticated access to Microsoft Entra ID resources without requiring reauthorization from the user.

GetOAuthAccessToken

Fetches the OAuth Access Token, which is used to authenticate and authorize API calls made to Microsoft Entra ID.

Input
Name Type Description
AuthMode String Specifies the authentication flow used to obtain the OAuth token. The valid values include APP for server-to-server communication and WEB for user-agent-based flows involving redirection to the Instagram login page.
Verifier String The one-time verification code returned by Instagram when using the Web authentication mode. It is required to exchange the authorization grant for an access token and must be passed exactly as received from the authorization redirect.
Scope String Defines the set of permissions the application is requesting access to. Each scope grants specific access to Instagram user data or functionality, such as reading media or posting comments.
CallbackUrl String The full URL where the user is redirected after granting or denying access. This must match the redirect URI configured in your Instagram app settings and is used to receive the authorization code or error message.
State String An opaque string value used to maintain state between the request and callback. It is returned as-is to the callback URL. This field can be used for correlating requests, directing users to specific resources post-login, or preventing cross-site request forgery attacks.
Result Set Columns
Name Type Description
OAuthAccessToken String The OAuth Access Token used to authenticate API requests with Microsoft Entra ID.
OAuthRefreshToken String The OAuth Refresh Token used to obtain a new access token when the current one expires.
ExpiresIn String Indicates the remaining lifetime of the access token in seconds. A value of -1 means the token does not expire.

GetOAuthAuthorizationURL

Retrieves the OAuth Authorization URL, allowing the client to direct the user's browser to the authorization server and initiate the OAuth process.

Input
Name Type Description
CallbackUrl String The fully qualified redirect URI to which Instagram will send the user after authorization is complete. This must match a value configured in your app's settings, and it typically handles the authorization code or access token exchange logic.
Scope String A space-separated list of permissions or scopes being requested from the user during authorization. For OAuthGrantType='CODE', these are user-facing scopes. For OAuthGrantType='CLIENT', use 'https://graph.microsoft.com/.default' to leverage preconfigured application permissions.
State String A unique string value to maintain state between your authorization request and the response. It is useful for preventing cross-site request forgery (CSRF) attacks and identifying user sessions.
Result Set Columns
Name Type Description
URL String The generated authorization URL that users can visit in their Web browser to authenticate and provide authorization to your application.

RefreshOAuthAccessToken

Refreshes an expired OAuth Access Token to maintain continuous authenticated access to Microsoft Entra ID resources without requiring reauthorization from the user.

Input
Name Type Description
OAuthRefreshToken String The OAuth Refresh Token obtained during the initial authorization, used to request a new access token when the original has expired.
Result Set Columns
Name Type Description
OAuthAccessToken String The newly issued OAuth Access Token from Microsoft Entra ID, required for authenticating subsequent API requests.
OAuthRefreshToken String The updated OAuth Refresh Token that can be used to renew the access token after it expires.
ExpiresIn String The duration, in seconds, until the newly issued access token expires.

System Tables

You can query the system tables described in this section to access schema information, information on data source functionality, and batch operation statistics.

Schema Tables

The following tables return database metadata for Instagram:

Data Source Tables

The following tables return information about how to connect to and query the data source:

  • sys_connection_props: Returns information on the available connection properties.
  • sys_sqlinfo: Describes the SELECT queries that the connector can offload to the data source.

Query Information Tables

The following table returns query statistics for data modification queries:

  • sys_identity: Returns information about batch operations or single updates.

sys_catalogs

Lists the available databases.

The following query retrieves all databases determined by the connection string:

SELECT * FROM sys_catalogs
Columns
Name Type Description
CatalogName String The database name.

sys_schemas

Lists the available schemas.

The following query retrieves all available schemas:

SELECT * FROM sys_schemas
Columns
Name Type Description
CatalogName String The database name.
SchemaName String The schema name.

sys_tables

Lists the available tables.

The following query retrieves the available tables and views:

SELECT * FROM sys_tables
Columns
Name Type Description
CatalogName String The database containing the table or view.
SchemaName String The schema containing the table or view.
TableName String The name of the table or view.
TableType String The table type (table or view).
Description String A description of the table or view.
IsUpdateable Boolean Whether the table can be updated.

sys_tablecolumns

Describes the columns of the available tables and views.

The following query returns the columns and data types for the Users table:

SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='Users'
Columns
Name Type Description
CatalogName String The name of the database containing the table or view.
SchemaName String The schema containing the table or view.
TableName String The name of the table or view containing the column.
ColumnName String The column name.
DataTypeName String The data type name.
DataType Int32 An integer indicating the data type. This value is determined at run time based on the environment.
Length Int32 The storage size of the column.
DisplaySize Int32 The designated column's normal maximum width in characters.
NumericPrecision Int32 The maximum number of digits in numeric data. The column length in characters for character and date-time data.
NumericScale Int32 The column scale or number of digits to the right of the decimal point.
IsNullable Boolean Whether the column can contain null.
Description String A brief description of the column.
Ordinal Int32 The sequence number of the column.
IsAutoIncrement String Whether the column value is assigned in fixed increments.
IsGeneratedColumn String Whether the column is generated.
IsHidden Boolean Whether the column is hidden.
IsArray Boolean Whether the column is an array.
IsReadOnly Boolean Whether the column is read-only.
IsKey Boolean Indicates whether a field returned from sys_tablecolumns is the primary key of the table.
ColumnType String The role or classification of the column in the schema. Possible values include SYSTEM, LINKEDCOLUMN, NAVIGATIONKEY, REFERENCECOLUMN, and NAVIGATIONPARENTCOLUMN.

sys_procedures

Lists the available stored procedures.

The following query retrieves the available stored procedures:

SELECT * FROM sys_procedures
Columns
Name Type Description
CatalogName String The database containing the stored procedure.
SchemaName String The schema containing the stored procedure.
ProcedureName String The name of the stored procedure.
Description String A description of the stored procedure.
ProcedureType String The type of the procedure, such as PROCEDURE or FUNCTION.

sys_procedureparameters

Describes stored procedure parameters.

The following query returns information about all of the input parameters for the Merge stored procedure:

SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'Merge' AND Direction = 1 OR Direction = 2

To include result set columns in addition to the parameters, set the IncludeResultColumns pseudo column to True:

SELECT * FROM sys_procedureparameters WHERE ProcedureName = 'Merge' AND IncludeResultColumns='True'
Columns
Name Type Description
CatalogName String The name of the database containing the stored procedure.
SchemaName String The name of the schema containing the stored procedure.
ProcedureName String The name of the stored procedure containing the parameter.
ColumnName String The name of the stored procedure parameter.
Direction Int32 An integer corresponding to the type of the parameter: input (1), input/output (2), or output(4). input/output type parameters can be both input and output parameters.
DataType Int32 An integer indicating the data type. This value is determined at run time based on the environment.
DataTypeName String The name of the data type.
NumericPrecision Int32 The maximum precision for numeric data. The column length in characters for character and date-time data.
Length Int32 The number of characters allowed for character data. The number of digits allowed for numeric data.
NumericScale Int32 The number of digits to the right of the decimal point in numeric data.
IsNullable Boolean Whether the parameter can contain null.
IsRequired Boolean Whether the parameter is required for execution of the procedure.
IsArray Boolean Whether the parameter is an array.
Description String The description of the parameter.
Ordinal Int32 The index of the parameter.
Values String The values you can set in this parameter are limited to those shown in this column. Possible values are comma-separated.
SupportsStreams Boolean Whether the parameter represents a file that you can pass as either a file path or a stream.
IsPath Boolean Whether the parameter is a target path for a schema creation operation.
Default String The value used for this parameter when no value is specified.
SpecificName String A label that, when multiple stored procedures have the same name, uniquely identifies each identically-named stored procedure. If there's only one procedure with a given name, its name is simply reflected here.
IsProvided Boolean Whether the procedure is added/implemented by , as opposed to being a native Instagram procedure.
Pseudo-Columns
Name Type Description
IncludeResultColumns Boolean Whether the output should include columns from the result set in addition to parameters. Defaults to False.

sys_keycolumns

Describes the primary and foreign keys.

The following query retrieves the primary key for the Users table:

SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='Users'
Columns
Name Type Description
CatalogName String The name of the database containing the key.
SchemaName String The name of the schema containing the key.
TableName String The name of the table containing the key.
ColumnName String The name of the key column.
IsKey Boolean Whether the column is a primary key in the table referenced in the TableName field.
IsForeignKey Boolean Whether the column is a foreign key referenced in the TableName field.
PrimaryKeyName String The name of the primary key.
ForeignKeyName String The name of the foreign key.
ReferencedCatalogName String The database containing the primary key.
ReferencedSchemaName String The schema containing the primary key.
ReferencedTableName String The table containing the primary key.
ReferencedColumnName String The column name of the primary key.

sys_foreignkeys

Describes the foreign keys.

The following query retrieves all foreign keys which refer to other tables:

SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
Columns
Name Type Description
CatalogName String The name of the database containing the key.
SchemaName String The name of the schema containing the key.
TableName String The name of the table containing the key.
ColumnName String The name of the key column.
PrimaryKeyName String The name of the primary key.
ForeignKeyName String The name of the foreign key.
ReferencedCatalogName String The database containing the primary key.
ReferencedSchemaName String The schema containing the primary key.
ReferencedTableName String The table containing the primary key.
ReferencedColumnName String The column name of the primary key.
ForeignKeyType String Designates whether the foreign key is an import (points to other tables) or export (referenced from other tables) key.

sys_primarykeys

Describes the primary keys.

The following query retrieves the primary keys from all tables and views:

SELECT * FROM sys_primarykeys
Columns
Name Type Description
CatalogName String The name of the database containing the key.
SchemaName String The name of the schema containing the key.
TableName String The name of the table containing the key.
ColumnName String The name of the key column.
KeySeq String The sequence number of the primary key.
KeyName String The name of the primary key.

sys_indexes

Describes the available indexes. By filtering on indexes, you can write more selective queries with faster query response times.

The following query retrieves all indexes that are not primary keys:

SELECT * FROM sys_indexes WHERE IsPrimary='false'
Columns
Name Type Description
CatalogName String The name of the database containing the index.
SchemaName String The name of the schema containing the index.
TableName String The name of the table containing the index.
IndexName String The index name.
ColumnName String The name of the column associated with the index.
IsUnique Boolean True if the index is unique. False otherwise.
IsPrimary Boolean True if the index is a primary key. False otherwise.
Type Int16 An integer value corresponding to the index type: statistic (0), clustered (1), hashed (2), or other (3).
SortOrder String The sort order: A for ascending or D for descending.
OrdinalPosition Int16 The sequence number of the column in the index.

sys_connection_props

Returns information on the available connection properties and those set in the connection string.

The following query retrieves all connection properties that have been set in the connection string or set through a default value:

SELECT * FROM sys_connection_props WHERE Value <> ''
Columns
Name Type Description
Name String The name of the connection property.
ShortDescription String A brief description.
Type String The data type of the connection property.
Default String The default value if one is not explicitly set.
Values String A comma-separated list of possible values. A validation error is thrown if another value is specified.
Value String The value you set or a preconfigured default.
Required Boolean Whether the property is required to connect.
Category String The category of the connection property.
IsSessionProperty String Whether the property is a session property, used to save information about the current connection.
Sensitivity String The sensitivity level of the property. This informs whether the property is obfuscated in logging and authentication forms.
PropertyName String A camel-cased truncated form of the connection property name.
Ordinal Int32 The index of the parameter.
CatOrdinal Int32 The index of the parameter category.
Hierarchy String Shows dependent properties associated that need to be set alongside this one.
Visible Boolean Informs whether the property is visible in the connection UI.
ETC String Various miscellaneous information about the property.

sys_sqlinfo

Describes the SELECT query processing that the connector can offload to the data source.

Discovering the Data Source's SELECT Capabilities

Below is an example data set of SQL capabilities. Some aspects of SELECT functionality are returned in a comma-separated list if supported; otherwise, the column contains NO.

Name Description Possible Values
AGGREGATE_FUNCTIONS Supported aggregation functions. AVG, COUNT, MAX, MIN, SUM, DISTINCT
COUNT Whether COUNT function is supported. YES, NO
IDENTIFIER_QUOTE_OPEN_CHAR The opening character used to escape an identifier. [
IDENTIFIER_QUOTE_CLOSE_CHAR The closing character used to escape an identifier. ]
SUPPORTED_OPERATORS A list of supported SQL operators. =, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR
GROUP_BY Whether GROUP BY is supported, and, if so, the degree of support. NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE
STRING_FUNCTIONS Supported string functions. LENGTH, CHAR, LOCATE, REPLACE, SUBSTRING, RTRIM, LTRIM, RIGHT, LEFT, UCASE, SPACE, SOUNDEX, LCASE, CONCAT, ASCII, REPEAT, OCTET, BIT, POSITION, INSERT, TRIM, UPPER, REGEXP, LOWER, DIFFERENCE, CHARACTER, SUBSTR, STR, REVERSE, PLAN, UUIDTOSTR, TRANSLATE, TRAILING, TO, STUFF, STRTOUUID, STRING, SPLIT, SORTKEY, SIMILAR, REPLICATE, PATINDEX, LPAD, LEN, LEADING, KEY, INSTR, INSERTSTR, HTML, GRAPHICAL, CONVERT, COLLATION, CHARINDEX, BYTE
NUMERIC_FUNCTIONS Supported numeric functions. ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, COT, EXP, FLOOR, LOG, MOD, SIGN, SIN, SQRT, TAN, PI, RAND, DEGREES, LOG10, POWER, RADIANS, ROUND, TRUNCATE
TIMEDATE_FUNCTIONS Supported date/time functions. NOW, CURDATE, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, CURTIME, HOUR, MINUTE, SECOND, TIMESTAMPADD, TIMESTAMPDIFF, DAYNAME, MONTHNAME, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, EXTRACT
REPLICATION_SKIP_TABLES Indicates tables skipped during replication.
REPLICATION_TIMECHECK_COLUMNS A string array containing a list of columns which will be used to check for (in the given order) to use as a modified column during replication.
IDENTIFIER_PATTERN String value indicating what string is valid for an identifier.
SUPPORT_TRANSACTION Indicates if the provider supports transactions such as commit and rollback. YES, NO
DIALECT Indicates the SQL dialect to use.
KEY_PROPERTIES Indicates the properties which identify the uniform database.
SUPPORTS_MULTIPLE_SCHEMAS Indicates if multiple schemas may exist for the provider. YES, NO
SUPPORTS_MULTIPLE_CATALOGS Indicates if multiple catalogs may exist for the provider. YES, NO
DATASYNCVERSION The Data Sync version needed to access this driver. Standard, Starter, Professional, Enterprise
DATASYNCCATEGORY The Data Sync category of this driver. Source, Destination, Cloud Destination
SUPPORTSENHANCEDSQL Whether enhanced SQL functionality beyond what is offered by the API is supported. TRUE, FALSE
SUPPORTS_BATCH_OPERATIONS Whether batch operations are supported. YES, NO
SQL_CAP All supported SQL capabilities for this driver. SELECT, INSERT, DELETE, UPDATE, TRANSACTIONS, ORDERBY, OAUTH, ASSIGNEDID, LIMIT, LIKE, BULKINSERT, COUNT, BULKDELETE, BULKUPDATE, GROUPBY, HAVING, AGGS, OFFSET, REPLICATE, COUNTDISTINCT, JOINS, DROP, CREATE, DISTINCT, INNERJOINS, SUBQUERIES, ALTER, MULTIPLESCHEMAS, GROUPBYNORELATION, OUTERJOINS, UNIONALL, UNION, UPSERT, GETDELETED, CROSSJOINS, GROUPBYCOLLATE, MULTIPLECATS, FULLOUTERJOIN, MERGE, JSONEXTRACT, BULKUPSERT, SUM, SUBQUERIESFULL, MIN, MAX, JOINSFULL, XMLEXTRACT, AVG, MULTISTATEMENTS, FOREIGNKEYS, CASE, LEFTJOINS, COMMAJOINS, WITH, LITERALS, RENAME, NESTEDTABLES, EXECUTE, BATCH, BASIC, INDEX
PREFERRED_CACHE_OPTIONS A string value specifies the preferred cacheOptions.
ENABLE_EF_ADVANCED_QUERY Indicates if the driver directly supports advanced queries coming from Entity Framework. If not, queries will be handled client side. YES, NO
PSEUDO_COLUMNS A string array indicating the available pseudo columns.
MERGE_ALWAYS If the value is true, The Merge Mode is forcibly executed in Data Sync. TRUE, FALSE
REPLICATION_MIN_DATE_QUERY A select query to return the replicate start datetime.
REPLICATION_MIN_FUNCTION Allows a provider to specify the formula name to use for executing a server side min.
REPLICATION_START_DATE Allows a provider to specify a replicate startdate.
REPLICATION_MAX_DATE_QUERY A select query to return the replicate end datetime.
REPLICATION_MAX_FUNCTION Allows a provider to specify the formula name to use for executing a server side max.
IGNORE_INTERVALS_ON_INITIAL_REPLICATE A list of tables which will skip dividing the replicate into chunks on the initial replicate.
CHECKCACHE_USE_PARENTID Indicates whether the CheckCache statement should be done against the parent key column. TRUE, FALSE
CREATE_SCHEMA_PROCEDURES Indicates stored procedures that can be used for generating schema files.

The following query retrieves the operators that can be used in the WHERE clause:

SELECT * FROM sys_sqlinfo WHERE Name = 'SUPPORTED_OPERATORS'

Note that individual tables may have different limitations or requirements on the WHERE clause; refer to the Data Model section for more information.

Columns
Name Type Description
NAME String A component of SQL syntax, or a capability that can be processed on the server.
VALUE String Detail on the supported SQL or SQL syntax.

sys_identity

Returns information about attempted modifications.

The following query retrieves the Ids of the modified rows in a batch operation:

SELECT * FROM sys_identity
Columns
Name Type Description
Id String The database-generated ID returned from a data modification operation.
Batch String An identifier for the batch. 1 for a single operation.
Operation String The result of the operation in the batch: INSERTED, UPDATED, or DELETED.
Message String SUCCESS or an error message if the update in the batch failed.

sys_information

Describes the available system information.

The following query retrieves all columns:

SELECT * FROM sys_information
Columns
Name Type Description
Product String The name of the product.
Version String The version number of the product.
Datasource String The name of the datasource the product connects to.
NodeId String The unique identifier of the machine where the product is installed.
HelpURL String The URL to the product's help documentation.
License String The license information for the product. (If this information is not available, the field may be left blank or marked as 'N/A'.)
Location String The file path location where the product's library is stored.
Environment String The version of the environment or rumtine the product is currently running under.
DataSyncVersion String The tier of Sync required to use this connector.
DataSyncCategory String The category of Sync functionality (e.g., Source, Destination).

Advanced Configurations Properties

The advanced configurations properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure. Click the links for further details.

Authentication

Property Description
BusinessAccountId A unique identifier, or Id, is assigned to connect with an Instagram business account. This ID serves as a key to access and manage your account.
Version Specifies the version of the Instagram Graph API.
AuthenticateAsPage Specifies the authentication for page access tokens when making requests to Instagram. Respond with true or false.

OAuth

Property Description
InitiateOAuth Specifies the process for obtaining or refreshing the OAuth access token, which maintains user access while an authenticated, authorized user is working.
OAuthClientId Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication.
OAuthClientSecret Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server.
OAuthAccessToken Specifies the OAuth access token used to authenticate requests to the data source. This token is issued by the authorization server after a successful OAuth exchange.
OAuthSettingsLocation Specifies the location of the settings file where OAuth values are saved. Storing OAuth settings in a central location avoids the need for users to enter OAuth connection properties manually each time they log in. It also enables credentials to be shared across connections or processes.
CallbackURL Identifies the URL users return to after authenticating to Instagram via OAuth. (Custom OAuth applications only.).
OAuthVerifier Specifies a verifier code returned from the OAuthAuthorizationURL. Used when authenticating to OAuth on a headless server, where a browser can't be launched. Requires both OAuthSettingsLocation and OAuthVerifier to be set.
OAuthRefreshToken Specifies the OAuth refresh token used to request a new access token after the original has expired.
OAuthExpiresIn Specifies the duration in seconds, of an OAuth Access Token's lifetime. The token can be reissued to keep access alive as long as the user keeps working.
OAuthTokenTimestamp Displays a Unix epoch timestamp in milliseconds that shows how long ago the current Access Token was created.

SSL

Property Description
SSLServerCert Specifies the certificate to be accepted from the server when connecting using TLS/SSL.

Schema

Property Description
Location Specifies the location of a directory containing schema files that define tables, views, and stored procedures. Depending on your service's requirements, this may be expressed as either an absolute path or a relative path.
BrowsableSchemas Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA, SchemaB, SchemaC.
Tables Optional setting that restricts the tables reported to a subset of all available tables. For example, Tables=TableA, TableB, TableC.
Views Optional setting that restricts the views reported to a subset of the available tables. For example, Views=ViewA, ViewB, ViewC.

Miscellaneous

Property Description
MaxRows Specifies the maximum rows returned for queries without aggregation or GROUP BY.
Other Specifies additional hidden properties for specific use cases. These are not required for typical provider functionality. Use a semicolon-separated list to define multiple properties.
Pagesize The maximum number of records per page the provider returns when requesting data from Instagram.
PseudoColumns Specifies the pseudocolumns to expose as table columns. Use the format 'TableName=ColumnName;TableName=ColumnName'. The default is an empty string, which disables this property.
Timeout Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. The default is 60 seconds. Set to 0 to disable the timeout.
UserDefinedViews Specifies a filepath to a JSON configuration file defining custom views. The provider automatically detects and uses the views specified in this file.

Authentication

This section provides a complete list of authentication properties you can configure.

Property Description
BusinessAccountId A unique identifier, or Id, is assigned to connect with an Instagram business account. This ID serves as a key to access and manage your account.
Version Specifies the version of the Instagram Graph API.
AuthenticateAsPage Specifies the authentication for page access tokens when making requests to Instagram. Respond with true or false.

BusinessAccountId

A unique identifier, or Id, is assigned to connect with an Instagram business account. This ID serves as a key to access and manage your account.

Data Type

string

Default Value

""

Remarks

This ID is associated with an Instagram business account linked to a specific Facebook page. Set this property if you have multiple Instagram business accounts with the same Facebook profile.

This property acts as a bridge between your Instagram profile and external applications or services.

Version

Specifies the version of the Instagram Graph API.

Data Type

string

Default Value

20.0

Remarks

The Version property is primarily used to specify the version of the Instagram Graph API that an application or service will use to access Instagrams's data. Typically, this property does not need to be set. If it is not set, the default version of the API will be used.

AuthenticateAsPage

Specifies the authentication for page access tokens when making requests to Instagram. Respond with true or false.

Data Type

bool

Default Value

false

Remarks

Accessing a page requires proving identity. To authenticate for page access tokens, a true or false value is required. The page must be managed by the user who is authenticated.

AuthenticateAsPage is essential for securing access and ensuring that only authorized users can use it.

OAuth

This section provides a complete list of OAuth properties you can configure.

Property Description
InitiateOAuth Specifies the process for obtaining or refreshing the OAuth access token, which maintains user access while an authenticated, authorized user is working.
OAuthClientId Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication.
OAuthClientSecret Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server.
OAuthAccessToken Specifies the OAuth access token used to authenticate requests to the data source. This token is issued by the authorization server after a successful OAuth exchange.
OAuthSettingsLocation Specifies the location of the settings file where OAuth values are saved. Storing OAuth settings in a central location avoids the need for users to enter OAuth connection properties manually each time they log in. It also enables credentials to be shared across connections or processes.
CallbackURL Identifies the URL users return to after authenticating to Instagram via OAuth. (Custom OAuth applications only.).
OAuthVerifier Specifies a verifier code returned from the OAuthAuthorizationURL. Used when authenticating to OAuth on a headless server, where a browser can't be launched. Requires both OAuthSettingsLocation and OAuthVerifier to be set.
OAuthRefreshToken Specifies the OAuth refresh token used to request a new access token after the original has expired.
OAuthExpiresIn Specifies the duration in seconds, of an OAuth Access Token's lifetime. The token can be reissued to keep access alive as long as the user keeps working.
OAuthTokenTimestamp Displays a Unix epoch timestamp in milliseconds that shows how long ago the current Access Token was created.

InitiateOAuth

Specifies the process for obtaining or refreshing the OAuth access token, which maintains user access while an authenticated, authorized user is working.

Possible Values

OFF, REFRESH, GETANDREFRESH

Data Type

string

Default Value

OFF

Remarks

OAuth is an authorization framework that enables applications to obtain limited access to user accounts on an HTTP service. The OAuth flow defines the method to be used for logging in users, exchanging their credentials for an OAuth access token to be used for authentication, and providing limited access to applications.

Instagram supports the following options for initiating OAuth access:

  1. OFF: No automatic OAuth flow initiation. The OAuth flow is handled entirely by the user, who will take action to obtain their OAuthAccessToken. Note that with this setting the user must refresh the token manually and reconnect with an updated OAuthAccessToken property when the current token expires.
  2. GETANDREFRESH: The OAuth flow is handled entirely by the connector. If a token already exists, it is refreshed when necessary. If no token currently exists, it will be obtained by prompting the user to login.
  3. REFRESH: The user handles obtaining the OAuth Access Token and sets up the sequence for refreshing the OAuth Access Token. (The user is never prompted to log in to authenticate. After the user logs in, the connector handles the refresh of the OAuth Access Token.

OAuthClientId

Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication.

Data Type

string

Default Value

""

Remarks

This property is required when using a custom OAuth application, such as in web-based authentication flows, service-based authentication, or certificate-based flows that require application registration. It is also required if an embedded OAuth application is not available for the driver. When an embedded OAuth application is available, this value may already be provided by the connector and not require manual entry.

This value is generally used alongside other OAuth-related properties such as OAuthClientSecret and OAuthSettingsLocation when configuring an authenticated connection.

OAuthClientId is one of the key connection parameters that need to be set before users can authenticate via OAuth. You can typically find this value in your identity provider’s application registration settings. Look for a field labeled Client ID, Application ID, or Consumer Key.

While the client ID is not considered a confidential value like a client secret, it is still part of your application's identity and should be handled carefully. Avoid exposing it in public repositories or shared configuration files.

OAuthClientSecret

Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server.

Data Type

string

Default Value

""

Remarks

This property is required when using a custom OAuth application in any flow that requires secure client authentication, such as web-based OAuth, service-based connections, or certificate-based authorization flows. It is not required when using an embedded OAuth application.

The client secret is used during the token exchange step of the OAuth flow, when the driver requests an access token from the authorization server. If this value is missing or incorrect, authentication will fail, and the server may return an invalid_client or unauthorized_client error.

OAuthClientSecret is one of the key connection parameters that need to be set before users can authenticate via OAuth. You can obtain this value from your identity provider when registering the OAuth application. It may be referred to as the client secret, application secret, or consumer secret.

This value should be stored securely and never exposed in public repositories, scripts, or unsecured environments. Client secrets may also expire after a set period. Be sure to monitor expiration dates and rotate secrets as needed to maintain uninterrupted access.

OAuthAccessToken

Specifies the OAuth access token used to authenticate requests to the data source. This token is issued by the authorization server after a successful OAuth exchange.

Data Type

string

Default Value

""

Remarks

The OAuthAccessToken is a temporary credential that authorizes access to protected resources. It is typically returned by the identity provider after the user or client application completes an OAuth authentication flow. This property is most commonly used in automated workflows or custom OAuth implementations where you want to manage token handling outside of the driver.

The OAuth access token has a server-dependent timeout, limiting user access. This is set using the OAuthExpiresIn property. However, it can be reissued between requests to keep access alive as long as the user keeps working.

If InitiateOAuth is set to REFRESH, we recommend that you also set both OAuthExpiresIn and OAuthTokenTimestamp. The connector uses these properties to determine when the token expires so it can refresh most efficiently. If OAuthExpiresIn and OAuthTokenTimestamp are not specified, the connector refreshes the token immediately.

Access tokens should be treated as sensitive credentials and stored securely. Avoid exposing them in logs, scripts, or configuration files that are not access-controlled.

OAuthSettingsLocation

Specifies the location of the settings file where OAuth values are saved. Storing OAuth settings in a central location avoids the need for users to enter OAuth connection properties manually each time they log in. It also enables credentials to be shared across connections or processes.

Data Type

string

Default Value

%APPDATA%\Instagram Data Provider\OAuthSettings.txt

Remarks

You can store OAuth values in a central file for shared access to those values, in either of the following ways:

  • Set InitiateOAuth to either GETANDREFRESH or REFRESH and specify a filepath to the OAuth settings file.
  • Use memory storage to load the credentials into static memory.

The following sections provide more detail on each of these methods.

Specifying the OAuthSettingsLocation Filepath

The default OAuth setting location is %APPDATA%\Instagram Data Provider\OAuthSettings.txt, with %APPDATA% set to the user's configuration directory.

Default values vary, depending on the user's operating system.

  • Windows (ODBC and Power BI): registry://%DSN%
  • Windows: %APPDATA%Instagram Data Provider\OAuthSettings.txt
  • Mac: %APPDATA%//Instagram Data Provider/OAuthSettings.txt
  • Linux: %APPDATA%//Instagram Data Provider/OAuthSettings.txt
Loading Credentials Via Memory Storage

Memory locations are specified by using a value starting with memory://, followed by a unique identifier for that set of credentials (for example, memory://user1). The identifier can be anything you choose, but it should be unique to the user.

Unlike file-based storage, where credentials persist across connections, memory storage loads the credentials into static memory and the credentials are shared between connections using the same identifier for the life of the process. To persist credentials outside the current process, you must manually store the credentials prior to closing the connection. This enables you to set them in the connection when the process is started again.

To retrieve OAuth property values, query the sys_connection_props system table. If there are multiple connections using the same credentials, the properties are read from the previously closed connection.

Supported Storage Types

  • memory://: Stores OAuth tokens in-memory (unique identifier, shared within same process, etc.)
  • registry://: Only supported in the Windows ODBC and Power BI editions. Stores OAuth tokens in the registry under the DSN settings. Must end in a DSN name like registry://Instagram connector Data Source, or registry://%DSN%.
  • %DSN%: The name of the DSN you are connecting with.
  • Default (no prefix): Stores OAuth tokens within files. The value can be either an absolute path, or a path starting with %APPDATA% or %PROGRAMFILES%.

CallbackURL

Identifies the URL users return to after authenticating to Instagram via OAuth. (Custom OAuth applications only.).

Data Type

string

Default Value

""

Remarks

If you created a custom OAuth application, the OAuth authorization server redirects the user to this URL during the authentication process. This value must match the callback URL you specified when you Configured the custom OAuth application.

OAuthVerifier

Specifies a verifier code returned from the OAuthAuthorizationURL. Used when authenticating to OAuth on a headless server, where a browser can't be launched. Requires both OAuthSettingsLocation and OAuthVerifier to be set.

Data Type

string

Default Value

""

OAuthRefreshToken

Specifies the OAuth refresh token used to request a new access token after the original has expired.

Data Type

string

Default Value

""

Remarks

The refresh token is used to obtain a new access token when the current one expires. It enables seamless authentication for long-running or automated workflows without requiring the user to log in again. This property is especially important in headless, CI/CD, or server-based environments where interactive authentication is not possible.

The refresh token is typically obtained during the initial OAuth exchange by calling the GetOAuthAccessToken stored procedure. After that, it can be set using this property to enable automatic token refresh, or passed to the RefreshOAuthAccessToken stored procedure if you prefer to manage the refresh manually.

When InitiateOAuth is set to REFRESH, the driver uses this token to retrieve a new access token automatically. After the first refresh, the driver saves updated tokens in the location defined by OAuthSettingsLocation, and uses those values for subsequent connections.

The OAuthRefreshToken should be handled securely and stored in a trusted location. Like access tokens, refresh tokens can expire or be revoked depending on the identity provider’s policies.

OAuthExpiresIn

Specifies the duration in seconds, of an OAuth Access Token's lifetime. The token can be reissued to keep access alive as long as the user keeps working.

Data Type

string

Default Value

""

Remarks

The OAuth Access Token is assigned to an authenticated user, granting that user access to the network for a specified period of time. The access token is used in place of the user's login ID and password, which stay on the server.

An access token created by the server is only valid for a limited time. OAuthExpiresIn is the number of seconds the token is valid from when it was created. For example, a token generated at 2024-01-29 20:00:00 UTC that expires at 2024-01-29 21:00:00 UTC (an hour later) would have an OAuthExpiresIn value of 3600, no matter what the current time is.

To determine how long the user has before the Access Token will expire, use OAuthTokenTimestamp.

OAuthTokenTimestamp

Displays a Unix epoch timestamp in milliseconds that shows how long ago the current Access Token was created.

Data Type

string

Default Value

""

Remarks

The OAuth Access Token is assigned to an authenticated user, granting that user access to the network for a specified period of time. The access token is used in place of the user's login ID and password, which stay on the server.

An access token created by the server is only valid for a limited time. OAuthTokenTimestamp is the Unix timestamp when the server created the token. For example, OAuthTokenTimestamp=1706558400 indicates the OAuthAccessToken was generated by the server at 2024-01-29 20:00:00 UTC.

SSL

This section provides a complete list of SSL properties you can configure.

Property Description
SSLServerCert Specifies the certificate to be accepted from the server when connecting using TLS/SSL.

SSLServerCert

Specifies the certificate to be accepted from the server when connecting using TLS/SSL.

Data Type

string

Default Value

""

Remarks

If using a TLS/SSL connection, this property can be used to specify the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected.

This property can take the following forms:

Description Example
A full PEM Certificate (example shortened for brevity) -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE-----
A path to a local file containing the certificate C:\\cert.cer
The public key (example shortened for brevity) -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY-----
The MD5 Thumbprint (hex values can also be either space or colon separated) ecadbdda5a1529c58a1e9e09828d70e4
The SHA1 Thumbprint (hex values can also be either space or colon separated) 34a929226ae0819f2ec14b4a3d904f801cbb150d

If not specified, any certificate trusted by the machine is accepted.

Certificates are validated as trusted by the machine based on the System's trust store. The trust store used is the 'javax.net.ssl.trustStore' value specified for the system. If no value is specified for this property, Java's default trust store is used (for example, JAVA_HOME\lib\security\cacerts).

Use '*' to signify to accept all certificates. Note that this is not recommended due to security concerns.

Schema

This section provides a complete list of schema properties you can configure.

Property Description
Location Specifies the location of a directory containing schema files that define tables, views, and stored procedures. Depending on your service's requirements, this may be expressed as either an absolute path or a relative path.
BrowsableSchemas Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA, SchemaB, SchemaC.
Tables Optional setting that restricts the tables reported to a subset of all available tables. For example, Tables=TableA, TableB, TableC.
Views Optional setting that restricts the views reported to a subset of the available tables. For example, Views=ViewA, ViewB, ViewC.

Location

Specifies the location of a directory containing schema files that define tables, views, and stored procedures. Depending on your service's requirements, this may be expressed as either an absolute path or a relative path.

Data Type

string

Default Value

%APPDATA%\Instagram Data Provider\Schema

Remarks

The Location property is only needed if you want to either customize definitions (for example, change a column name, ignore a column, etc.) or extend the data model with new tables, views, or stored procedures.

If left unspecified, the default location is %APPDATA%\Instagram Data Provider\Schema, where %APPDATA% is set to the user's configuration directory:

Platform %APPDATA%
Windows The value of the APPDATA environment variable
Mac ~/Library/Application Support
Linux ~/.config

BrowsableSchemas

Optional setting that restricts the schemas reported to a subset of all available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.

Data Type

string

Default Value

""

Remarks

Listing all available database schemas can take extra time, thus degrading performance. Providing a list of schemas in the connection string saves time and improves performance.

Tables

Optional setting that restricts the tables reported to a subset of all available tables. For example, Tables=TableA,TableB,TableC.

Data Type

string

Default Value

""

Remarks

Listing all available tables from some databases can take extra time, thus degrading performance. Providing a list of tables in the connection string saves time and improves performance.

If there are lots of tables available and you already know which ones you want to work with, you can use this property to restrict your viewing to only those tables. To do this, specify the tables you want in a comma-separated list. Each table should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Tables=TableA,[TableB/WithSlash],WithCatalog.WithSchema.`TableC With Space`.

Note

If you are connecting to a data source with multiple schemas or catalogs, you must specify each table you want to view by its fully qualified name. This avoids ambiguity between tables that may exist in multiple catalogs or schemas.

Views

Optional setting that restricts the views reported to a subset of the available tables. For example, Views=ViewA,ViewB,ViewC.

Data Type

string

Default Value

""

Remarks

Listing all available views from some databases can take extra time, thus degrading performance. Providing a list of views in the connection string saves time and improves performance.

If there are lots of views available and you already know which ones you want to work with, you can use this property to restrict your viewing to only those views. To do this, specify the views you want in a comma-separated list. Each view should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Views=ViewA,[ViewB/WithSlash],WithCatalog.WithSchema.`ViewC With Space`.

Note

If you are connecting to a data source with multiple schemas or catalogs, you must specify each view you want to examine by its fully qualified name. This avoids ambiguity between views that may exist in multiple catalogs or schemas.

Miscellaneous

This section provides a complete list of miscellaneous properties you can configure.

Property Description
MaxRows Specifies the maximum rows returned for queries without aggregation or GROUP BY.
Other Specifies additional hidden properties for specific use cases. These are not required for typical provider functionality. Use a semicolon-separated list to define multiple properties.
Pagesize The maximum number of records per page the provider returns when requesting data from Instagram.
PseudoColumns Specifies the pseudocolumns to expose as table columns. Use the format 'TableName=ColumnName;TableName=ColumnName'. The default is an empty string, which disables this property.
Timeout Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. The default is 60 seconds. Set to 0 to disable the timeout.
UserDefinedViews Specifies a filepath to a JSON configuration file defining custom views. The provider automatically detects and uses the views specified in this file.

MaxRows

Specifies the maximum rows returned for queries without aggregation or GROUP BY.

Data Type

int

Default Value

-1

Remarks

This property sets an upper limit on the number of rows the connector returns for queries that do not include aggregation or GROUP BY clauses. This limit ensures that queries do not return excessively large result sets by default.

When a query includes a LIMIT clause, the value specified in the query takes precedence over the MaxRows setting. If MaxRows is set to "-1", no row limit is enforced unless a LIMIT clause is explicitly included in the query.

This property is useful for optimizing performance and preventing excessive resource consumption when executing queries that could otherwise return very large datasets.

Other

Specifies additional hidden properties for specific use cases. These are not required for typical provider functionality. Use a semicolon-separated list to define multiple properties.

Data Type

string

Default Value

""

Remarks

This property allows advanced users to configure hidden properties for specialized scenarios. These settings are not required for normal use cases but can address unique requirements or provide additional functionality. Multiple properties can be defined in a semicolon-separated list.

Note

It is strongly recommended to set these properties only when advised by the support team to address specific scenarios or issues.

Specify multiple properties in a semicolon-separated list.

Integration and Formatting
Property Description
DefaultColumnSize Sets the default length of string fields when the data source does not provide column length in the metadata. The default value is 2000.
ConvertDateTimeToGMT=True Converts date-time values to GMT, instead of the local time of the machine. The default value is False (use local time).
RecordToFile=filename Records the underlying socket data transfer to the specified file.

Pagesize

The maximum number of records per page the provider returns when requesting data from Instagram.

Data Type

int

Default Value

0

Remarks

When processing a query, instead of requesting all of the queried data at once from Instagram, the connector can request the queried data in pieces called pages.

This connection property determines the maximum number of results that the connector requests per page.

Note that setting large page sizes may improve overall query execution time, but doing so causes the connector to use more memory when executing queries and risks triggering a timeout.

PseudoColumns

Specifies the pseudocolumns to expose as table columns. Use the format 'TableName=ColumnName;TableName=ColumnName'. The default is an empty string, which disables this property.

Data Type

string

Default Value

""

Remarks

This property allows you to define which pseudocolumns the connector exposes as table columns.

To specify individual pseudocolumns, use the following format: "Table1=Column1;Table1=Column2;Table2=Column3"

To include all pseudocolumns for all tables use: "*=*"

Timeout

Specifies the maximum time, in seconds, that the provider waits for a server response before throwing a timeout error. The default is 60 seconds. Set to 0 to disable the timeout.

Data Type

int

Default Value

60

Remarks

This property controls the maximum time, in seconds, that the connector waits for an operation to complete before canceling it. If the timeout period expires before the operation finishes, the connector cancels the operation and throws an exception.

The timeout applies to each individual communication with the server rather than the entire query or operation. For example, a query could continue running beyond the timeout value if each paging call completes within the timeout limit.

Setting this property to 0 disables the timeout, allowing operations to run indefinitely until they succeed or fail due to other conditions such as server-side timeouts, network interruptions, or resource limits on the server. Use this property cautiously to avoid long-running operations that could degrade performance or result in unresponsive behavior.

UserDefinedViews

Specifies a filepath to a JSON configuration file defining custom views. The provider automatically detects and uses the views specified in this file.

Data Type

string

Default Value

""

Remarks

This property allows you to define and manage custom views through a JSON-formatted configuration file called UserDefinedViews.json. These views are automatically recognized by the connector and enable you to execute custom SQL queries as if they were standard database views. The JSON file defines each view as a root element with a child element called "query", which contains the SQL query for the view. For example:

{
    "MyView": {
        "query": "SELECT * FROM Users WHERE MyColumn = 'value'"
    },
    "MyView2": {
        "query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)"
    }

}

You can define multiple views in a single file and specify the filepath using this property. For example: UserDefinedViews=C:\Path\To\UserDefinedViews.json. When you use this property, only the specified views are seen by the connector.

Refer to User Defined Views for more information.