All URIs are relative to https://api.unifapi.com
| Method | HTTP request | Description |
|---|---|---|
| tiktokFeedRecommendedPost | POST /tiktok/feed/recommended | Get TikTok recommendation videos |
| tiktokHashtagsIdGet | GET /tiktok/hashtags/{id} | Get a TikTok hashtag by ID |
| tiktokHashtagsIdVideosGet | GET /tiktok/hashtags/{id}/videos | List videos tagged with a TikTok hashtag |
| tiktokMusicIdGet | GET /tiktok/music/{id} | Get a TikTok music track by ID |
| tiktokMusicIdVideosGet | GET /tiktok/music/{id}/videos | List videos using a TikTok music track |
| tiktokSearchGet | GET /tiktok/search | General TikTok search (returns videos) |
| tiktokSearchHashtagsGet | GET /tiktok/search/hashtags | Search TikTok hashtags by keyword |
| tiktokSearchUsersGet | GET /tiktok/search/users | Search TikTok users by keyword |
| tiktokSearchVideosGet | GET /tiktok/search/videos | Search TikTok videos by keyword |
| tiktokUsersIdFollowersGet | GET /tiktok/users/{id}/followers | List a TikTok user's followers |
| tiktokUsersIdFollowingGet | GET /tiktok/users/{id}/following | List users a TikTok user is following |
| tiktokUsersIdGet | GET /tiktok/users/{id} | Get a TikTok user profile |
| tiktokUsersIdLikesGet | GET /tiktok/users/{id}/likes | List videos liked by a TikTok user |
| tiktokUsersIdVideosGet | GET /tiktok/users/{id}/videos | List videos posted by a TikTok user |
| tiktokUsersResolveGet | GET /tiktok/users/resolve | Resolve a TikTok username to a user id |
| tiktokVideosBatchPost | POST /tiktok/videos/batch | Batch-fetch TikTok videos by ID |
| tiktokVideosIdCommentsCommentIdRepliesGet | GET /tiktok/videos/{id}/comments/{comment_id}/replies | List replies to a TikTok comment |
| tiktokVideosIdCommentsGet | GET /tiktok/videos/{id}/comments | List top-level comments on a TikTok video |
| tiktokVideosIdGet | GET /tiktok/videos/{id} | Get a TikTok video by ID |
| tiktokVideosResolveGet | GET /tiktok/videos/resolve | Resolve a TikTok share URL to a video |
TiktokFeedRecommendedPost200Response tiktokFeedRecommendedPost(tiktokFeedRecommendedPostRequest)
Get TikTok recommendation videos
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
TiktokFeedRecommendedPostRequest tiktokFeedRecommendedPostRequest = new TiktokFeedRecommendedPostRequest(); // TiktokFeedRecommendedPostRequest |
try {
TiktokFeedRecommendedPost200Response result = apiInstance.tiktokFeedRecommendedPost(tiktokFeedRecommendedPostRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokFeedRecommendedPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| tiktokFeedRecommendedPostRequest | TiktokFeedRecommendedPostRequest | [optional] |
TiktokFeedRecommendedPost200Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokHashtagsIdGet200Response tiktokHashtagsIdGet(id)
Get a TikTok hashtag by ID
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String |
try {
TiktokHashtagsIdGet200Response result = apiInstance.tiktokHashtagsIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokHashtagsIdGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
TiktokHashtagsIdGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokHashtagsIdVideosGet200Response tiktokHashtagsIdVideosGet(id, cursor, limit)
List videos tagged with a TikTok hashtag
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String |
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokHashtagsIdVideosGet200Response result = apiInstance.tiktokHashtagsIdVideosGet(id, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokHashtagsIdVideosGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokHashtagsIdVideosGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokMusicIdGet200Response tiktokMusicIdGet(id)
Get a TikTok music track by ID
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String |
try {
TiktokMusicIdGet200Response result = apiInstance.tiktokMusicIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokMusicIdGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokHashtagsIdVideosGet200Response tiktokMusicIdVideosGet(id, cursor, limit)
List videos using a TikTok music track
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String |
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokHashtagsIdVideosGet200Response result = apiInstance.tiktokMusicIdVideosGet(id, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokMusicIdVideosGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokHashtagsIdVideosGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokHashtagsIdVideosGet200Response tiktokSearchGet(q, cursor, limit)
General TikTok search (returns videos)
Returns TikTok videos for the keyword `q`. Use type-specific endpoints when needed.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String q = "q_example"; // String | Search keyword
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokHashtagsIdVideosGet200Response result = apiInstance.tiktokSearchGet(q, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokSearchGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| q | String | Search keyword | |
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokHashtagsIdVideosGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokSearchHashtagsGet200Response tiktokSearchHashtagsGet(q, cursor, limit)
Search TikTok hashtags by keyword
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String q = "q_example"; // String | Search keyword
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokSearchHashtagsGet200Response result = apiInstance.tiktokSearchHashtagsGet(q, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokSearchHashtagsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| q | String | Search keyword | |
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokSearchHashtagsGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokSearchUsersGet200Response tiktokSearchUsersGet(q, cursor, limit)
Search TikTok users by keyword
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String q = "q_example"; // String | Search keyword
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokSearchUsersGet200Response result = apiInstance.tiktokSearchUsersGet(q, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokSearchUsersGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| q | String | Search keyword | |
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokSearchUsersGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokHashtagsIdVideosGet200Response tiktokSearchVideosGet(q, cursor, limit)
Search TikTok videos by keyword
Returns a paginated list of TikTok videos matching the keyword `q`. Use `next_cursor` from the response as the next request's `cursor`.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String q = "q_example"; // String | Search keyword
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokHashtagsIdVideosGet200Response result = apiInstance.tiktokSearchVideosGet(q, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokSearchVideosGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| q | String | Search keyword | |
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokHashtagsIdVideosGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokSearchUsersGet200Response tiktokUsersIdFollowersGet(id, cursor, limit)
List a TikTok user's followers
Returns a paginated list of users following the given user.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String | TikTok sec_uid, numeric user id, or public handle.
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokSearchUsersGet200Response result = apiInstance.tiktokUsersIdFollowersGet(id, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokUsersIdFollowersGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | TikTok sec_uid, numeric user id, or public handle. | |
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokSearchUsersGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokSearchUsersGet200Response tiktokUsersIdFollowingGet(id, cursor, limit)
List users a TikTok user is following
Returns a paginated list of users the given user is following.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String | TikTok sec_uid, numeric user id, or public handle.
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokSearchUsersGet200Response result = apiInstance.tiktokUsersIdFollowingGet(id, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokUsersIdFollowingGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | TikTok sec_uid, numeric user id, or public handle. | |
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokSearchUsersGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokUsersIdGet200Response tiktokUsersIdGet(id)
Get a TikTok user profile
Returns the canonicalized public profile for the TikTok user with the given sec_uid, numeric user id, or handle.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String | TikTok sec_uid, numeric user id, or public handle.
try {
TiktokUsersIdGet200Response result = apiInstance.tiktokUsersIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokUsersIdGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | TikTok sec_uid, numeric user id, or public handle. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokHashtagsIdVideosGet200Response tiktokUsersIdLikesGet(id, cursor, limit)
List videos liked by a TikTok user
Returns a paginated list of videos the user has liked where the user has made their likes public.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String | TikTok sec_uid, numeric user id, or public handle.
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokHashtagsIdVideosGet200Response result = apiInstance.tiktokUsersIdLikesGet(id, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokUsersIdLikesGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | TikTok sec_uid, numeric user id, or public handle. | |
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokHashtagsIdVideosGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokHashtagsIdVideosGet200Response tiktokUsersIdVideosGet(id, cursor, limit)
List videos posted by a TikTok user
Returns a paginated list of public videos posted by the user. Use `next_cursor` from the response as the next request's `cursor`.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String | TikTok sec_uid, numeric user id, or public handle.
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokHashtagsIdVideosGet200Response result = apiInstance.tiktokUsersIdVideosGet(id, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokUsersIdVideosGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | TikTok sec_uid, numeric user id, or public handle. | |
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokHashtagsIdVideosGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokUsersResolveGet200Response tiktokUsersResolveGet(username)
Resolve a TikTok username to a user id
Accepts a public TikTok username (handle) and returns the user's stable opaque id for other /tiktok/users/{id} endpoints.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String username = "username_example"; // String | Public TikTok handle, e.g. 'jennmelon'
try {
TiktokUsersResolveGet200Response result = apiInstance.tiktokUsersResolveGet(username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokUsersResolveGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| username | String | Public TikTok handle, e.g. 'jennmelon' |
TiktokUsersResolveGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokFeedRecommendedPost200Response tiktokVideosBatchPost(tiktokVideosBatchPostRequest)
Batch-fetch TikTok videos by ID
Returns canonicalized metadata for up to 20 TikTok videos.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
TiktokVideosBatchPostRequest tiktokVideosBatchPostRequest = new TiktokVideosBatchPostRequest(); // TiktokVideosBatchPostRequest |
try {
TiktokFeedRecommendedPost200Response result = apiInstance.tiktokVideosBatchPost(tiktokVideosBatchPostRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokVideosBatchPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| tiktokVideosBatchPostRequest | TiktokVideosBatchPostRequest | [optional] |
TiktokFeedRecommendedPost200Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokVideosIdCommentsCommentIdRepliesGet200Response tiktokVideosIdCommentsCommentIdRepliesGet(id, commentId, cursor, limit)
List replies to a TikTok comment
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String |
String commentId = "commentId_example"; // String |
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokVideosIdCommentsCommentIdRepliesGet200Response result = apiInstance.tiktokVideosIdCommentsCommentIdRepliesGet(id, commentId, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokVideosIdCommentsCommentIdRepliesGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| commentId | String | ||
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokVideosIdCommentsCommentIdRepliesGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokVideosIdCommentsCommentIdRepliesGet200Response tiktokVideosIdCommentsGet(id, cursor, limit)
List top-level comments on a TikTok video
Returns a paginated list of top-level comments on the given video. Use `next_cursor` from the response as the next request's `cursor`.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String |
String cursor = "cursor_example"; // String |
Integer limit = 20; // Integer |
try {
TiktokVideosIdCommentsCommentIdRepliesGet200Response result = apiInstance.tiktokVideosIdCommentsGet(id, cursor, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokVideosIdCommentsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| cursor | String | [optional] | |
| limit | Integer | [optional] [default to 20] |
TiktokVideosIdCommentsCommentIdRepliesGet200Response
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokVideosIdGet200Response tiktokVideosIdGet(id)
Get a TikTok video by ID
Returns canonicalized metadata for a single TikTok video. The `{id}` must be the numeric TikTok video id.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
String id = "id_example"; // String |
try {
TiktokVideosIdGet200Response result = apiInstance.tiktokVideosIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokVideosIdGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |
TiktokVideosIdGet200Response tiktokVideosResolveGet(url)
Resolve a TikTok share URL to a video
Accepts a TikTok share URL (long or short / vm.tiktok.com) and returns the canonical Video object.
// Import classes:
import com.unifapi.sdk.ApiClient;
import com.unifapi.sdk.ApiException;
import com.unifapi.sdk.Configuration;
import com.unifapi.sdk.auth.*;
import com.unifapi.sdk.models.*;
import com.unifapi.sdk.api.TiktokApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.unifapi.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
TiktokApi apiInstance = new TiktokApi(defaultClient);
URI url = new URI(); // URI | TikTok share URL (long or short form)
try {
TiktokVideosIdGet200Response result = apiInstance.tiktokVideosResolveGet(url);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TiktokApi#tiktokVideosResolveGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| url | URI | TikTok share URL (long or short form) |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Validation or invalid-id error | - |
| 401 | Missing, invalid, disabled, revoked, or expired UnifAPI API key | - |
| 402 | Insufficient workspace credits | - |
| 404 | Resource not found | - |
| 429 | Rate limited | - |
| 500 | Internal error | - |
| 502 | Source error | - |
| 503 | Source unavailable | - |