curl --request GET \
--url https://api.scraperize.com/v1/tiktok/user/following \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/tiktok/user/following"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraperize.com/v1/tiktok/user/following', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraperize.com/v1/tiktok/user/following",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraperize.com/v1/tiktok/user/following"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraperize.com/v1/tiktok/user/following")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/tiktok/user/following")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"profile": {
"id": "6780344874811442181",
"secUid": "MS4wLjABAAAAEf96k3JW8-3eOhgzgQswlFF6ZDnn1dzqWWorJjwDsiNZymqTtvOcFhp_RiYYST6s",
"handle": "natgeo",
"nickname": "National Geographic",
"url": "https://www.tiktok.com/@natgeo",
"followingCount": 62
},
"following": [
{
"id": "7666106259686999053",
"secUid": "MS4wLjABAAAA5o3uVXuYEDPS9fCjxRRvatYyP9tj_XB1ah919FFzbjQKMVEEeJljIuph4E9G1Njb",
"handle": "natgeofamily",
"nickname": "National Geographic Family",
"bio": "Inspiring wonder and curiosity for families around the world 💛",
"url": "https://www.tiktok.com/@natgeofamily",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=677349bf&x-expires=1791381600&x-signature=9qHka9kGfGyFESHoribIKaeQQNg%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatars": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=677349bf&x-expires=1791381600&x-signature=9qHka9kGfGyFESHoribIKaeQQNg%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=dfd19433&x-expires=1791381600&x-signature=EIi8wXnTo439CuhXi21uBs9LCDQ%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=92a3083c&x-expires=1791381600&x-signature=Jo00fzV%2FdXfGyeFCcYfOxvqdSys%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"verified": false,
"privateAccount": false,
"secret": false,
"ttSeller": false,
"openFavorite": false,
"downloadSetting": 0,
"ftc": false,
"isADVirtual": false,
"stats": {
"followerCount": 26124,
"followingCount": 4,
"likeCount": 751896,
"videoCount": 66,
"friendCount": 0,
"diggCount": 1
}
},
{
"id": "6731478322289017861",
"secUid": "MS4wLjABAAAARTs2ekApcsgbxqAtO7aSrDIMKmr2P8iuKw6H9eJrAGaeBdDdnTImZolfqYUYaXxf",
"handle": "izzy_observes",
"nickname": "Izzy | Brooklyn Mom",
"bio": "Wildly specific parenting analogies nobody asked for. \n\n2 under 2📍Brooklyn, NYC \n💌 hello@izzyparkinson.com",
"url": "https://www.tiktok.com/@izzy_observes",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b906028bfb5f919e59eeba5daa860b4b~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=176ddb9a&x-expires=1791381600&x-signature=odofL%2BvtO%2BBNQj4%2BY%2F8i6VfS9RA%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatars": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b906028bfb5f919e59eeba5daa860b4b~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=176ddb9a&x-expires=1791381600&x-signature=odofL%2BvtO%2BBNQj4%2BY%2F8i6VfS9RA%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b906028bfb5f919e59eeba5daa860b4b~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=778705fc&x-expires=1791381600&x-signature=3iuaIcHwR9IHiAQQ5dYF9FtrPBs%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"thumb": "https://p19-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b906028bfb5f919e59eeba5daa860b4b~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=51ef9a76&x-expires=1791381600&x-signature=fCuP49lOZM937PZXp0HZHvVTGeE%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"verified": false,
"privateAccount": false,
"secret": false,
"ttSeller": false,
"openFavorite": false,
"downloadSetting": 0,
"ftc": false,
"isADVirtual": false,
"stats": {
"followerCount": 1122,
"followingCount": 576,
"likeCount": 23883,
"videoCount": 59,
"friendCount": 0,
"diggCount": 30739
}
},
{
"id": "7436814248929870894",
"secUid": "MS4wLjABAAAAvjgM4eDBwBZ6H4hsXxuuuW-s08UgH9ltoYeksxshSxkEdf9_n5CmQ4_FQbDe2zWN",
"handle": "natgeotravel",
"nickname": "National Geographic Travel",
"bio": "Journey across our big, wondrous world with National Geographic.",
"url": "https://www.tiktok.com/@natgeotravel",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/23d3efb03852f1450c6d34e21ed6953b~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=deeae811&x-expires=1791381600&x-signature=uYstW2bSigmbCCMJHgCSYO8wu7Y%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatars": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/23d3efb03852f1450c6d34e21ed6953b~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=deeae811&x-expires=1791381600&x-signature=uYstW2bSigmbCCMJHgCSYO8wu7Y%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/23d3efb03852f1450c6d34e21ed6953b~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=22a6a50e&x-expires=1791381600&x-signature=9zJtIvyPmNWr%2B3CIq%2BvvTCrBVDo%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/23d3efb03852f1450c6d34e21ed6953b~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=460ee3df&x-expires=1791381600&x-signature=zK4kmVeKTGo3My48VQ94AtvbAt4%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"verified": true,
"privateAccount": false,
"secret": false,
"ttSeller": false,
"openFavorite": false,
"downloadSetting": 3,
"ftc": false,
"isADVirtual": false,
"stats": {
"followerCount": 38289,
"followingCount": 3,
"likeCount": 128255,
"videoCount": 110,
"friendCount": 0,
"diggCount": 542
}
}
],
"count": 30,
"total": 62,
"cursor": "1659024187",
"hasMore": true,
"fetchedAt": "2026-10-05T14:45:16.975Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request was invalid.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required — pass it in the `x-api-key` header.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This request costs 1 credit, but your balance is 0. Top up to continue.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested content was not found (it may not exist, be deleted, or be private).",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"details": [
{
"path": "url",
"message": "Required"
}
]
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded — max 100 requests per 60s. Retry in ~30s.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UPSTREAM_BLOCKED",
"message": "The source is temporarily unavailable. Please try again shortly.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}Following
Scrapes the accounts a public TikTok user follows, by username (handle) or numeric user id (userId) — pass exactly one — 30 per page, most recently followed first. Each account comes with its user id and secUid, username, nickname, bio, profile link, avatars (three sizes), verified / private / TikTok Shop seller flags, whether its liked videos are public, and exact stats (followers, following, likes, videos, friends, videos liked). Pass the returned cursor (with the same handle / userId) to get the next page; it is null on the last page. Private accounts, and accounts that hide who they follow, return 404.
curl --request GET \
--url https://api.scraperize.com/v1/tiktok/user/following \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/tiktok/user/following"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.scraperize.com/v1/tiktok/user/following', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scraperize.com/v1/tiktok/user/following",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scraperize.com/v1/tiktok/user/following"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scraperize.com/v1/tiktok/user/following")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/tiktok/user/following")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"profile": {
"id": "6780344874811442181",
"secUid": "MS4wLjABAAAAEf96k3JW8-3eOhgzgQswlFF6ZDnn1dzqWWorJjwDsiNZymqTtvOcFhp_RiYYST6s",
"handle": "natgeo",
"nickname": "National Geographic",
"url": "https://www.tiktok.com/@natgeo",
"followingCount": 62
},
"following": [
{
"id": "7666106259686999053",
"secUid": "MS4wLjABAAAA5o3uVXuYEDPS9fCjxRRvatYyP9tj_XB1ah919FFzbjQKMVEEeJljIuph4E9G1Njb",
"handle": "natgeofamily",
"nickname": "National Geographic Family",
"bio": "Inspiring wonder and curiosity for families around the world 💛",
"url": "https://www.tiktok.com/@natgeofamily",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=677349bf&x-expires=1791381600&x-signature=9qHka9kGfGyFESHoribIKaeQQNg%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatars": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=677349bf&x-expires=1791381600&x-signature=9qHka9kGfGyFESHoribIKaeQQNg%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=dfd19433&x-expires=1791381600&x-signature=EIi8wXnTo439CuhXi21uBs9LCDQ%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=92a3083c&x-expires=1791381600&x-signature=Jo00fzV%2FdXfGyeFCcYfOxvqdSys%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"verified": false,
"privateAccount": false,
"secret": false,
"ttSeller": false,
"openFavorite": false,
"downloadSetting": 0,
"ftc": false,
"isADVirtual": false,
"stats": {
"followerCount": 26124,
"followingCount": 4,
"likeCount": 751896,
"videoCount": 66,
"friendCount": 0,
"diggCount": 1
}
},
{
"id": "6731478322289017861",
"secUid": "MS4wLjABAAAARTs2ekApcsgbxqAtO7aSrDIMKmr2P8iuKw6H9eJrAGaeBdDdnTImZolfqYUYaXxf",
"handle": "izzy_observes",
"nickname": "Izzy | Brooklyn Mom",
"bio": "Wildly specific parenting analogies nobody asked for. \n\n2 under 2📍Brooklyn, NYC \n💌 hello@izzyparkinson.com",
"url": "https://www.tiktok.com/@izzy_observes",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b906028bfb5f919e59eeba5daa860b4b~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=176ddb9a&x-expires=1791381600&x-signature=odofL%2BvtO%2BBNQj4%2BY%2F8i6VfS9RA%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatars": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b906028bfb5f919e59eeba5daa860b4b~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=176ddb9a&x-expires=1791381600&x-signature=odofL%2BvtO%2BBNQj4%2BY%2F8i6VfS9RA%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b906028bfb5f919e59eeba5daa860b4b~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=778705fc&x-expires=1791381600&x-signature=3iuaIcHwR9IHiAQQ5dYF9FtrPBs%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"thumb": "https://p19-common-sign.tiktokcdn.com/tos-maliva-avt-0068/b906028bfb5f919e59eeba5daa860b4b~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=51ef9a76&x-expires=1791381600&x-signature=fCuP49lOZM937PZXp0HZHvVTGeE%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"verified": false,
"privateAccount": false,
"secret": false,
"ttSeller": false,
"openFavorite": false,
"downloadSetting": 0,
"ftc": false,
"isADVirtual": false,
"stats": {
"followerCount": 1122,
"followingCount": 576,
"likeCount": 23883,
"videoCount": 59,
"friendCount": 0,
"diggCount": 30739
}
},
{
"id": "7436814248929870894",
"secUid": "MS4wLjABAAAAvjgM4eDBwBZ6H4hsXxuuuW-s08UgH9ltoYeksxshSxkEdf9_n5CmQ4_FQbDe2zWN",
"handle": "natgeotravel",
"nickname": "National Geographic Travel",
"bio": "Journey across our big, wondrous world with National Geographic.",
"url": "https://www.tiktok.com/@natgeotravel",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/23d3efb03852f1450c6d34e21ed6953b~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=deeae811&x-expires=1791381600&x-signature=uYstW2bSigmbCCMJHgCSYO8wu7Y%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatars": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/23d3efb03852f1450c6d34e21ed6953b~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=deeae811&x-expires=1791381600&x-signature=uYstW2bSigmbCCMJHgCSYO8wu7Y%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/23d3efb03852f1450c6d34e21ed6953b~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=22a6a50e&x-expires=1791381600&x-signature=9zJtIvyPmNWr%2B3CIq%2BvvTCrBVDo%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/23d3efb03852f1450c6d34e21ed6953b~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=460ee3df&x-expires=1791381600&x-signature=zK4kmVeKTGo3My48VQ94AtvbAt4%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"verified": true,
"privateAccount": false,
"secret": false,
"ttSeller": false,
"openFavorite": false,
"downloadSetting": 3,
"ftc": false,
"isADVirtual": false,
"stats": {
"followerCount": 38289,
"followingCount": 3,
"likeCount": 128255,
"videoCount": 110,
"friendCount": 0,
"diggCount": 542
}
}
],
"count": 30,
"total": 62,
"cursor": "1659024187",
"hasMore": true,
"fetchedAt": "2026-10-05T14:45:16.975Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request was invalid.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required — pass it in the `x-api-key` header.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This request costs 1 credit, but your balance is 0. Top up to continue.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested content was not found (it may not exist, be deleted, or be private).",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"details": [
{
"path": "url",
"message": "Required"
}
]
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded — max 100 requests per 60s. Retry in ~30s.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}{
"error": {
"code": "UPSTREAM_BLOCKED",
"message": "The source is temporarily unavailable. Please try again shortly.",
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f"
}
}cache_max_age) are free.Copy for AI assistant
Copy for AI assistant
I want to make an API call to /v1/tiktok/user/following. Here are the details:
Endpoint: GET https://api.scraperize.com/v1/tiktok/user/following
Description: Scrapes the accounts a public TikTok user follows, by username (`handle`) or numeric user id (`userId`) — pass exactly one — 30 per page, most recently followed first. Each account comes with its user id and secUid, username, nickname, bio, profile link, avatars (three sizes), verified / private / TikTok Shop seller flags, whether its liked videos are public, and exact stats (followers, following, likes, videos, friends, videos liked). Pass the returned `cursor` (with the same handle / userId) to get the next page; it is null on the last page. Private accounts, and accounts that hide who they follow, return 404.
Required Headers:
- x-api-key: Your API key
Parameters:
- handle (string): The TikTok username (with or without a leading @, or a tiktok.com/@username URL). Provide this or `userId`, not both.
- userId (string): The TikTok account's numeric user id. Provide this or `handle`, not both.
- cursor (string): The `cursor` from the previous response, to get the next page. Omit for the first page.
- cache_max_age (select): Optional. Return a cached result if one this age or newer exists — served for **0 credits** with `meta.cached=true` and `meta.cachedAt`. Otherwise a fresh scrape runs (**1 credit**) and refreshes the cache. Omit to always scrape fresh.
Example Response:
{
"data": {
"profile": {
"id": "6780344874811442181",
"secUid": "MS4wLjABAAAAEf96k3JW8-3eOhgzgQswlFF6ZDnn1dzqWWorJjwDsiNZymqTtvOcFhp_RiYYST6s",
"handle": "natgeo",
"nickname": "National Geographic",
"url": "https://www.tiktok.com/@natgeo",
"followingCount": 62
},
"following": [
{
"id": "7666106259686999053",
"secUid": "MS4wLjABAAAA5o3uVXuYEDPS9fCjxRRvatYyP9tj_XB1ah919FFzbjQKMVEEeJljIuph4E9G1Njb",
"handle": "natgeofamily",
"nickname": "National Geographic Family",
"bio": "Inspiring wonder and curiosity for families around the world 💛",
"url": "https://www.tiktok.com/@natgeofamily",
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=677349b…",
"avatars": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=677349b…",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=dfd19433&…",
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/e72d2db948c77f1133404642a13189b4~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=92a3083c&…"
},
"verified": false,
"privateAccount": false,
"secret": false,
"ttSeller": false,
"openFavorite": false,
"downloadSetting": 0,
"ftc": false,
"isADVirtual": false,
"stats": {
"followerCount": 26124,
"followingCount": 4,
"likeCount": 751896,
"videoCount": 66,
"friendCount": 0,
"diggCount": 1
}
}
],
"count": 30,
"total": 62,
"cursor": "1659024187",
"hasMore": true,
"fetchedAt": "2026-10-05T14:45:16.975Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}
Please help me write code in my preferred programming language to make this API call and handle the response appropriately. Include error handling and best practices.
Authorizations
Your API key. Send it in the x-api-key header (or Authorization: Bearer <key>). Create and manage keys from your dashboard.
Query Parameters
The TikTok username (with or without a leading @, or a tiktok.com/@username URL). Provide this or userId, not both.
The TikTok account's numeric user id. Provide this or handle, not both.
^\d{1,20}$The cursor from the previous response, to get the next page. Omit for the first page.
^\d{1,13}$Optional. Return a cached result if one this age or newer exists — served for 0 credits with meta.cached=true and meta.cachedAt. Otherwise a fresh scrape runs (1 credit) and refreshes the cache. Omit to always scrape fresh.
1d, 3d, 7d, 14d, 30d