# How to Automate Instagram Analytics using the API

- Tool: API Automations
- Difficulty: Beginner
- Fix time: 15-30 minutes
- Compatibility: Instagram Business or Creator account required; Facebook Page linked; instagram_business_manage_insights scope requires Meta App Review (2-4 weeks); free API tier
- Last updated: May 2026

## TL;DR

Automate Instagram analytics using the Graph API's Insights endpoints: GET /{ig-user-id}/insights for account-level metrics (impressions, reach, profile_views with period=day) and GET /{ig-media-id}/insights for post-level metrics (impressions, reach, likes, comments, shares, saved). The instagram_business_manage_insights scope requires Meta App Review (2-4 weeks). Several metrics were deprecated in January 2025 — video_views, website_clicks, phone_call_clicks no longer return data.

## Best practices

- Never request deprecated metrics (video_views, website_clicks, phone_call_clicks) — they were removed in January 2025 and return errors on v21+
- Use period=day with since/until date range for account insights rather than period=lifetime — the lifetime period is not available for account-level metrics
- Limit per-post insights pulls to your top 10-15 posts by engagement to conserve your 200 calls/hour quota
- Calculate save rate (saves/reach) as a primary content quality signal alongside engagement rate
- Store analytics data in your own database over time — the API does not provide historical data beyond 30 days for most metrics
- Run your analytics job at least 24 hours after publishing a post — impressions and reach continue accumulating for hours after publish
- Add a 300-500ms delay between per-post insights calls to avoid hitting rate limits during bulk report generation

## Frequently asked questions

### Is the Instagram Analytics API free?

Yes — the Instagram Graph API is completely free with no per-request charges. The only cost is time: you need a Meta developer account (free) and App Review approval for the instagram_business_manage_insights permission (free but takes 2-4 weeks with a screencast submission). Some third-party data providers charge $200-$1,400/month, but direct API access costs nothing.

### Why are my website_clicks and video_views metrics returning errors?

These metrics were deprecated in January 2025 starting with API version v21. Specifically removed: video_views (for non-Reels), email_contacts, website_clicks, phone_call_clicks, text_message_clicks, and profile_views as a time series. Remove these from your metric parameter. For Reels video views, use 'plays' instead. For link clicks, there is no direct replacement in the current API.

### What happens when I hit the 200 calls/hour rate limit?

You'll receive HTTP 400 with error code 17 (User request limit reached). The 200 calls/hour is a rolling window per user+app pair — not a fixed hourly reset. Monitor the X-Business-Use-Case-Usage response header (present on every response), which shows call_count, total_cputime, and total_time as percentages. When call_count exceeds 80%, start backing off with exponential delay starting at 60 seconds.

### How far back can I fetch historical Instagram analytics data?

Account-level insights (impressions, reach) are available for up to 30 days via the since/until parameters. Post-level insights with period=lifetime return cumulative totals since the post was published (no time-series breakdown for individual posts). Instagram does not provide historical data older than 30 days for account metrics. This is why you should store analytics data in your own database if you need long-term trend analysis.

### Can I get follower demographic data (age, gender, location) from the API?

Not via the current public Graph API. Demographic insights (age, gender, country, city breakdowns) were previously available but were removed from the self-serve API. They are available in Meta Business Suite and Instagram Professional Dashboard natively, but not accessible via API for third-party apps. Third-party data providers like Phyllo may offer access, but at significant cost ($200+/month).

### Can RapidDev build a custom Instagram analytics dashboard?

Yes — RapidDev has built analytics tools and reporting dashboards for agencies and brands using the Instagram Graph API. We handle the full stack: Meta App setup and App Review, data pipeline, historical storage in Supabase or PostgreSQL, and a React dashboard with charts and automated weekly reports. Book a free consultation at rapidevelopers.com.

### Does the API provide Instagram Story analytics?

Yes, but with limitations. Story insights are available via GET /{ig-media-id}/insights with metrics like impressions, reach, exits, and taps_forward/taps_back. However, Stories expire after 24 hours, so you must fetch their insights before they expire — after that, the media ID returns a 400 error. Set up an automated fetch job that runs 23 hours after each Story is published to capture its final metrics before expiry.

---

Source: https://www.rapidevelopers.com/api-automations/how-to-automate-instagram-analytics-using-the-api
© RapidDev — https://www.rapidevelopers.com/api-automations/how-to-automate-instagram-analytics-using-the-api
