Skip to main content

Instagram Data Source

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow, DB-CDC, Spark ETL, or Replication data flow that ingests data from an Instagram location.
insta_api.png

Instagram

Follow the instructions below to create a new data flow that ingests data from an Instagram source in Nexla.

Create a New Data Flow

  1. To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Then, select the desired flow type from the list, and click the Create button.

  2. Select the Instagram connector tile from the list of available connectors. Then, select the credential that will be used to connect to the Instagram account, and click Next; or, create a new Instagram credential for use in this flow.

  3. In Nexla, Instagram data sources can be created using pre-built endpoint templates, which expedite source setup for common Instagram endpoints. Each template is designed specifically for the corresponding Instagram endpoint, making source configuration easy and efficient.
    • To configure this source using a template, follow the instructions in Configure Using a Template.

    Instagram sources can also be configured manually, allowing you to ingest data from Instagram endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this source manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Instagram endpoints. Each template is designed specifically for the corresponding Instagram endpoint, making data source setup easy and efficient.

Endpoint Settings

  • Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your data source for this endpoint.

    Fetch User Informationm

    Fetch basic information about the instagram business account. See Instagram documentation for available fields

    • Enter the Instagram User ID in the Instagram User ID field. This is the unique identifier for the Instagram Business account you want to fetch information for. The default value is 17841435346882875 if not specified.
    • Select or enter the user attributes you want to fetch in the User Attributes to Fetch field. Available fields include id, username, biography, followers_count, website, and more. You can select multiple fields. The default value is id,username,biography,followers_count,website if not specified. Click on the documentation link to view all available fields.
    • The endpoint uses GET requests to https://graph.facebook.com/{user_id}?fields={fields} where {user_id} is the Instagram User ID you provide and {fields} is the comma-separated list of User Attributes to Fetch you provide. The endpoint URL is automatically constructed based on the Instagram Graph API base URL and all the parameters.
    • The endpoint does not use pagination (iteration.type: static.url) and returns a single response. The response data path is $, which extracts the entire response object.

    This endpoint retrieves basic information about an Instagram Business account. The endpoint allows you to specify which user attributes you want to fetch, giving you control over the data returned. Available fields include account information such as ID, username, biography, follower count, website, and more. The endpoint does not use pagination and returns a single response with the requested user information. For detailed information about available fields and the API response format, see the Instagram API documentation.

    Fetch User Insights

    Fetch social interaction metrics about a specific user.

    • Enter the Instagram User ID in the Instagram User ID field. This is the unique identifier for the Instagram Business account you want to fetch insights for. The default value is 17841435346882875 if not specified.
    • Select or enter the metrics you want to fetch in the Metrics to Fetch field. Available metrics include impressions, reach, and more. You can select multiple metrics. The default value is impressions,reach if not specified. Click on the documentation link to view all available metrics.
    • Select the aggregation period for the metrics from the Aggregation period dropdown menu. Available options include day, week, days_28, month, and lifetime. The default value is day if not specified. The aggregation period determines how the metrics are aggregated over time.
    • Enter any other allowed request parameters in the Other Request Parameters field. This field allows you to specify date ranges and/or segmentation. The default value is &since={now-1}&until={now} if not specified, which fetches data from yesterday to today. You can use Nexla macros like {now}, {now-1}, etc. to specify dynamic date ranges.
    • Enter the Facebook API version in the API Version field. The default value is v13.0 if not specified. The API version determines which version of the Instagram Graph API will be used.
    • The endpoint uses GET requests to https://graph.facebook.com/{api_version}/{user_id}/insights?metric={metrics}&period={period}{other_params} where {api_version} is the API Version you provide, {user_id} is the Instagram User ID you provide, {metrics} is the comma-separated list of Metrics to Fetch you provide, {period} is the Aggregation period you select, and {other_params} is the Other Request Parameters you provide. The endpoint URL is automatically constructed based on the Instagram Graph API base URL and all the parameters.
    • The endpoint uses URL-based pagination (iteration.type: paging.next.url) through the paging.next mechanism. The response data path is $.data[*], which extracts all items from the data array in the API response.
    • When a response includes a paging.next value, Nexla automatically uses it as the URL for the subsequent request to fetch the next page of results until all insights have been retrieved.

    This endpoint retrieves social interaction metrics (insights) for an Instagram Business account. The endpoint allows you to specify which metrics you want to fetch, the aggregation period, and date ranges. Available metrics include impressions, reach, and more. The endpoint supports pagination through the paging.next URL mechanism, which allows you to retrieve large lists of insights efficiently. You can use Nexla macros in the Other Request Parameters field to specify dynamic date ranges. For detailed information about available metrics, aggregation periods, and the API response format, see the Instagram API documentation.

Configure Manually

Instagram data sources can be manually configured to ingest data from any valid Instagram API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

With manual configuration, you can also create more complex Instagram sources, such as sources that use custom query parameters, different HTTP methods, or custom data transformations.

Content Format

  1. Select the format in which the data from the Instagram API will be received from the Content Format pulldown menu. Nexla will automatically parse the data in the selected format. The Instagram API typically returns data in JSON format.

API Endpoint URL

  1. Enter the URL of the Instagram API endpoint from which this source will fetch data in the Set API URL field. This should be the complete URL including the protocol (https://) and any required path parameters. Instagram API endpoints typically follow the pattern https://graph.facebook.com/{api_version}/{endpoint_path}.

Ensure the API endpoint URL is correct and accessible with your current credentials. You can test the endpoint using the Test button after configuring the URL. The endpoint requires System User Access Token authentication via the Authorization: Bearer {token} header, which is handled automatically by your credential configuration. For detailed information about Instagram API endpoints and available APIs, see the Instagram API documentation.