TikTok following API
  1. TikTok
  2. TikTok following API

TikTok following API

The accounts a creator follows, each with its name, avatar, bio, verified flag and follower, following, video and like counts.

GET /v1/tiktok/profile/following

GET /v1/tiktok/profile/following

The accounts a creator follows, each with its name, avatar, bio, verified flag and follower, following, video and like counts. A page holds 30 accounts; follow cursor for more. parent is the creator's profile. A creator who hides the list, and a private account, answer private (TikTok lets a creator keep the list to themselves, so many large accounts do).

  • Cost: 1 credit
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
handlestringone ofUsername, with or without the leading @. Also accepted as username.
idstringone ofTikTok user id (numeric) or secUid. Also accepted as user_id, secUid, sec_uid.

Send at least one of handle, id. If you send several, the first listed is used and the rest are ignored.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).

Example request#

Set your key in the environment first (see Authentication).

1curl -G "https://api.socialscrape.dev/v1/tiktok/profile/following" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3  --data-urlencode "handle=nasa"

Example response#

This is a sample from a recorded response, lists and long text are shortened, other people's names and handles are replaced. Status 200.

200 OKSample response
1{2  "ok": true,3  "credits_charged": 1,4  "credits_remaining": 4999,5  "cached": false,6  "cached_at": null,7  "request_id": "req_9249fa14ca9f5220b5265805",8  "data": {9    "object": "list",10    "items": [11      {12        "object": "profile",13        "platform": "tiktok",14        "id": "1000000001",15        "handle": "sample_user",16        "name": "Sample User",17        "headline": null,18        "url": null,19        "kind": "creator",20        "bio": null,21        "avatar_url": null,22        "banner_url": null,23        "verified": true,24        "is_private": false,25        "external_url": null,26        "links": null,27        "location": null,28        "category": null,29        "created_at": null,30        "stats": {31          "followers": 120700,32          "following": 73,33          "posts": 202,34          "likes": 1300000,35          "views": null36        },37        "extra": {38          "comment_setting": 0,39          "download_setting": 0,40          "duet_setting": 0,41          "friends": 0,42          "is_tiktok_seller": false,43          "sec_uid": "MS4wLjABAAAA927o3zHxfudDnim6_JtQO_vF1GB-xC39hrvp-FoDJp-vuypAjyURRyogMfKKsJY0",44          "stitch_setting": 045        }46      },47      {48        "object": "profile",49        "platform": "tiktok",50        "id": "1000000001",51        "handle": "sample_user",52        "name": "Sample User",53        "headline": null,54        "url": null,55        "kind": "creator",56        "bio": null,57        "avatar_url": null,58        "banner_url": null,59        "verified": true,60        "is_private": false,61        "external_url": null,62        "links": null,63        "location": null,64        "category": null,65        "created_at": null,66        "stats": {67          "followers": 4000000,68          "following": 3,69          "posts": 484,70          "likes": 58000000,71          "views": null72        },73        "extra": {74          "comment_setting": 0,75          "download_setting": 3,76          "duet_setting": 0,77          "friends": 0,78          "is_tiktok_seller": false,79          "sec_uid": "MS4wLjABAAAA_koFVCM4NeoOqAdo46YE-YwasHf8k6peh1lA9Unpsu5_ruMz1dQwk3_4LfQ4RvUm",80          "stitch_setting": 081        }82      }83    ],84    "cursor": null,85    "has_more": false,86    "parent": {87      "object": "profile",88      "platform": "tiktok",89      "id": "1000000001",90      "handle": "sample_user",91      "name": "Sample User",92      "headline": null,93      "url": null,94      "kind": "creator",95      "bio": null,96      "avatar_url": null,97      "banner_url": null,98      "verified": true,99      "is_private": false,100      "external_url": null,101      "links": null,102      "location": null,103      "category": null,104      "created_at": null,105      "stats": {106        "followers": 2171299,107        "following": 23,108        "posts": 65,109        "likes": 11638237,110        "views": null111      },112      "extra": {113        "comment_setting": 0,114        "download_setting": 0,115        "duet_setting": 0,116        "following_visible": true,117        "friends": 17,118        "is_commerce_user": false,119        "is_tiktok_seller": false,120        "sec_uid": "MS4wLjABAAAAU9BRVzC8oCaegVnia8IbqWhPb_-dbU7s00Y3wS1_Nx8g5RUaYvyXrpejgjdxTwd6",121        "stitch_setting": 0122      }123    }124  },125  "cursor": null,126  "has_more": false127}

Response#

A list of Profile objects in data.items, with data.cursor and data.has_more.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
not_found404noThe platform says this profile, post or item does not exist.
private403noThe content is private.

Every request can also fail with the account and platform errors listed on the Errors page.

Example error:

1{2  "ok": false,3  "error": {4    "code": "private",5    "message": "The content is private.",6    "retryable": false7  },8  "credits_charged": 0,9  "request_id": "req_e9862f1328418e4c69460664"10}

Also served at#

These paths answer the same request, so code written for other APIs keeps working: /v1/tiktok/user/following. See Switching from ScrapeCreators.