Insights

The Insights API allows you to get social interaction metrics for IG Users and their IG Media objects. Amounts for each metric are calculated upon API request.

In compliance with the European Union's ePrivacy Directive, messaging-related Story IG Media interactions performed by users in the European Economic Area (EEA) after December 1, 2020, will no longer be included in some metric calculations:

  • For Stories created by users in the EEA, the replies metric will now return a value of 0.
  • For Stories created by users outside the EEA, the replies metric will return the number of replies, but replies made my users in the EEA will not be included in its calculation.

Limitations

  • Insights on IG Users are only available on IG User accounts that have 100 or more followers.
  • The API only reports organic interaction metrics; interactions on ads containing a media object are not counted.
  • Metrics data is stored for 2 years.
  • You can only get insights for a single user at a time.
  • You cannot get insights for Facebook Pages.
  • Stories insights are only available for 24 hours, even if the stories are archived or highlighted. If you want to get the latest insights for a story before it expires, set up a Webhook for the Instagram topic and subscribe to the story_insights field.

UTC

Timestamps in API responses use UTC with zero offset and are formatted using ISO-8601. For example: 2019-04-05T07:56:32+0000

Endpoints

The API consists of the following endpoints:

Refer to each endpoint's reference documentation for available metrics, parameters, and permission requirements.

Examples

Getting Account Metrics

To get metrics on an Instagram Business or Creator Account, query the GET /{ig-user-id}/insights edge and specify the metrics you want returned.

Sample Request

GET graph.facebook.com/17841405822304914/insights
    ?metric=impressions,reach,profile_views
    &period=day

Sample Response

{
  "data": [
    {
      "name": "impressions",
      "period": "day",
      "values": [
        {
          "value": 32,
          "end_time": "2018-01-11T08:00:00+0000"
        },
        {
          "value": 32,
          "end_time": "2018-01-12T08:00:00+0000"
        }
      ],
      "title": "Impressions",
      "description": "Total number of times this profile has been seen",
      "id": "instagram_business_account_id/insights/impressions/day"
    },
    {
      "name": "reach",
      "period": "day",
      "values": [
        {
          "value": 12,
          "end_time": "2018-01-11T08:00:00+0000"
        },
        {
          "value": 12,
          "end_time": "2018-01-12T08:00:00+0000"
        }
      ],
      "title": "Reach",
      "description": "Total number of unique accounts that have seen this profile",
      "id": "instagram_business_account_id/insights/reach/day"
    },
    {
      "name": "profile_views",
      "period": "day",
      "values": [
        {
          "value": 15,
          "end_time": "2018-01-11T08:00:00+0000"
        },
        {
          "value": 15,
          "end_time": "2018-01-12T08:00:00+0000"
        }
      ],
      "title": "Profile Views",
      "description": "Total number of unique accounts that have viewed this profile within the specified period",
      "id": "instagram_business_account_id/insights/profile_views/day"
    }
  ]
}

Getting Media Metrics

To get metrics on a media object, query the GET /{ig-media-id}/insights edge and specify the metrics you want returned.

Sample Request

GET graph.facebook.com/{media-id}/insights
    ?metric=engagement,impressions,reach

Sample Response

{
  "data": [
    {
      "name": "engagement",
      "period": "lifetime",
      "values": [
        {
          "value": 8
        }
      ],
      "title": "Engagement",
      "description": "Total number of likes and comments on the media object",
      "id": "media_id/insights/engagement/lifetime"
    },
    {
      "name": "impressions",
      "period": "lifetime",
      "values": [
        {
          "value": 13
        }
      ],
      "title": "Impressions",
      "description": "Total number of times the media object has been seen",
      "id": "media_id/insights/impressions/lifetime"
    },
    {
      "name": "reach",
      "period": "lifetime",
      "values": [
        {
          "value": 13
        }
      ],
      "title": "Reach",
      "description": "Total number of unique accounts that have seen the media object",
      "id": "media_id/insights/reach/lifetime"
    }
  ]
}