Represents social interaction metrics on an IG User.
This operation is not supported.
GET /{ig-user-id}/insights
Returns insights on an IG User. Metric values are calculated upon request.
online_followers
metric is only available for the last 30 days.Type | Description |
---|---|
If the app user was granted a role on the Page via the Business Manager, you will also need one of: |
GET https://graph.facebook.com/v10.0
/{ig-user-id}/insights
?metric={metric}
&period={period}
&since={since}
&until={until}
&access_token={access-token}
Parameter | Value |
---|---|
| The app user's User Access Token. |
| A comma-separated list of Metrics you want returned. If requesting multiple metrics, they must all have the same compatible Period. |
| A Period that is compatible with the metrics you are requesting. |
| Used in conjunction with |
| Used in conjunction with |
Metrics that support lifetime
periods will have results returned in an array of 24 hour periods, with periods ending on UTC−07:00.
With API version 9.0+, follower_count
values now align more closely with their corresponding values displayed in the Instagram app. In addition, follower_count
now returns a maximum of 30 days of data instead of 2 years. This change will be applied to all other versions on May 4, 2021.
Metric | Compatible Period | Description |
---|---|---|
|
| The cities of the IG User's followers. Does not include current day's data. |
|
| The countries of the IG User's followers. Does not include current day's data. |
|
| The gender and age distribution of the IG User's followers. Does not include current day's data. |
|
| The locales by country codes of the IG User's followers. Does not include current day's data. |
|
| Total number of taps on the email link in the IG User's profile. |
|
| Total number of new followers each day within the specified range. Returns a maximum of 30 days worth of data. |
|
| Total number of taps on the directions link in the IG User's profile. |
|
| Total number of times the IG User's IG Media objects (i.e. posts, stories and promotions) have been viewed. Includes ad activity generated through the API, Facebook ads interfaces, and the Promote feature. Does not include profile views. |
|
| Total number of the IG User's followers who were online during the specified range. |
|
| Total number of taps on the call link in the IG User's profile. |
|
| Total number of users who have viewed the IG User's profile within the specified period. |
|
| Total number of unique users who have viewed at least one of the IG User's IG Media. Repeat views and views across different IG Media owned by the IG User by the same user are only counted as a single view. Includes ad activity generated through the API, Facebook ads interfaces, and the Promote feature. |
|
| Total number of taps on the text message link in the IG User's profile. |
|
| Total number of taps on the website link in the IG User's profile. |
This edge supports time-based pagination, so you can include the since
and until
parameters with Unix timestamps to define a range. For example, to get 28 days worth of impressions — every day for the last 10 days — you could generate Unix timestamps for 10 days ago and today, assign them to the since
and until
parameters, and include them in your request:
metric=impressions&period=days_28&since=1501545600&until=1502493720
The since
and until
parameters are inclusive, so if your range includes a day that hasn't ended (i.e, today), subsequent queries throughout the day may return increased values. If you do not include the since
and until
parameters, the API will default to a 2 day range: yesterday through today.
curl -X GET \
'https://graph.facebook.com/v10.0
/17841405822304914/insights?metric=impressions,reach,profile_views&period=day&access_token=IGQVJ...'
{ "data": [ { "name": "impressions", "period": "day", "values": [ { "value": 4, "end_time": "2017-05-04T07:00:00+0000" }, { "value": 66, "end_time": "2017-05-05T07:00:00+0000" } ], "title": "Impressions", "description": "Total number of times this profile has been seen", "id": "17841400008460056/insights/impressions/day" }, { "name": "reach", "period": "day", "values": [ { "value": 3, "end_time": "2017-05-04T07:00:00+0000" }, { "value": 36, "end_time": "2017-05-05T07:00:00+0000" } ], "title": "Reach", "description": "Total number of unique accounts that have seen this profile", "id": "17841400008460056/insights/reach/day" }, { "name": "profile_views", "period": "day", "values": [ { "value": 0, "end_time": "2017-05-04T07:00:00+0000" }, { "value": 2, "end_time": "2017-05-05T07:00:00+0000" } ], "title": "Profile Views", "description": "Total number of unique accounts that have viewed this profile within the specified period", "id": "17841400008460056/insights/profile_views/day" } ] }
Notice that the sample request above did not include the since
and until
parameters, so the API returned data for a default range of 2 days. Each day is identified by an ISO 8601 formatted UTC timestamp with zero offset, which has been assigned to an end_time
property.
The end_time
property indicates a data set's lookback cutoff date; data older than this value is not included in the data set's calculation.
This operation is not supported.
This operation is not supported.