Introducing TikTok Direct Publishing, Analytics, and Commenting

[ad_1]
We’re happy to announce that in partnership with TikTok, Ayrshare now has direct TikTok publishing, improved post analytics, and comment management via the TikTok API.
What does this mean and why is it better?
Here’s a quick summary:
Important features:
- Direct video publishing. Previously you had to get a TikTok mobile notification, open the TikTok app, enter text, and click a few screens to publish a video. Now videos are automatically uploaded, with captions, and displayed directly in your TikTok feed.
- Caption text posts and posts are now added to the video. Previously you had to manually enter text into the TikTok mobile app.
- Set icon in the video.
- Find, add, and delete comments in a TikTok post.
- Advanced demographic datasuch as the countries and age range of the video viewers.
- Hashtag recommendations directly from TikTok.
In the next sections, we will go into details.
Direct TikTok Publishing
Previously posting a TikTok video meant making an API request, waiting for an app notification on your mobile phone, opening the TikTok mobile app, then manually adding captions and approving the video.
That’s a lot of effort for your users!
Important for Existing Linked TikTok Accounts: All users who currently connect TikTok and Airshare will stay with this previous TikTok workflow. To use the direct publishing workflow, unlink and re-link your public account or use the /unlink endpoint. |
Ayrshare’s partnership with TikTok provides direct streaming access to TikTok videos. With a simple API call you can add caption text, insert a video, and choose a thumbnail for your TikTok video, and the video will be automatically published on TikTok, or you can edit the post later.
Here is a sample post using the Ayrshare social API:
POST
{
"post": "This is the best caption for a TikTok video",
"platforms": ["tiktok"],
"mediaUrls": ["
"tikTokOptions": {
"thumbNailOffset": 3000 // milliseconds
}
}
Advanced Mathematics
In addition to direct video publishing, our TikTok API access provides advanced analytics data both at the account level, including likes, follower counts, demographic data, and more:
POST
{
"tiktok": {
"analytics": {
"audienceCountries": [
{
"percentage": 0.25,
"country": "NG"
},
{
"percentage": 0.75,
"country": "US"
}
],
"audienceGenders": [
{
"percentage": 0.25,
"gender": "Female"
},
{
"percentage": 0.5,
"gender": "Male"
},
{
"percentage": 0.25,
"gender": "Other"
}
],
"bio": "My TikTok account",
"commentCountTotal": 33,
"displayName": "Me and You",
"durationAverage": "10.72",
"followerCount": 34,
"followingCount": 39,
"isVerified": false,
"shareCountTotal": 4,
"url": "
"userImage": "
"username": "@ayrshare",
"videoCountTotal": 18,
"viewCountTotal": 149
},
"status": "success"
}
and statistics for specific video posts, including demographics, views, and more:
POST
{
"id": "0IJsldvtkGwohT3s",
"status": "success",
"tiktok": {
"id": "721971891198",
"postUrl": "
"analytics": {
"audienceCountries": [
{
"country": "US",
"percentage": 1
}
],
"averageTimeWatched": 68.2,
"caption": "Let's see this new TikTok Post happen.",
"comments": 1,
"created": "2023-04-08T16:37:10Z",
"embedUrl": "
"fullVideoWatchedRate": 0.8,
"impressionSources": [
{
"percentage": 0.3,
"impression_source": "Hashtag"
},
{
"percentage": 0.6,
"impression_source": "Personal Profile"
},
{
"percentage": 0.4,
"impression_source": "Search"
},
{
"percentage": 0,
"impression_source": "Sound"
},
{
"percentage": 0,
"impression_source": "Follow"
},
{
"percentage": 0,
"impression_source": "For You"
}
],
"itemId": "72197930961198",
"likes": 1,
"mediaType": "video",
"name": "Ayrshare",
"postUrl": "
"reach": 1,
"shareUrl": "
"shares": 0,
"tags": [],
"thumbnailHeight": 1024,
"thumbnailUrl": "
"thumbnailWidth": 576,
"totalTimeWatched": 341,
"url": "
"videoDuration": 15,
"videoViews": 5
}
}
}
TikTok comment management
Ayrshare now offers the ability to create, find, and delete comments on TikTok video posts.
Let’s first see how to add a comment to a post:
POST
{
"id": "WMhZJDWbTkb5rAEvXb4C", // ID from the post
"platforms": ["tiktok"],
"comment":"I love this post"
}
Next, let’s get the comments on this post:
GET WMhZJDWbTkb5rAEvXb4C
{
"tiktok": [
{
"comment": "I love this post",
"commentId": "7219724709370577710",
"created": "2023-04-08T16:59:30Z",
"liked": false,
"likes": 0,
"owner": false,
"pinned": false,
"platform": "tiktok",
"profileImage": "
"replies": 0,
"status": "PUBLIC",
"userId": "51e0cb95a8b14",
"username": "ayrshare",
"videoId": "7219723656732101931"
}
],
"status": "success",
"id": "WMhZJDWbTkb5rAEvXb4C"
}
Finally, let’s remove the comments:
DELETE WMhZJDWbTkb5rAEvXb4C
With new and improved access to the TikTok API, Ayrshare is able to provide unparalleled publishing, analytics, and comment management.
See the full Ayrshare API documentation for more information.
Generate TikTok Hashtags
One last new ability is generating keyword-based TikTok hashtags. These recommendations and hashtag view statistics come directly from TikTok.
For example we can find suggested hashtags for the keyword “apple”:
GET
Hashtags and their view count are returned:
{
"keyword": "apple",
"recommendations": [
{
"viewCount": 71950998550, // The number of views that the recommended hashtag has received.
"name": "apple" // Suggested hashtag
},
{
"viewCount": 6318280101,
"name": "applewatch"
},
{
"viewCount": 2486358394,
"name": "applepencil"
},
{
"viewCount": 2142842131,
"name": "applemusic"
},
{
"viewCount": 1506224079,
"name": "applesquad"
},
{
"viewCount": 1307287255,
"name": "apples"
},
{
"viewCount": 1008293028,
"name": "applepie"
},
{
"viewCount": 788388838,
"name": "applejuice"
},
{
"viewCount": 1024901638,
"name": "appletv"
},
{
"viewCount": 679033194,
"name": "applechallenge"
}
]
}
TikTok’s new direct publishing, comment management, analytics, and hashtags are powerful additions to Ayrshare’s social media APIs. If you have any questions, let us know; we are here to help.