Skip to content

User Analytics

GET/v1/instagram/user/analytics1 credit

Computes an account's engagement from its profile and recent posts: average and median likes, comments and reel views, engagement rates by followers and by views, and how often it posts, with the sample size and window.

01Query parameters

NameTypeDescription
handlerequiredstringInstagram username (a leading `@` or a profile URL also works).
postsoptionalintegerHow many recent posts to sample, 1 to 50. Views are reel play counts and come from the 12 newest posts only.Default: 12
tzoptionalstringIANA time zone the `posting_times` weekdays and hours are read in, e.g. `Europe/Istanbul` or `America/New_York`. Daylight saving time follows each post's own date. Any other value is a free 400.Default: UTC

02Pricing

1 credit per page read: the profile carries the 12 newest posts (1 credit), and each further page of 12 costs 1 more. Sometimes the first page has to be read again to reach the second, which adds 1. The most a request can cost (⌈posts/12⌉ + 1) must be in your balance; only the pages actually read are charged, and nothing on failure.

03Request

curl "https://api.scrapesocial.ai/v1/instagram/user/analytics?handle=natgeo&tz=Europe%2FIstanbul" \
  -H "x-api-key: $SCRAPESOCIAL_KEY"

04Responses

Real answers from the API. Lists are shortened to 2 items.

GET /v1/instagram/user/analytics?handle=natgeo&tz=Europe/Istanbul

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "platform": "instagram",
  "owner": {
    "id": "787132",
    "username": "natgeo",
    "display_name": "National Geographic"
  },
  "followers": 268287565,
  "sample": {
    "posts": 9,
    "from": "2026-10-22T21:00:10Z",
    "to": "2026-10-25T17:02:48Z",
    "posts_read": 12,
    "pinned_excluded": 3,
    "reposts_excluded": 0
  },
  "likes": {
    "posts": 9,
    "missing": 0,
    "total": 724324,
    "average": 80480.44,
    "median": 36046
  },
  "comments": {
    "posts": 9,
    "missing": 0,
    "total": 1659,
    "average": 184.33,
    "median": 126
  },
  "views": {
    "posts": 6,
    "missing": 3,
    "total": 10648281,
    "average": 1774713.5,
    "median": 971656.5
  },
  "engagement_rate_by_followers": 0.0301,
  "engagement_rate_by_views": 4.9266,
  "posts_per_week": 19.75,
  "posting_times": {
    "timezone": "Europe/Istanbul",
    "metric": "engagement",
    "posts": 9,
    "by_weekday": [
      {
        "weekday": "monday",
        "posts": 0,
        "average_engagement": null
      },
      {
        "weekday": "tuesday",
        "posts": 0,
        "average_engagement": null
      }
    ],
    "by_hour": [
      {
        "hour": 0,
        "posts": 2,
        "average_engagement": 178210
      },
      {
        "hour": 1,
        "posts": 0,
        "average_engagement": null
      }
    ],
    "best_weekday": "sunday",
    "best_hour": 0,
    "best_slot": null,
    "min_posts": 2
  },
  "formula_version": 2,
  "formulas": {
    "average": "total / posts, over the sampled posts that have the value",
    "median": "the middle value of the sampled posts that have the value; the mean of the two middle values when their number is even",
    "engagement_rate_by_followers": "100 * average(likes + comments) / followers, over the sampled posts whose likes and comments are both known; null when followers is 0 or unknown",
    "engagement_rate_by_views": "100 * sum(likes + comments) / sum(views), over the sampled posts whose likes, comments and views are all known; null when that sum of views is 0",
    "posts_per_week": "(sample.posts - 1) / ((sample.to - sample.from) in days / 7); null with fewer than 2 posts or when they share one timestamp",
    "posting_times": "engagement = likes + comments of each sampled post whose likes, comments and exact time are known (a time worked back from \"3 weeks ago\" is not); each such post counts in its weekday, its hour and its weekday's 3-hour slot (00-03, 03-06, ... 21-24) in the asked time zone; average_engagement = total engagement / posts of the bucket, null without posts; best_weekday, best_hour, best_slot = the highe…"
  }
}

Common to every endpoint

Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.

GET /v1/cosmos/profile?handle=design

{
  "success": false,
  "message": "Invalid API key"
}

05Notes

Our own endpoint: ScrapeCreators has no analytics route. The answer: `platform`, `owner` (`id`, `username`, `display_name`), `followers`, `sample` (`posts`, `from`, `to` in ISO 8601 UTC, `posts_read`, `pinned_excluded`, `reposts_excluded`), `likes`, `comments` and `views` (each `posts`, `missing`, `total`, `average`, `median`), `engagement_rate_by_followers` = 100 × average(likes + comments) / followers, `engagement_rate_by_views` = 100 × sum(likes + comments) / sum(views), `posts_per_week`, `formula_version` and `formulas` (every formula as text). Pinned posts and reposts are left out of the sample. A count the platform does not give (hidden likes, a photo's views) is left out and counted in `missing`, never taken as 0; a rate is `null` when followers or views are 0 or unknown. An account without posts answers its profile with an empty sample. Instagram does not mark pinned posts for logged-out viewers; posts listed first but older than a later one are treated as pinned. A private account is a free 403, an unknown one a free 404. `posting_times` (formula_version 2) says when the sampled posts drew the most engagement, in the time zone `tz` names, from the same posts at no extra cost: `timezone`, `metric` (`engagement` = likes + comments of a post), `posts` (the sampled posts with both counts and a time), `by_weekday` (Monday to Sunday) and `by_hour` (0 to 23), each item with `posts` and `average_engagement` (null without posts), then `best_weekday`, `best_hour` and `best_slot` (`weekday`, `hour_from`, `hour_to`: one of the fixed 3-hour windows 00–03 … 21–24) and `min_posts`. The best bucket has the highest average among those with at least `min_posts` (2) posts; a tie goes to the bucket with more posts, then to the earlier one; null when none has enough. There is no weekday-by-hour grid: 168 cells for 12 to 50 posts would describe single posts. A sample this small is a hint, not a schedule.

06Errors & credits

Every error has success: false, a real HTTP status and costs no credits.

  • 400missing_parameter

    A required parameter is missing or invalid.

  • 403private_account

    The account is private or age-restricted.

  • 404not_found

    No such account.

  • 503upstream_error

    The platform did not answer; retry shortly.