GETInsights2–6 credits
Engagement rate
GET https://api.instagramapi.dev/v1/insights/profile/engagementComputes an engagement rate for an account from its most recent posts: average likes + comments per post, divided by follower count. Analyzes the last 12 posts by default; pass `posts` (up to 50) to widen the window. Returns the rate as both a ratio and a percentage, plus the averages it was derived from. Cost is dynamic: 1 credit for the profile lookup plus 1 per ~12 posts fetched (so 12 posts = 2 credits, 50 posts = 6).
Build this with an AI agent
Paste this prompt into Claude, Codex, or any coding agent.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| handle | string | yes | An Instagram account. Accepts a username (`nike`), a numeric user id (`13460080`), or a full profile URL (`https://instagram.com/nike`). We resolve it automatically. |
| posts | number | no | How many recent posts to analyze (1–50). Defaults to 12. |
Example request
curl "https://api.instagramapi.dev/v1/insights/profile/engagement?handle=nike&posts=12" \
-H "Authorization: Bearer $INSTAGRAMAPI_KEY"Try it
Live request · uses 2 creditsExample responses
Switch tabs to see the body shape for success and each error status.
{
"data": {
"username": "nike",
"followers": 291952375,
"posts_analyzed": 12,
"avg_likes": 412874,
"avg_comments": 5231,
"avg_engagement": 418105,
"engagement_rate": 0.00143,
"engagement_rate_pct": 0.14
},
"meta": {
"endpoint": "insights/profile/engagement",
"request_id": "req_3f8a1c9e",
"credits_charged": 2,
"credits_remaining": 4987,
"ms": 412
}
}Response fields
Fields returned under data on a 200 response. Every response also includes a meta object with billing info.
| Field | Type | Description |
|---|---|---|
| username | string | The account's handle. |
| followers | number | Follower count at the time of calculation. |
| posts_analyzed | number | How many recent posts were actually used (your `posts` value, or fewer if the account has fewer). |
| avg_likes | number | Average likes across the analyzed posts. |
| avg_comments | number | Average comments across the analyzed posts. |
| avg_engagement | number | Average interactions per post (avg_likes + avg_comments). |
| engagement_rate | number | avg_engagement ÷ followers, as a decimal ratio. e.g. 0.00143 means a typical post draws interactions from about 0.143% of the follower base. |
| engagement_rate_pct | number | The same figure expressed as a percentage (engagement_rate × 100). e.g. 0.14 = 0.14%. |