GETInsights4–6 credits

Best time to post

GET https://api.instagramapi.dev/v1/insights/profile/best-time

Analyzes when an account's recent posts earned the most engagement and returns the best hours and weekdays to post. Pass `posts` (1–50, default 30) to set the analysis window and `timezone` (UTC offset hours, e.g. `-5` for US East) to localize results. Cost: 4–6 credits depending on the analysis window.

Build this with an AI agent

Paste this prompt into Claude, Codex, or any coding agent.

Parameters

NameTypeRequiredDescription
handlestringyesAn Instagram account. Accepts a username (`nike`), a numeric user id (`13460080`), or a full profile URL (`https://instagram.com/nike`). We resolve it automatically.
postsnumbernoRecent posts to analyze (1–50). Defaults to 30.
timezonenumbernoUTC offset in hours to localize the hour/day buckets (e.g. -5). Defaults to 0 (UTC).

Example request

curl "https://api.instagramapi.dev/v1/insights/profile/best-time?handle=nike&posts=30&timezone=-5" \
  -H "Authorization: Bearer $INSTAGRAMAPI_KEY"

Try it

Live request · uses 4 credits

Example responses

Switch tabs to see the body shape for success and each error status.

{
  "data": {
    "username": "nike",
    "posts_analyzed": 30,
    "timezone_offset": -5,
    "best_hours": [
      {
        "hour": 18,
        "posts": 6,
        "avg_engagement": 521340
      }
    ],
    "best_days": [
      {
        "day": "Thursday",
        "posts": 5,
        "avg_engagement": 498120
      }
    ],
    "recommendation": "Thursday around 18:00 (UTC-5)",
    "by_hour": [
      {
        "hour": 18,
        "posts": 6,
        "avg_engagement": 521340
      }
    ],
    "by_day": [
      {
        "day": "Thursday",
        "posts": 5,
        "avg_engagement": 498120
      }
    ]
  },
  "meta": {
    "endpoint": "insights/profile/best-time",
    "request_id": "req_3f8a1c9e",
    "credits_charged": 4,
    "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.

FieldTypeDescription
usernamestringThe account's @handle.
posts_analyzednumberHow many recent posts were analyzed.
timezone_offsetnumberUTC offset (hours) used to localize the hour/day buckets.
best_hoursarray<object>Top hours to post, ranked by average engagement.
best_hours[].hournumberHour of day (0–23) in the requested timezone.
best_hours[].postsnumberNumber of analyzed posts that fell in this bucket.
best_hours[].avg_engagementnumberAverage interactions (likes + comments) for posts in this bucket.
best_daysarray<object>Top weekdays to post, ranked by average engagement.
best_days[].daystringWeekday name.
best_days[].postsnumberNumber of analyzed posts that fell in this bucket.
best_days[].avg_engagementnumberAverage interactions (likes + comments) for posts in this bucket.
recommendationstringPlain-English summary of the single best time to post.
by_hourarray<object>Engagement broken down by hour of day.
by_hour[].hournumberHour of day (0–23) in the requested timezone.
by_hour[].postsnumberNumber of analyzed posts that fell in this bucket.
by_hour[].avg_engagementnumberAverage interactions (likes + comments) for posts in this bucket.
by_dayarray<object>Engagement broken down by weekday.
by_day[].daystringWeekday name.
by_day[].postsnumberNumber of analyzed posts that fell in this bucket.
by_day[].avg_engagementnumberAverage interactions (likes + comments) for posts in this bucket.