Instagram API Engagement — Get Metrics Programmatically (2026)

How to get Instagram engagement data via the Graph API. Endpoints, rate limits, and code examples for likes, comments, reach, and impressions.

SociaHive
SociaHive Team

Published April 16, 2026

The Instagram Graph API provides programmatic access to engagement metrics: likes, comments, shares, saves, reach, impressions, and follower demographics. Here is how to use the API to pull engagement data for your Instagram Business or Creator account.

Available Engagement Metrics

The Instagram Graph API exposes engagement data through two main endpoint groups:

Media Insights (Per-Post Metrics)

Request: GET /{media-id}/insights

MetricDescriptionAvailable For
impressionsTotal times the media was displayedPosts, Reels, Stories
reachUnique accounts that saw the mediaPosts, Reels, Stories
engagementTotal likes + comments + saves + sharesPosts, Reels
likesTotal likes (called "total_interactions" for some media types)Posts, Reels
commentsTotal commentsPosts, Reels
savedTimes the media was savedPosts, Reels
sharesTimes the media was sharedReels
playsTotal video playsReels, Videos
video_viewsTotal video views (3+ seconds)Stories, Videos

Account Insights (Profile-Level Metrics)

Request: GET /{user-id}/insights

MetricDescriptionPeriod
impressionsTotal times content was displayedday, week, days_28
reachUnique accounts that saw any contentday, week, days_28
follower_countTotal followers (delta available)day
profile_viewsProfile page visitsday
website_clicksClicks on website link in bioday
email_contactsClicks on email buttonday
get_directions_clicksClicks on directions buttonday
online_followersFollowers online by hourlifetime
audience_cityTop cities of followerslifetime
audience_countryTop countries of followerslifetime
audience_gender_ageGender and age distributionlifetime

Code Example (Node.js)

const accessToken = 'YOUR_ACCESS_TOKEN'

const userId = 'YOUR_IG_USER_ID'

// Get account-level insights for the last 28 days

async function getAccountInsights() {

const metrics = 'impressions,reach,follower_count,profile_views'

const url = https://graph.instagram.com/${userId}/insights?metric=${metrics}&period=days_28&access_token=${accessToken}

const response = await fetch(url)

const data = await response.json()

return data.data

}

// Get engagement metrics for a specific post

async function getPostEngagement(mediaId) {

const metrics = 'impressions,reach,engagement,saved,shares'

const url = https://graph.instagram.com/${mediaId}/insights?metric=${metrics}&access_token=${accessToken}

const response = await fetch(url)

const data = await response.json()

return data.data

}

Rate Limits

The Instagram Insights API follows standard Graph API rate limits:

  • 200 calls per user per hour for most endpoints
  • Insights data is cached and may have a 24-48 hour delay for some metrics
  • Historical data is available for up to 2 years (account insights) or the lifetime of the media (post insights)

Common Issues

"Unsupported metric" error: Not all metrics are available for all media types. Stories have different metrics than Posts and Reels. Check Meta's documentation for media-type-specific metric availability.

Data delays: Some metrics (especially reach and impressions) can take 24-48 hours to finalize. Do not expect real-time data for analytics use cases.

Token expiration: Long-lived tokens expire after 60 days. Implement token refresh logic to maintain uninterrupted API access.

Using SociaHive's Analytics Instead

If you do not want to build your own analytics integration, SociaHive provides engagement analytics through its dashboard — pulling data from the same Instagram Graph API but presenting it in a visual, actionable format.

Frequently Asked Questions

Can I get Instagram engagement data for any account?

No. You can only access engagement data for Instagram Business or Creator accounts that have authorized your app. You cannot pull metrics for competitors or accounts you do not manage.

Is the Instagram Insights API free?

Yes. The Instagram Graph API, including insights endpoints, is free to use. Meta does not charge for API calls. Your only costs are hosting your application.

How do I calculate engagement rate from the API?

Engagement rate = (likes + comments + saves + shares) / reach × 100. Pull the individual metrics from the media insights endpoint and calculate. Our free Instagram Engagement Rate Calculator does this automatically.

Ready to automate your Instagram?

Start free, plans from $29/mo. 14-day free Pro trial included.

Get Started