Instagram Insights API: account and media metrics
The Instagram Insights API works at two levels: the account (GET /{ig-user-id}/insights) and the media object (GET /{ig-media-id}/insights). In 2025 Meta retired impressions and plays and introduced views in their place. The API only supports Business and Creator accounts, data can lag by up to 48 hours, and demographics return only the top 45 values.
Updated:
In short: how do you get Instagram stats through the API?
For account metrics, call /{ig-user-id}/insights with metric, period=day and metric_type=total_value; for post metrics, call /{ig-media-id}/insights. The permission depends on the login type: instagram_business_manage_insights with Instagram Login, instagram_manage_insights with Facebook Login. Personal accounts aren't supported — Business or Creator only.
If an account request omits since and until, the API looks back 24 hours. When there's no data, the API returns an empty set rather than 0 — don't record it as zero in your reports.
Login type: host and permissions
| Instagram Login | Facebook Login | |
|---|---|---|
| Host | graph.instagram.com | graph.facebook.com |
| Facebook Page | Not required | The Instagram account must be linked to a Page |
| Permissions | instagram_business_basic, instagram_business_manage_insights | instagram_basic, instagram_manage_insights, pages_read_engagement |
| Totals including ads | No | total_likes, total_comments, total_views |
| Socialift SDK | Instagram(app_id=..., app_secret=...) | Instagram.via_facebook(app_secret=...) plus ig_user_id |
On the Facebook Login path, if the user's Page role was granted through Business Manager, Meta's docs also list ads_management and ads_read.
Account-level metrics
The list from Meta's current reference. Regular metrics are requested with period=day.
| Metric | What it measures | Breakdown |
|---|---|---|
views | Times your content (reels, posts, stories) was played or displayed | follower_type, media_product_type |
reach | Unique accounts that saw your content at least once, including ads | media_product_type, follow_type |
accounts_engaged | Accounts that interacted with your content, including ads | no |
total_interactions | All interactions across posts, stories, reels, videos and live | media_product_type |
likes, comments, saves, shares | Individual interaction types | media_product_type |
replies, reposts | Replies and reposts | no |
follows_and_unfollows | Accounts that followed and unfollowed | follow_type |
profile_links_taps | Taps on address, call, email and text buttons | contact_button_type |
follower_demographics, engaged_audience_demographics | Demographics of followers and of the engaged audience | age, city, country, gender |
yesno
Every metric supports metric_type=total_value; reach also supports time_series. Demographics use period=lifetime plus a timeframe.
Media metrics by content type
The valid set depends on media_product_type. Request an unsupported metric and the Graph API rejects the whole call.
| Metric | FEED | REELS | STORY |
|---|---|---|---|
views | yes | yes | yes |
reach | yes | yes | yes |
total_interactions | yes | yes | yes |
shares, reposts | yes | yes | yes |
likes, comments | yes | yes | no |
saved | yes | yes | no |
profile_visits, profile_activity, follows | yes | no | yes |
ig_reels_avg_watch_time | no | yes | no |
navigation, replies, link_clicks | no | no | yes |
yesnoScroll the table sideways
likes and comments count organic interactions only. With Facebook Login you also get total_likes, total_comments and total_views, which include ad engagement.
2024–2025 changes: what was retired and what was added
This is exactly why code from older tutorials breaks.
| Metric | What happened | When |
|---|---|---|
impressions (account and media) | Retired, replaced by views | v22.0 from January 21, 2025; all versions from April 21, 2025 |
plays, clips_replays_count, ig_reels_aggregated_all_plays_count (media) | Retired, replaced by views | Same dates |
video_views (media) | Retired | v21.0 from October 2, 2024; all versions from January 8, 2025 |
profile_views, website_clicks, email_contacts, phone_call_clicks, text_message_clicks, get_direction_clicks (account, time series) | Retired | Same dates (v21.0) |
last_14_days, last_30_days, last_90_days, prev_month (audience demographics timeframes) | Retired | All versions from August 19, 2024 |
views (account and media) | Added | January 21, 2025 |
reposts, reels_skip_rate, facebook_views, crossposted_views | Added | December 3, 2025 |
For media created after July 2, 2024, impressions stopped working even earlier.
Demographics: who follows and who engages
follower_demographics (followers) and engaged_audience_demographics (people who interacted) are requested with period=lifetime, metric_type=total_value, a breakdown (age, city, country or gender) and a timeframe. The timeframe overrides since/until; the safe values are this_week and this_month.
Meta returns only the top 45 values. Keep that in mind when computing shares — cities outside the top 45, for example, simply aren't in the response.
Small accounts have limits: Meta doesn't return follower_count or online_followers for accounts with fewer than 100 followers, and demographics may come back empty. The Socialift SDK's ig.demographics doesn't raise in that case: it returns available: False with Meta's reason for that breakdown, and the other breakdowns still come through.
Time ranges, delay and retention
Data can be delayed by up to 48 hours: if yesterday's number changes tomorrow, that's expected. Re-fetch the last two days on every sync.
Media metrics are stored for up to 2 years. Story metrics are only available for 24 hours — collect them while the story is live. Story metrics with values below 5 return error code 10, and individual items inside an album have no insights at all.
For long-range reporting, the reliable approach is a daily snapshot stored in your own database. The Socialift SDK's ig.insights caps the window at 30 days and never lets until go past today, so request long periods in 30-day chunks.
Setting up stats collection in 5 steps
Check the account type
The Instagram account must be Business or Creator. For Facebook Login, it's linked to a Facebook Page.
Request the insights permissions
Instagram Login:
instagram_business_basicandinstagram_business_manage_insights. Facebook Login:instagram_basic,instagram_manage_insights,pages_read_engagement. Serving other people's accounts requires App Review for these.Collect account metrics daily
Request
views,reach,accounts_engaged,total_interactionsand friends withperiod=day, and store them every day.Request media metrics by content type
Look up
media_product_typefirst (FEED, REELS, STORY), then request the matching set. Collect stories within 24 hours.Pull demographics weekly or monthly
Request
follower_demographicswithtimeframe=this_month, once perbreakdown, and store the result with a date.
Python: account, media and demographics
Facebook Login path: a Page token plus the Instagram account ID.
import asyncio, os
from datetime import date, timedelta
from socialift import Instagram
async def main() -> None:
token = os.environ["PAGE_TOKEN"]
ig_user_id = os.environ["IG_USER_ID"]
async with Instagram.via_facebook(app_secret=os.environ["FACEBOOK_APP_SECRET"]) as ig:
week = await ig.insights(
token, ig_user_id=ig_user_id, since=date.today() - timedelta(days=7), until=date.today()
)
print(week["since"], week["until"], week["metrics"])
for post in await ig.media(token, ig_user_id=ig_user_id, limit=5):
print(post["id"], post["media_type"], await ig.media_insights(post["id"], token))
demo = await ig.demographics(token, ig_user_id=ig_user_id)
for cut, data in demo.items():
print(cut, data["values"] if data["available"] else data["reason"])
asyncio.run(main())On the Instagram Login path, create the client with Instagram.from_env(), pass an Instagram user token, and ig_user_id becomes optional.
When a post has no insights (an old post or an expired story), media_insights returns an empty dict instead of raising.
What the Socialift SDK actually requests
Knowing which metrics each method asks for helps you build reports correctly.
| Method | Graph API request | Returns |
|---|---|---|
ig.insights | /{ig-user-id}/insights: reach, profile_views, website_clicks, accounts_engaged, total_interactions; period=day, metric_type=total_value. Defaults to the last 30 days; the window never exceeds 30 days | since, until and a metrics dict |
ig.media_insights | Reads media_type and media_product_type first, then the matching set. Image: reach, likes, comments, saved, shares, total_interactions, profile_visits. Video and Reels: the same plus views (without profile_visits). Carousel: reach, likes, comments, saved, shares, total_interactions. Story: reach, replies, navigation, total_interactions | {metric: value} or an empty dict |
ig.demographics | follower_demographics, period=lifetime, timeframe=this_month; breakdowns in separate calls: age,gender, city, country | available plus values or reason per breakdown |
Notes and limits
Heads-up: Meta's current account metric list no longer includes profile_views or website_clicks (their time series versions were retired in January 2025). If ig.insights returns a metric error, that's the likely cause.
Tips for a reporting pipeline
- Use
viewsinstead ofimpressionsandplays— update legacy dashboards. - Don't store an empty response as
0: it means "no data". - Re-fetch the last 48 hours daily — numbers may not be final yet.
- Collect story insights within 24 hours.
- Keep daily snapshots yourself and request long periods in chunks.
- Handle missing permissions (
PermissionError) separately from token problems (AuthError).
Frequently asked questions
Why doesn't impressions work in the Instagram API anymore?
Meta retired impressions in v22.0 from January 21, 2025, and in all versions from April 21, 2025. Use the views metric instead — it's available at both account and media level.
What's the difference between views and reach?
views counts how many times content was played or displayed (one person can be counted several times). reach counts unique accounts that saw the content at least once.
Can I get insights for a personal Instagram account via the API?
No. The Insights API only supports Business and Creator accounts. Switch the account to a professional account in the Instagram app settings.
Why are my demographics empty?
Usually the account is too small or the timeframe isn't supported. Use this_week or this_month, request each breakdown separately, and remember the response holds at most 45 values.
Can I fetch story insights later?
No — story metrics are only available for 24 hours. Schedule collection when the story is published and store the result in your own database.
How far back can I get Instagram insights?
Meta stores media metrics for up to 2 years. For long account-level history, the reliable approach is taking and storing your own daily snapshots.