curl --request GET \
--url https://api.scraperize.com/v1/tiktok/profile \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/tiktok/profile"
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/profile', 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/profile",
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/profile"
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/profile")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/tiktok/profile")
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": "127905465618821121",
"secUid": "MS4wLjABAAAAwAg0rSzO65WQfz4RzQgGv2Xdv108BgPXhRrrmNVIHQZ9PO8-flwwRtEppYTS0OjA",
"handle": "khaby.lame",
"url": "https://www.tiktok.com/@khaby.lame",
"nickname": "Khabane lame",
"bio": "Se vuoi ridere sei nel posto giusto😎 If u wanna laugh u r in the right place😎",
"bioLink": null,
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=b1663fd5&x-expires=1791381600&x-signature=ubxmRlSLaZrwcOyNvPFj9vaOuqM%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatarUrls": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=b1663fd5&x-expires=1791381600&x-signature=ubxmRlSLaZrwcOyNvPFj9vaOuqM%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=73ffa012&x-expires=1791381600&x-signature=w%2BAMaunTwS1W2qA7ObjMu9yNJRQ%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=595c67c5&x-expires=1791381600&x-signature=Z%2BwHZW93J0WX5GncZ6RUa%2FY0%2F1s%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"createdAt": "2016-08-10T22:02:34.000Z",
"nicknameUpdatedAt": null,
"verified": true,
"privateAccount": false,
"secret": false,
"isOrganization": false,
"ttSeller": false,
"commerceUserInfo": {
"commerceUser": false,
"category": null,
"categoryButton": false,
"downloadLink": {
"android": null,
"ios": null
}
},
"ftc": false,
"isADVirtual": false,
"language": "en",
"liveRoomId": null,
"openFavorite": false,
"relation": 0,
"uniqueIdModifyTime": null,
"followingVisibility": 1,
"isEmbedBanned": false,
"canExpPlaylist": true,
"profileEmbedPermission": 1,
"suggestAccountBind": false,
"userStoryStatus": 0,
"recommendReason": null,
"nowInvitationCardUrl": null,
"tabs": {
"music": false,
"questions": false,
"playlists": false
},
"settings": {
"comment": 0,
"duet": 0,
"stitch": 0,
"download": 0
},
"stats": {
"followerCount": 162999391,
"followingCount": 81,
"likeCount": 2685535182,
"videoCount": 1357,
"friendCount": 77
},
"liveEvents": []
},
"fetchedAt": "2026-10-05T14:44:08.924Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"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"
}
}Profile
Fetches a public TikTok profile by username (handle) or numeric user id (userId) — pass exactly one. Returns identity (ids, username, nickname, bio, bio link, avatars, created date), badges and account type (verified, private, organization, business category, TikTok Shop seller), exact stats (followers, following, likes, videos, friends), the LIVE room id and upcoming LIVE events, visible profile tabs and interaction settings.
curl --request GET \
--url https://api.scraperize.com/v1/tiktok/profile \
--header 'x-api-key: <api-key>'import requests
url = "https://api.scraperize.com/v1/tiktok/profile"
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/profile', 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/profile",
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/profile"
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/profile")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scraperize.com/v1/tiktok/profile")
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": "127905465618821121",
"secUid": "MS4wLjABAAAAwAg0rSzO65WQfz4RzQgGv2Xdv108BgPXhRrrmNVIHQZ9PO8-flwwRtEppYTS0OjA",
"handle": "khaby.lame",
"url": "https://www.tiktok.com/@khaby.lame",
"nickname": "Khabane lame",
"bio": "Se vuoi ridere sei nel posto giusto😎 If u wanna laugh u r in the right place😎",
"bioLink": null,
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=b1663fd5&x-expires=1791381600&x-signature=ubxmRlSLaZrwcOyNvPFj9vaOuqM%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"avatarUrls": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=b1663fd5&x-expires=1791381600&x-signature=ubxmRlSLaZrwcOyNvPFj9vaOuqM%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=73ffa012&x-expires=1791381600&x-signature=w%2BAMaunTwS1W2qA7ObjMu9yNJRQ%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2",
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=595c67c5&x-expires=1791381600&x-signature=Z%2BwHZW93J0WX5GncZ6RUa%2FY0%2F1s%3D&t=4d5b0474&ps=13740610&shp=a5d48078&shcp=81f88b70&idc=my2"
},
"createdAt": "2016-08-10T22:02:34.000Z",
"nicknameUpdatedAt": null,
"verified": true,
"privateAccount": false,
"secret": false,
"isOrganization": false,
"ttSeller": false,
"commerceUserInfo": {
"commerceUser": false,
"category": null,
"categoryButton": false,
"downloadLink": {
"android": null,
"ios": null
}
},
"ftc": false,
"isADVirtual": false,
"language": "en",
"liveRoomId": null,
"openFavorite": false,
"relation": 0,
"uniqueIdModifyTime": null,
"followingVisibility": 1,
"isEmbedBanned": false,
"canExpPlaylist": true,
"profileEmbedPermission": 1,
"suggestAccountBind": false,
"userStoryStatus": 0,
"recommendReason": null,
"nowInvitationCardUrl": null,
"tabs": {
"music": false,
"questions": false,
"playlists": false
},
"settings": {
"comment": 0,
"duet": 0,
"stitch": 0,
"download": 0
},
"stats": {
"followerCount": 162999391,
"followingCount": 81,
"likeCount": 2685535182,
"videoCount": 1357,
"friendCount": 77
},
"liveEvents": []
},
"fetchedAt": "2026-10-05T14:44:08.924Z"
},
"meta": {
"requestId": "req_8f0c2b7e-1a2b-4c3d-9e8f-0a1b2c3d4e5f",
"creditsCharged": 1,
"creditsRemaining": 4999,
"cached": false
}
}{
"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/profile. Here are the details:
Endpoint: GET https://api.scraperize.com/v1/tiktok/profile
Description: Fetches a public TikTok profile by username (`handle`) or numeric user id (`userId`) — pass exactly one. Returns identity (ids, username, nickname, bio, bio link, avatars, created date), badges and account type (verified, private, organization, business category, TikTok Shop seller), exact stats (followers, following, likes, videos, friends), the LIVE room id and upcoming LIVE events, visible profile tabs and interaction settings.
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.
- 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": "127905465618821121",
"secUid": "MS4wLjABAAAAwAg0rSzO65WQfz4RzQgGv2Xdv108BgPXhRrrmNVIHQZ9PO8-flwwRtEppYTS0OjA",
"handle": "khaby.lame",
"url": "https://www.tiktok.com/@khaby.lame",
"nickname": "Khabane lame",
"bio": "Se vuoi ridere sei nel posto giusto😎 If u wanna laugh u r in the right place😎",
"bioLink": null,
"avatarUrl": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=b1663fd…",
"avatarUrls": {
"large": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:1080:1080.jpeg?dr=14579&refresh_token=b1663fd…",
"medium": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:720:720.jpeg?dr=14579&refresh_token=73ffa012&…",
"thumb": "https://p16-common-sign.tiktokcdn.com/tos-maliva-avt-0068/08987e23b94057953fd4f1738694bf5f~tplv-tiktokx-cropcenter:100:100.jpeg?dr=14579&refresh_token=595c67c5&…"
},
"createdAt": "2016-08-10T22:02:34.000Z",
"nicknameUpdatedAt": null,
"verified": true,
"privateAccount": false,
"secret": false,
"isOrganization": false,
"ttSeller": false,
"commerceUserInfo": {
"commerceUser": false,
"category": null,
"categoryButton": false,
"downloadLink": {
"android": null,
"ios": null
}
},
"ftc": false,
"isADVirtual": false,
"language": "en",
"liveRoomId": null,
"openFavorite": false,
"relation": 0,
"uniqueIdModifyTime": null,
"followingVisibility": 1,
"isEmbedBanned": false,
"canExpPlaylist": true,
"profileEmbedPermission": 1,
"suggestAccountBind": false,
"userStoryStatus": 0,
"recommendReason": null,
"nowInvitationCardUrl": null,
"tabs": {
"music": false,
"questions": false,
"playlists": false
},
"settings": {
"comment": 0,
"duet": 0,
"stitch": 0,
"download": 0
},
"stats": {
"followerCount": 162999391,
"followingCount": 81,
"likeCount": 2685535182,
"videoCount": 1357,
"friendCount": 77
},
"liveEvents": []
},
"fetchedAt": "2026-10-05T14:44:08.924Z"
},
"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}$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