Get User Info by ID
curl --request GET \
--url https://tiktok-api23.p.rapidapi.com/api/user/info-by-id \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://tiktok-api23.p.rapidapi.com/api/user/info-by-id"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://tiktok-api23.p.rapidapi.com/api/user/info-by-id', 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://tiktok-api23.p.rapidapi.com/api/user/info-by-id",
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-rapidapi-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://tiktok-api23.p.rapidapi.com/api/user/info-by-id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-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://tiktok-api23.p.rapidapi.com/api/user/info-by-id")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tiktok-api23.p.rapidapi.com/api/user/info-by-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"user": {
"account_type": 0,
"avatar_300x300": {
"uri": "tos-useast5-avt-0068-tx/c39c2807c155535cf328225955e00aba",
"url_list": [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example1.webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example2.jpeg"
],
"url_prefix": null
},
"avatar_larger": {
"uri": "tos-useast5-avt-0068-tx/c39c2807c155535cf328225955e00aba",
"url_list": [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example1.webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example2.jpeg"
],
"url_prefix": null
},
"avatar_medium": {
"uri": "tos-useast5-avt-0068-tx/c39c2807c155535cf328225955e00aba",
"url_list": [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example1.webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example2.jpeg"
],
"url_prefix": null
},
"avatar_thumb": {
"uri": "tos-useast5-avt-0068-tx/c39c2807c155535cf328225955e00aba",
"url_list": [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example1.webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example2.jpeg"
],
"url_prefix": null
},
"commerce_user_level": 0,
"custom_verify": "verified account",
"enterprise_verify_reason": "",
"follow_status": 0,
"follower_count": 33265168,
"follower_status": 0,
"following_count": 0,
"nickname": "Taylor Swift",
"original_musician": {
"digg_count": 0,
"music_count": 7830,
"music_used_count": 0,
"new_release_clip_ids": null
},
"room_id": 0,
"sec_uid": "MS4wLjABAAAAqB08cUbXaDWqbD6MCga2RbGTuhfO2EsHayBYx08NDrN7IE3jQuRDNNN6YwyfH6_6",
"secret": 0,
"short_id": "0",
"show_favorite_list": true,
"signature": "This is pretty much just a cat account",
"tab_settings": {
"private_tab": {
"private_tab_style": 1,
"show_private_tab": false
}
},
"total_favorited": 263480662,
"uid": "6881290705605477381",
"unique_id": "taylorswift",
"verification_type": 1,
"with_commerce_entry": false
},
"status_code": 0
}{
"message": "Bad request"
}{
"message": "Invalid API key. Go to https://docs.rapidapi.com/docs/keys for more info."
}{
"message": "You are not subscribed to this API."
}{
"message": "Request failed with status 500: Internal Server Error",
"status_code": 500
}User
Get User Info by ID
Get User Info by ID
GET
/
api
/
user
/
info-by-id
Get User Info by ID
curl --request GET \
--url https://tiktok-api23.p.rapidapi.com/api/user/info-by-id \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://tiktok-api23.p.rapidapi.com/api/user/info-by-id"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://tiktok-api23.p.rapidapi.com/api/user/info-by-id', 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://tiktok-api23.p.rapidapi.com/api/user/info-by-id",
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-rapidapi-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://tiktok-api23.p.rapidapi.com/api/user/info-by-id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-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://tiktok-api23.p.rapidapi.com/api/user/info-by-id")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://tiktok-api23.p.rapidapi.com/api/user/info-by-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"user": {
"account_type": 0,
"avatar_300x300": {
"uri": "tos-useast5-avt-0068-tx/c39c2807c155535cf328225955e00aba",
"url_list": [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example1.webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example2.jpeg"
],
"url_prefix": null
},
"avatar_larger": {
"uri": "tos-useast5-avt-0068-tx/c39c2807c155535cf328225955e00aba",
"url_list": [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example1.webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example2.jpeg"
],
"url_prefix": null
},
"avatar_medium": {
"uri": "tos-useast5-avt-0068-tx/c39c2807c155535cf328225955e00aba",
"url_list": [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example1.webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example2.jpeg"
],
"url_prefix": null
},
"avatar_thumb": {
"uri": "tos-useast5-avt-0068-tx/c39c2807c155535cf328225955e00aba",
"url_list": [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example1.webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/example2.jpeg"
],
"url_prefix": null
},
"commerce_user_level": 0,
"custom_verify": "verified account",
"enterprise_verify_reason": "",
"follow_status": 0,
"follower_count": 33265168,
"follower_status": 0,
"following_count": 0,
"nickname": "Taylor Swift",
"original_musician": {
"digg_count": 0,
"music_count": 7830,
"music_used_count": 0,
"new_release_clip_ids": null
},
"room_id": 0,
"sec_uid": "MS4wLjABAAAAqB08cUbXaDWqbD6MCga2RbGTuhfO2EsHayBYx08NDrN7IE3jQuRDNNN6YwyfH6_6",
"secret": 0,
"short_id": "0",
"show_favorite_list": true,
"signature": "This is pretty much just a cat account",
"tab_settings": {
"private_tab": {
"private_tab_style": 1,
"show_private_tab": false
}
},
"total_favorited": 263480662,
"uid": "6881290705605477381",
"unique_id": "taylorswift",
"verification_type": 1,
"with_commerce_entry": false
},
"status_code": 0
}{
"message": "Bad request"
}{
"message": "Invalid API key. Go to https://docs.rapidapi.com/docs/keys for more info."
}{
"message": "You are not subscribed to this API."
}{
"message": "Request failed with status 500: Internal Server Error",
"status_code": 500
}Authorizations
Rapid API Key. How can I get Rapid API Key?
Query Parameters
Either userId or secUid must be provided (only one is required)
Pattern:
^\d+$Example:
"6881290705605477381"
Either userId or secUid must be provided (only one is required)
Example:
"MS4wLjABAAAAqB08cUbXaDWqbD6MCga2RbGTuhfO2EsHayBYx08NDrN7IE3jQuRDNNN6YwyfH6_6"
Was this page helpful?
⌘I

