All URIs are relative to https://api.unifapi.com
| Method | HTTP request | Description |
|---|---|---|
| tiktok_feed_recommended_post | POST /tiktok/feed/recommended | Get TikTok recommendation videos |
| tiktok_hashtags_id_get | GET /tiktok/hashtags/{id} | Get a TikTok hashtag by ID |
| tiktok_hashtags_id_videos_get | GET /tiktok/hashtags/{id}/videos | List videos tagged with a TikTok hashtag |
| tiktok_music_id_get | GET /tiktok/music/{id} | Get a TikTok music track by ID |
| tiktok_music_id_videos_get | GET /tiktok/music/{id}/videos | List videos using a TikTok music track |
| tiktok_search_get | GET /tiktok/search | General TikTok search (returns videos) |
| tiktok_search_hashtags_get | GET /tiktok/search/hashtags | Search TikTok hashtags by keyword |
| tiktok_search_users_get | GET /tiktok/search/users | Search TikTok users by keyword |
| tiktok_search_videos_get | GET /tiktok/search/videos | Search TikTok videos by keyword |
| tiktok_users_id_followers_get | GET /tiktok/users/{id}/followers | List a TikTok user's followers |
| tiktok_users_id_following_get | GET /tiktok/users/{id}/following | List users a TikTok user is following |
| tiktok_users_id_get | GET /tiktok/users/{id} | Get a TikTok user profile |
| tiktok_users_id_likes_get | GET /tiktok/users/{id}/likes | List videos liked by a TikTok user |
| tiktok_users_id_videos_get | GET /tiktok/users/{id}/videos | List videos posted by a TikTok user |
| tiktok_users_resolve_get | GET /tiktok/users/resolve | Resolve a TikTok username to a user id |
| tiktok_videos_batch_post | POST /tiktok/videos/batch | Batch-fetch TikTok videos by ID |
| tiktok_videos_id_comments_comment_id_replies_get | GET /tiktok/videos/{id}/comments/{comment_id}/replies | List replies to a TikTok comment |
| tiktok_videos_id_comments_get | GET /tiktok/videos/{id}/comments | List top-level comments on a TikTok video |
| tiktok_videos_id_get | GET /tiktok/videos/{id} | Get a TikTok video by ID |
| tiktok_videos_resolve_get | GET /tiktok/videos/resolve | Resolve a TikTok share URL to a video |
TiktokFeedRecommendedPost200Response tiktok_feed_recommended_post(tiktok_feed_recommended_post_request=tiktok_feed_recommended_post_request)
Get TikTok recommendation videos
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_feed_recommended_post200_response import TiktokFeedRecommendedPost200Response from unifapi.models.tiktok_feed_recommended_post_request import TiktokFeedRecommendedPostRequest from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) tiktok_feed_recommended_post_request = unifapi.TiktokFeedRecommendedPostRequest() # TiktokFeedRecommendedPostRequest | (optional) try: # Get TikTok recommendation videos api_response = api_instance.tiktok_feed_recommended_post(tiktok_feed_recommended_post_request=tiktok_feed_recommended_post_request) print("The response of TiktokApi->tiktok_feed_recommended_post:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_feed_recommended_post: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| tiktok_feed_recommended_post_request | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokHashtagsIdGet200Response tiktok_hashtags_id_get(id)
Get a TikTok hashtag by ID
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_hashtags_id_get200_response import TiktokHashtagsIdGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | try: # Get a TikTok hashtag by ID api_response = api_instance.tiktok_hashtags_id_get(id) print("The response of TiktokApi->tiktok_hashtags_id_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_hashtags_id_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokHashtagsIdVideosGet200Response tiktok_hashtags_id_videos_get(id, cursor=cursor, limit=limit)
List videos tagged with a TikTok hashtag
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_hashtags_id_videos_get200_response import TiktokHashtagsIdVideosGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # List videos tagged with a TikTok hashtag api_response = api_instance.tiktok_hashtags_id_videos_get(id, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_hashtags_id_videos_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_hashtags_id_videos_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokMusicIdGet200Response tiktok_music_id_get(id)
Get a TikTok music track by ID
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_music_id_get200_response import TiktokMusicIdGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | try: # Get a TikTok music track by ID api_response = api_instance.tiktok_music_id_get(id) print("The response of TiktokApi->tiktok_music_id_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_music_id_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
- 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokHashtagsIdVideosGet200Response tiktok_music_id_videos_get(id, cursor=cursor, limit=limit)
List videos using a TikTok music track
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_hashtags_id_videos_get200_response import TiktokHashtagsIdVideosGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # List videos using a TikTok music track api_response = api_instance.tiktok_music_id_videos_get(id, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_music_id_videos_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_music_id_videos_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokHashtagsIdVideosGet200Response tiktok_search_get(q, cursor=cursor, limit=limit)
General TikTok search (returns videos)
Returns TikTok videos for the keyword q. Use type-specific endpoints when needed.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_hashtags_id_videos_get200_response import TiktokHashtagsIdVideosGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) q = 'q_example' # str | Search keyword cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # General TikTok search (returns videos) api_response = api_instance.tiktok_search_get(q, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_search_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_search_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| q | str | Search keyword | |
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokSearchHashtagsGet200Response tiktok_search_hashtags_get(q, cursor=cursor, limit=limit)
Search TikTok hashtags by keyword
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_search_hashtags_get200_response import TiktokSearchHashtagsGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) q = 'q_example' # str | Search keyword cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # Search TikTok hashtags by keyword api_response = api_instance.tiktok_search_hashtags_get(q, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_search_hashtags_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_search_hashtags_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| q | str | Search keyword | |
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokSearchUsersGet200Response tiktok_search_users_get(q, cursor=cursor, limit=limit)
Search TikTok users by keyword
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_search_users_get200_response import TiktokSearchUsersGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) q = 'q_example' # str | Search keyword cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # Search TikTok users by keyword api_response = api_instance.tiktok_search_users_get(q, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_search_users_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_search_users_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| q | str | Search keyword | |
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokHashtagsIdVideosGet200Response tiktok_search_videos_get(q, cursor=cursor, limit=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.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_hashtags_id_videos_get200_response import TiktokHashtagsIdVideosGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) q = 'q_example' # str | Search keyword cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # Search TikTok videos by keyword api_response = api_instance.tiktok_search_videos_get(q, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_search_videos_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_search_videos_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| q | str | Search keyword | |
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokSearchUsersGet200Response tiktok_users_id_followers_get(id, cursor=cursor, limit=limit)
List a TikTok user's followers
Returns a paginated list of users following the given user.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_search_users_get200_response import TiktokSearchUsersGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | TikTok sec_uid, numeric user id, or public handle. cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # List a TikTok user's followers api_response = api_instance.tiktok_users_id_followers_get(id, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_users_id_followers_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_users_id_followers_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | TikTok sec_uid, numeric user id, or public handle. | |
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokSearchUsersGet200Response tiktok_users_id_following_get(id, cursor=cursor, limit=limit)
List users a TikTok user is following
Returns a paginated list of users the given user is following.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_search_users_get200_response import TiktokSearchUsersGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | TikTok sec_uid, numeric user id, or public handle. cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # List users a TikTok user is following api_response = api_instance.tiktok_users_id_following_get(id, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_users_id_following_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_users_id_following_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | TikTok sec_uid, numeric user id, or public handle. | |
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokUsersIdGet200Response tiktok_users_id_get(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.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_users_id_get200_response import TiktokUsersIdGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | TikTok sec_uid, numeric user id, or public handle. try: # Get a TikTok user profile api_response = api_instance.tiktok_users_id_get(id) print("The response of TiktokApi->tiktok_users_id_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_users_id_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokHashtagsIdVideosGet200Response tiktok_users_id_likes_get(id, cursor=cursor, limit=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.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_hashtags_id_videos_get200_response import TiktokHashtagsIdVideosGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | TikTok sec_uid, numeric user id, or public handle. cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # List videos liked by a TikTok user api_response = api_instance.tiktok_users_id_likes_get(id, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_users_id_likes_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_users_id_likes_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | TikTok sec_uid, numeric user id, or public handle. | |
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokHashtagsIdVideosGet200Response tiktok_users_id_videos_get(id, cursor=cursor, limit=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.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_hashtags_id_videos_get200_response import TiktokHashtagsIdVideosGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | TikTok sec_uid, numeric user id, or public handle. cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # List videos posted by a TikTok user api_response = api_instance.tiktok_users_id_videos_get(id, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_users_id_videos_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_users_id_videos_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | TikTok sec_uid, numeric user id, or public handle. | |
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokUsersResolveGet200Response tiktok_users_resolve_get(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.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_users_resolve_get200_response import TiktokUsersResolveGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) username = 'username_example' # str | Public TikTok handle, e.g. 'jennmelon' try: # Resolve a TikTok username to a user id api_response = api_instance.tiktok_users_resolve_get(username) print("The response of TiktokApi->tiktok_users_resolve_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_users_resolve_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| username | str | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokFeedRecommendedPost200Response tiktok_videos_batch_post(tiktok_videos_batch_post_request=tiktok_videos_batch_post_request)
Batch-fetch TikTok videos by ID
Returns canonicalized metadata for up to 20 TikTok videos.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_feed_recommended_post200_response import TiktokFeedRecommendedPost200Response from unifapi.models.tiktok_videos_batch_post_request import TiktokVideosBatchPostRequest from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) tiktok_videos_batch_post_request = unifapi.TiktokVideosBatchPostRequest() # TiktokVideosBatchPostRequest | (optional) try: # Batch-fetch TikTok videos by ID api_response = api_instance.tiktok_videos_batch_post(tiktok_videos_batch_post_request=tiktok_videos_batch_post_request) print("The response of TiktokApi->tiktok_videos_batch_post:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_videos_batch_post: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| tiktok_videos_batch_post_request | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokVideosIdCommentsCommentIdRepliesGet200Response tiktok_videos_id_comments_comment_id_replies_get(id, comment_id, cursor=cursor, limit=limit)
List replies to a TikTok comment
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_videos_id_comments_comment_id_replies_get200_response import TiktokVideosIdCommentsCommentIdRepliesGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | comment_id = 'comment_id_example' # str | cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # List replies to a TikTok comment api_response = api_instance.tiktok_videos_id_comments_comment_id_replies_get(id, comment_id, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_videos_id_comments_comment_id_replies_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_videos_id_comments_comment_id_replies_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| comment_id | str | ||
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokVideosIdCommentsCommentIdRepliesGet200Response tiktok_videos_id_comments_get(id, cursor=cursor, limit=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.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_videos_id_comments_comment_id_replies_get200_response import TiktokVideosIdCommentsCommentIdRepliesGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | cursor = 'cursor_example' # str | (optional) limit = 20 # int | (optional) (default to 20) try: # List top-level comments on a TikTok video api_response = api_instance.tiktok_videos_id_comments_get(id, cursor=cursor, limit=limit) print("The response of TiktokApi->tiktok_videos_id_comments_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_videos_id_comments_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| cursor | str | [optional] | |
| limit | int | [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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokVideosIdGet200Response tiktok_videos_id_get(id)
Get a TikTok video by ID
Returns canonicalized metadata for a single TikTok video. The {id} must be the numeric TikTok video id.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_videos_id_get200_response import TiktokVideosIdGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) id = 'id_example' # str | try: # Get a TikTok video by ID api_response = api_instance.tiktok_videos_id_get(id) print("The response of TiktokApi->tiktok_videos_id_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_videos_id_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
- 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TiktokVideosIdGet200Response tiktok_videos_resolve_get(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.
- Bearer Authentication (bearerAuth):
import unifapi from unifapi.models.tiktok_videos_id_get200_response import TiktokVideosIdGet200Response from unifapi.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.unifapi.com # See configuration.py for a list of all supported configuration parameters. configuration = unifapi.Configuration( host = "https://api.unifapi.com" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. # Configure Bearer authorization: bearerAuth configuration = unifapi.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with unifapi.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = unifapi.TiktokApi(api_client) url = 'url_example' # str | TikTok share URL (long or short form) try: # Resolve a TikTok share URL to a video api_response = api_instance.tiktok_videos_resolve_get(url) print("The response of TiktokApi->tiktok_videos_resolve_get:\n") pprint(api_response) except Exception as e: print("Exception when calling TiktokApi->tiktok_videos_resolve_get: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| url | str | 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]