Get any TikTok profile or video from its link
curl --request POST \
--url https://api.stophy.dev/v1/tiktok/url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://www.tiktok.com/@nasa"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://www.tiktok.com/@nasa'})
};
fetch('https://api.stophy.dev/v1/tiktok/url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/tiktok/url"
payload = { "url": "https://www.tiktok.com/@nasa" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"kind": "profile",
"profile": {
"url": "<string>",
"isVerified": true,
"isPrivate": true,
"isOrganization": true,
"id": "<string>",
"secUid": "<string>",
"username": "<string>",
"name": "<string>",
"bio": "<string>",
"bioLinks": [
{
"url": "<string>"
}
],
"avatar": "<string>",
"language": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"followers": 0,
"following": 0,
"likes": 0,
"videos": 0
}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}TikTok
TikTok link API
Call the TikTok link API to get profile and video, as JSON or markdown. 1 credit.
POST
/
v1
/
tiktok
/
url
Get any TikTok profile or video from its link
curl --request POST \
--url https://api.stophy.dev/v1/tiktok/url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://www.tiktok.com/@nasa"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://www.tiktok.com/@nasa'})
};
fetch('https://api.stophy.dev/v1/tiktok/url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/tiktok/url"
payload = { "url": "https://www.tiktok.com/@nasa" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"kind": "profile",
"profile": {
"url": "<string>",
"isVerified": true,
"isPrivate": true,
"isOrganization": true,
"id": "<string>",
"secUid": "<string>",
"username": "<string>",
"name": "<string>",
"bio": "<string>",
"bioLinks": [
{
"url": "<string>"
}
],
"avatar": "<string>",
"language": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"followers": 0,
"following": 0,
"likes": 0,
"videos": 0
}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
tiktok.url - Returns:
datais one ofprofile,video.data.kindsays which. - Cost: 1 credit. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.tiktok.url({ url: "https://www.tiktok.com/@nasa" });
console.log(result.data.kind);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.tiktok.url(url="https://www.tiktok.com/@nasa")
print(result["data"]["kind"])
curl -X POST https://api.stophy.dev/v1/tiktok/url \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"url":"https://www.tiktok.com/@nasa"}'
stophy tiktok url https://www.tiktok.com/@nasa
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json