Instagram User Insights

Meltano Community

tap-instagram-user (plinxore variant)

Open source connector supported by the Meltano Community, a growing community of over 5500+ data engineers.

The tap-instagram-user extractor pulls data from Instagram User Insights that can then be sent to a destination using a loader.

Getting Started

Prerequisites

If you haven't already, follow the initial steps of the Getting Started guide:

  1. Install Meltano
  2. Create your Meltano project

Installation and configuration

  1. Add the tap-instagram-user extractor to your project using
    meltano add
    :
  2. meltano add tap-instagram-user
  3. Configure the tap-instagram-user settings using
    meltano config
    :
  4. meltano config tap-instagram-user set --interactive
  5. Test that extractor settings are valid using
    meltano config
    :
  6. meltano config tap-instagram-user test

Next steps

If you run into any issues, learn how to get help.

Capabilities

The current capabilities for tap-instagram-user may have been automatically set when originally added to the Hub. Please review the capabilities when using this extractor. If you find they are out of date, please consider updating them by making a pull request to the YAML file that defines the capabilities for this extractor.

This plugin has the following capabilities:

  • catalog
  • state
  • discover
  • activate-version
  • about
  • stream-maps
  • schema-flattening
  • batch
  • structured-logging

You can override these capabilities or specify additional ones in your meltano.yml by adding the capabilities key.

Settings

The tap-instagram-user settings that are known to Meltano are documented below. To quickly find the setting you're looking for, click on any setting name from the list:

You can also list these settings using

meltano config
with the list subcommand:

meltano config tap-instagram-user list

You can override these settings or specify additional ones in your meltano.yml by adding the settings key.

Please consider adding any settings you have defined locally to this definition on MeltanoHub by making a pull request to the YAML file that defines the settings for this plugin.

Access Token (access_token)

  • Environment variable: TAP_INSTAGRAM_USER_ACCESS_TOKEN

The client's Long-Lived Token


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set access_token [value]

IG User ID (ig_user_id)

  • Environment variable: TAP_INSTAGRAM_USER_IG_USER_ID

The professional Instagram account ID


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set ig_user_id [value]

Metrics (metrics)

  • Environment variable: TAP_INSTAGRAM_USER_METRICS

List of metrics (and their breakdowns) to extract; one stream is generated per metric/breakdown combination. Each entry may override start_date/days_to_subtract/period/timeframe/metric_type/generate_dates_range for itself; otherwise the global value above applies. Required: no default value.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set metrics [value]

Batch Compression Format (batch_config.encoding.compression)

  • Environment variable: TAP_INSTAGRAM_USER_BATCH_CONFIG_ENCODING_COMPRESSION

Compression format to use for batch files.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set batch_config encoding.compression [value]

Batch Encoding Format (batch_config.encoding.format)

  • Environment variable: TAP_INSTAGRAM_USER_BATCH_CONFIG_ENCODING_FORMAT

Format to use for batch files.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set batch_config encoding.format [value]

Batch Storage Prefix (batch_config.storage.prefix)

  • Environment variable: TAP_INSTAGRAM_USER_BATCH_CONFIG_STORAGE_PREFIX

Prefix to use when writing batch files.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set batch_config storage.prefix [value]

Batch Storage Root (batch_config.storage.root)

  • Environment variable: TAP_INSTAGRAM_USER_BATCH_CONFIG_STORAGE_ROOT

Root path to use when writing batch files.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set batch_config storage.root [value]

Days To Subtract (days_to_subtract)

  • Environment variable: TAP_INSTAGRAM_USER_DAYS_TO_SUBTRACT
  • Default Value: 0

Default number of already-covered days to re-extract on each run, in addition to genuinely new days (overlap window, useful because Meta insights can still be corrected after their first extraction). 0 = no re-extraction. Overridable per entry in metrics.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set days_to_subtract [value]

Faker Locale (faker_config.locale)

  • Environment variable: TAP_INSTAGRAM_USER_FAKER_CONFIG_LOCALE

One or more LCID locale strings to produce localized output for: https://faker.readthedocs.io/en/master/#localization


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set faker_config locale [value]

Faker Seed (faker_config.seed)

  • Environment variable: TAP_INSTAGRAM_USER_FAKER_CONFIG_SEED

Value to seed the Faker generator for deterministic output: https://faker.readthedocs.io/en/master/#seeding-the-generator


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set faker_config seed [value]

Enable Schema Flattening (flattening_enabled)

  • Environment variable: TAP_INSTAGRAM_USER_FLATTENING_ENABLED

'True' to enable schema flattening and automatically expand nested properties.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set flattening_enabled [value]

Max Flattening Depth (flattening_max_depth)

  • Environment variable: TAP_INSTAGRAM_USER_FLATTENING_MAX_DEPTH

The max depth to flatten schemas.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set flattening_max_depth [value]

Max Key Length (flattening_max_key_length)

  • Environment variable: TAP_INSTAGRAM_USER_FLATTENING_MAX_KEY_LENGTH

The maximum length of a flattened key.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set flattening_max_key_length [value]

Flattening Separator (flattening_separator)

  • Environment variable: TAP_INSTAGRAM_USER_FLATTENING_SEPARATOR

The separator to use when flattening keys.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set flattening_separator [value]

Generate Dates Range (generate_dates_range)

  • Environment variable: TAP_INSTAGRAM_USER_GENERATE_DATES_RANGE
  • Default Value: active

'active' (default): one API call per day (since/until = 1 day). 'inactive': a single call covering the whole since/until range (fewer API calls, but loses day-by-day granularity depending on what the API returns for the metric). Overridable per entry in metrics.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set generate_dates_range [value]

Media Active Window Days (media_active_window_days)

  • Environment variable: TAP_INSTAGRAM_USER_MEDIA_ACTIVE_WINDOW_DAYS

Optional rolling refresh window (days). When set, only the first run backfills (down to media_since); later runs fetch just the last N days, so frozen old posts are not re-listed nor their insights re-fetched. Omit for a full snapshot every run. No default (affects completeness; opt-in).


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set media_active_window_days [value]

Media Fields (media_fields)

  • Environment variable: TAP_INSTAGRAM_USER_MEDIA_FIELDS

Fields to request on the /media edge for the ig_media stream (must include media_product_type for the insights children). No default; required to enable media extraction.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set media_fields [value]

Media Limit (media_limit)

  • Environment variable: TAP_INSTAGRAM_USER_MEDIA_LIMIT
  • Default Value: 100

Page size (limit) for the /media edge.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set media_limit [value]

Media Max Pages (media_max_pages)

  • Environment variable: TAP_INSTAGRAM_USER_MEDIA_MAX_PAGES
  • Default Value: 100

Maximum number of pages to fetch from the /media edge (safety cap against an unbounded pagination loop).


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set media_max_pages [value]

Media Metric Compatibility (media_metric_compatibility)

  • Environment variable: TAP_INSTAGRAM_USER_MEDIA_METRIC_COMPATIBILITY

Maps each media_product_type (FEED/REELS/STORY) to the list of metrics valid for it, so invalid metric/type calls are skipped. No default; required when media_metrics is set.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set media_metric_compatibility [value]

Media Metric Compatibility By Media Type (media_metric_compatibility_by_media_type)

  • Environment variable: TAP_INSTAGRAM_USER_MEDIA_METRIC_COMPATIBILITY_BY_MEDIA_TYPE

Optional second compatibility axis: maps each media_type (IMAGE/VIDEO/CAROUSEL_ALBUM) to the metrics valid for it. When set, a metric is requested only if valid for both the post's media_product_type and media_type (e.g. views applies to VIDEO only). Requires media_type in media_fields.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set media_metric_compatibility_by_media_type [value]

Media Metrics (media_metrics)

  • Environment variable: TAP_INSTAGRAM_USER_MEDIA_METRICS

Per-post insight metrics to extract; one ig_media_ stream is generated per metric/breakdown combination. Requires media_fields and media_metric_compatibility.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set media_metrics [value]

Media Since (media_since)

  • Environment variable: TAP_INSTAGRAM_USER_MEDIA_SINCE

Optional floor date for the /media list (sent as the since Unix timestamp). Bounds the first-run backfill. No default (omit = full catalogue, capped at Meta's ~10K most recent media).


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set media_since [value]

Media Until (media_until)

  • Environment variable: TAP_INSTAGRAM_USER_MEDIA_UNTIL

Optional ceiling date for the /media list (sent as until). Usually unset (= up to now); useful for backfilling a fixed window.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set media_until [value]

Metric Type (metric_type)

  • Environment variable: TAP_INSTAGRAM_USER_METRIC_TYPE
  • Default Value: total_value

Default metric_type parameter passed to the Meta Insights API for each metric. Overridable per entry in metrics.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set metric_type [value]

On Unsupported Metric (on_unsupported_metric)

  • Environment variable: TAP_INSTAGRAM_USER_ON_UNSUPPORTED_METRIC
  • Default Value: fail

Behaviour when Meta rejects a media-insights metric with 'does not support the metric' despite the compatibility tables. 'fail' (default) stops the run (stale-table signal, no silent loss); 'skip' logs a WARNING and skips that post/metric.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set on_unsupported_metric [value]

Period (period)

  • Environment variable: TAP_INSTAGRAM_USER_PERIOD
  • Default Value: day

Default granularity requested from the Meta Insights API (period parameter). Overridable per entry in metrics.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set period [value]

Start Date (start_date)

  • Environment variable: TAP_INSTAGRAM_USER_START_DATE

Default 'start_date' for all metrics on first extraction (ignored once a bookmark exists). Overridable per entry in metrics (e.g. 2026-05-01T00:00:00Z). No default: required on a stream's first run (it fails fast if neither this nor a per-metric start_date is set).


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set start_date [value]

User Stream Map Configuration (stream_map_config)

  • Environment variable: TAP_INSTAGRAM_USER_STREAM_MAP_CONFIG

User-defined config values to be used within map expressions.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set stream_map_config [value]

Timeframe (timeframe)

  • Environment variable: TAP_INSTAGRAM_USER_TIMEFRAME

Default optional timeframe parameter passed to the Meta Insights API. Overridable per entry in metrics.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set timeframe [value]

User Fields (user_fields)

  • Environment variable: TAP_INSTAGRAM_USER_USER_FIELDS

Fields to request on the IG User node for the ig_user stream (e.g. username, followers_count, follows_count, media_count). No default (Meta-controlled vocabulary). Set to enable the account-profile snapshot; omit to skip it.


Configure this setting directly using the following Meltano command:

meltano config tap-instagram-user set user_fields [value]

Something missing?

This page is generated from a YAML file that you can contribute changes to.

Edit it on GitHub!

Looking for help?

If you're having trouble getting the tap-instagram-user extractor to work, look for an existing issue in its repository, file a new issue, or join the Meltano Slack community and ask for help in the
#plugins-general
channel.
Meltano Cloud

For ambitious analytics engineering teams that want an efficient, fully managed solution with personalised expert support, explore Meltano Cloud

  • No maintenance overhead
  • Rigorously tested
  • Expert support from Meltano

Install

meltano add tap-instagram-user

Maintenance Status

  • Maintenance Status

Repo

https://github.com/plinxore/tap-instagram-user
  • Stars
  • Forks
  • Last Commit Date
  • Open Issues
  • Open PRs
  • Contributors
  • License

Maintainer

  • plinxore

PyPI Stats

  • PyPI Downloads
  • PyPI Package Version

Keywords