Represents social interaction metrics on your app user's Instagram business or creator account.
In this guide, we use Instagram user and Instagram account interchangeably.
Available for the Instagram API with Facebook Login and Instagram API with Instagram Login.
The following metrics have been deprecated for v22.0 and will be deprecated for all versions on April 21, 2025:
impressions
Introducing the new views
metric with total_value
metric type and with breakdowns for follower_type
and media_product_type
.
Visit the Instagram Platform Changelog for more information.
This operation is not supported.
GET /<YOUR_APP_USERS_INSTAGRAM_ACCOUNT_ID>/insights
Returns insights on your app user's Instagram business or creator account.
Instagram API with Instagram Login | Instagram API with Facebook Login | |
---|---|---|
Access Tokens |
| |
Host URL |
|
|
Login Type | Business Login for Instagram | Facebook Login for Business |
Permissions |
|
If the app user was granted a role on the Page connected to your app user's Instagram professional account via the Business Manager, your app will also need:
|
follower_count
and online_followers
metrics are not available on Instagram business or creator accounts with fewer than 100 followers. online_followers
metric is only available for the last 30 days.0
for individual metrics.GET https://<HOST_URL>/<API_VERSION>/<APP_USERS_INSTAGRAM_ACCOUNT_ID>/insights ?metric=<COMMA_SEPARATED_LIST_OF_METRICS> &period=<PERIOD> &timeframe=<TIMEFRAME> &metric_type=<METRIC_TYPE> &breakdown=<BREAKDOWN_METRIC> &since=<START_TIME> &until=<STOP_TIME> &access_token=<INSTAGRAM_USER_ACCESS_TOKEN>
GET https://<HOST_URL>/<API_VERSION>/<APP_USERS_INSTAGRAM_ACCOUNT_ID>/insights
Placeholder | Value |
---|---|
The latest version is: v22.0 | The API version your app is using when making calls to Meta servers. Learn more about API versioning. |
| Required. The ID of your app user's Instagram professional account. |
| Required. The ID of your app user's Instagram professional account. |
Key | Value |
---|---|
| Required. The app user's Facebook User or Instagram access token. |
| Designates how to break down result set into subsets.
|
| Required. Comma-separated list of Metrics you want returned.
|
| Designates if you want the responses aggregated by time period or as a simple total. See Metric Type. |
| Required. Period aggregation. |
| Unix timestamp indicating start of range. See Range.
|
| Required for demographics-related metrics. Designates how far to look back for data. See Timeframe. |
| Unix timestamp indicating end of range. See Range. |
If you request metric_type=total_value
, you can also specify one or more breakdowns, and the results will be broken down into smaller sets based on the specified breakdown. Values can be:
contact_button_type
— Break down results by profile UI component that viewers tapped or clicked. Response values can be:
BOOK_NOW
CALL
DIRECTION
EMAIL
INSTANT_EXPERIENCE
TEXT
UNDEFINED
follow_type
— Break down results by followers or non-followers. Response values can be:
FOLLOWER
NON_FOLLOWER
UNKNOWN
media_product_type
— Break down results by the surface where viewers viewed or interacted with the app user's media. Response values can be:
AD
FEED
REELS
STORY
Refer to the Metrics table to determine which metrics are compatible with a breakdown. If you request a metric that doesn't support a breakdown, the API will return an error ("An unknown error has occurred."
), so be careful if requesting multiple metrics in a single query.
If you request metric_type=time_series
, breakdowns will not be included in the response.
You can designate how you want results aggregated, either by time period or as a simple total (with breakdowns, if requested). Values can be:
time_series
— Tells the API to aggregate results by time period. See Period.total_value
— Tells the API to return results as a simple total. If breakdowns are included in the request, the result set will be further broken down by the specific breakdowns. See Breakdown.Tells the API which time frame to use when aggregating results. Only compatible with interaction-related metrics.
Tells the API how far to look back for data when requesting demographic-related metrics. This value overrides the since
and until
parameters.
Assign UNIX timestamps to the since
and until
parameters to define a range. The API will only include data created within this range (inclusive). If you do not include these parameters, the API will look back 24 hours.
For demographics-related metrics, the timeframe
parameter overrides these values. See Timeframe.
Metric | Period | Timeframe | Breakdown | Metric Type | Description |
---|---|---|---|---|---|
|
| n/a | n/a |
| The number of accounts that have interacted with your content, including in ads. Content includes posts, stories, reels, videos and live videos. Interactions can include actions such as likes, saves, comments, shares or replies. This metric is estimated. |
|
| n/a |
|
| The number of comments on your posts, reels, videos and live videos. This metric is in development. |
|
| One of:
|
|
| The demographic characteristics of the engaged audience, including countries, cities and gender distribution. Does not support Not returned if the IG User has less than 100 engagements during the timeframe. Note: The |
|
| n/a |
|
| The number of accounts that followed you and the number of accounts that unfollowed you or left Instagram in the selected time period. Not returned if the IG User has less than 100 followers. |
|
| One of:
|
|
| The demographic characteristics of followers, including countries, cities and gender distribution. Does not support Not returned if the IG User has less than 100 followers. |
|
| n/a | n/a |
| The number of times your posts, stories, reels, videos and live videos were on screen, including in ads. |
|
| n/a |
|
| The number of likes on your posts, reels, and videos. |
|
| n/a |
|
| The number of taps on your business address, call button, email button and text button. |
|
| n/a |
|
| The number of unique accounts that have seen your content, at least once, including in ads. Content includes posts, stories, reels, videos and live videos. Reach is different from impressions, which may include multiple views of your content by the same accounts. This metric is estimated. |
|
| n/a | n/a |
| The number of replies you received from your story, including text replies and quick reaction replies. |
|
| n/a |
|
| The number of saves of your posts, reels, and videos. |
|
| n/a |
|
| The number of shares of your posts, stories, reels, videos and live videos. |
|
| n/a |
|
| The total number of post interactions, story interactions, reels interactions, video interactions and live video interactions, including any interactions on boosted content. |
|
| n/a |
|
| The number of times your content was played or displayed. Content includes reels, posts, stories. This metric is in development. |
A JSON object containing the results of your query. Results can include the following data, based on your query specifications:
{ "data": [ { "name": "{data}", "period": "<PERIOD>", "title": "{title}", "description": "{description}", "total_value": { "value": {value}, "breakdowns": [ { "dimension_keys": [ "{key-1}", "{key-2", ... ], "results": [ { "dimension_values": [ "{value-1}", "{value-2}", ... ], "value": {value}, "end_time": "{end-time}" }, ... ] } ] }, "id": "{id}" } ], "paging": { "previous": "{previous}", "next": "{next}" } }
Property | Value Type | Description |
---|---|---|
| Array | An array of objects describing the breakdowns requested and their results. Only returned if |
| Array | An array of objects describing your results. |
| String | Metric description. |
| Array | An array of strings describing breakdowns requested in the query. Can be used as keys corresponding to values in individual breakdown sets. Only returned if |
| Array | An array of strings describing breakdown set values. Values can be mapped to Only returned if |
| String | ISO 8601 timestamp with time and offset. For example: |
| String | A string describing the query's path parameters. |
| String | Metric requested. |
| String | URL to retrieve the next page of results. See Paginated Results for more information. |
| Object | An object containing URLs used to request the next set of results. See Paginated Results for more information. |
| String | Period requested. |
| String | URL to retrieve the previous page of results. See Paginated Results for more information. |
| Array | An array of objects describing each breakdown set. Only returned if |
| String | Metric title. |
| Object | Object describing requested breakdown values (if breakdowns were requested). |
| Integer | For For |
curl -i -X GET \
"https://graph.facebook.com/v22.0
/17841405822304914/insights?metric=reach&period=day&breakdown=media_product_type&metric_type=total_value&since=1658991600&access_token=EAAOc..."
{ "data": [ { "name": "reach", "period": "day", "title": "Accounts reached", "description": "The number of unique accounts that have seen your content, at least once, including in ads. Content includes posts, stories, reels, videos and live videos. Reach is different from impressions, which may include multiple views of your content by the same accounts. This metric is estimated and in development.", "total_value": { "value": 224, "breakdowns": [ { "dimension_keys": [ "media_product_type" ], "results": [ { "dimension_values": [ "CAROUSEL_CONTAINER" ], "value": 100 }, { "dimension_values": [ "POST" ], "value": 124 } ] } ] }, "id": "17841405309211844/insights/reach/day" } ], "paging": { "previous": "https://graph.face...", "next": "https://graph.face..." }
curl -i -X GET \
"https://graph.facebook.com/v22.0
/17841405822304914/insights?metric=engaged_audience_demographics&period=lifetime&timeframe=last_90_days&breakdowns=country&metric_type=total_value&access_token=EAAOc..."
{ "data": [ { "name": "engaged_audience_demographics", "period": "lifetime", "title": "Engaged audience demographics", "description": "The demographic characteristics of the engaged audience, including countries, cities and gender distribution.", "total_value": { "breakdowns": [ { "dimension_keys": [ "timeframe", "country" ], "results": [ { "dimension_values": [ "LAST_90_DAYS", "AR" ], "value": 1 }, { "dimension_values": [ "LAST_90_DAYS", "RU" ], "value": 1 }, { "dimension_values": [ "LAST_90_DAYS", "MA" ], "value": 1 }, { "dimension_values": [ "LAST_90_DAYS", "LA" ], "value": 1 }, { "dimension_values": [ "LAST_90_DAYS", "IQ" ], "value": 2 }, { "dimension_values": [ "LAST_90_DAYS", "MX" ], "value": 1 }, { "dimension_values": [ "LAST_90_DAYS", "FR" ], "value": 1 }, { "dimension_values": [ "LAST_90_DAYS", "ES" ], "value": 3 }, { "dimension_values": [ "LAST_90_DAYS", "NL" ], "value": 1 }, { "dimension_values": [ "LAST_90_DAYS", "TR" ], "value": 1 }, { "dimension_values": [ "LAST_90_DAYS", "US" ], "value": 7 } ] } ] }, "id": "17841401130346306/insights/engaged_audience_demographics/lifetime" } ] }
This operation is not supported.
This operation is not supported.