Skip to content

User Analytics

GET/v1/tiktok/user/analytics3 credits

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

01Query parameters

NameTypeDescription
handlerequiredstringTikTok username (a leading `@` also works).
postsoptionalintegerHow many recent posts to sample, 1 to 50. Pinned videos are left out.Default: 20
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 for the profile plus 1 per page of 10 videos read: 3 credits for the default 20 videos. The most a request can cost (1 + ⌈posts/10⌉) must be in your balance; a list that ends early costs less, and nothing is charged on failure.

03Request

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

04Responses

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

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

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 3,
  "platform": "tiktok",
  "owner": {
    "id": "107955",
    "username": "tiktok",
    "display_name": "TikTok"
  },
  "followers": 96441362,
  "sample": {
    "posts": 20,
    "from": "2026-08-20T15:22:21Z",
    "to": "2026-10-23T23:29:02Z",
    "posts_read": 20,
    "pinned_excluded": 0,
    "reposts_excluded": 0
  },
  "likes": {
    "posts": 20,
    "missing": 0,
    "total": 369571,
    "average": 18478.55,
    "median": 14800
  },
  "comments": {
    "posts": 20,
    "missing": 0,
    "total": 54778,
    "average": 2738.9,
    "median": 2472.5
  },
  "views": {
    "posts": 20,
    "missing": 0,
    "total": 10417000,
    "average": 520850,
    "median": 497900
  },
  "engagement_rate_by_followers": 0.022,
  "engagement_rate_by_views": 4.0736,
  "posts_per_week": 2.07,
  "posting_times": {
    "timezone": "Europe/Istanbul",
    "metric": "engagement",
    "posts": 20,
    "by_weekday": [
      {
        "weekday": "monday",
        "posts": 1,
        "average_engagement": 22016
      },
      {
        "weekday": "tuesday",
        "posts": 3,
        "average_engagement": 12856
      }
    ],
    "by_hour": [
      {
        "hour": 0,
        "posts": 1,
        "average_engagement": 15278
      },
      {
        "hour": 1,
        "posts": 1,
        "average_engagement": 21384
      }
    ],
    "best_weekday": "wednesday",
    "best_hour": 20,
    "best_slot": {
      "weekday": "thursday",
      "hour_from": 18,
      "hour_to": 21
    },
    "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. TikTok's web counts above 10,000 likes or plays are rounded to the hundred. 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.