
TikTok API (pay per event)
Pricing
Pay per event

TikTok API (pay per event)
The MOST stable, maintained, & simple unofficial TikTok API/scraping solution, unlocking TikTok data at scale. Seamlessly access data from the TikTok mobile app, including user, post, music, search, feeds, comments, followers, and trends. We handle all proxies. Have custom needs? Visit scraptik.com
5.0 (1)
Pricing
Pay per event
0
Total users
7
Monthly users
7
Runs succeeded
>99%
Last modified
3 days ago
You can access the TikTok API (pay per event) programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
{ "openapi": "3.0.1", "info": { "version": "0.0", "x-build-id": "4f2s3eGFFYfPdeFTM" }, "servers": [ { "url": "https://api.apify.com/v2" } ], "paths": { "/acts/scraptik~tiktok-api/run-sync-get-dataset-items": { "post": { "operationId": "run-sync-get-dataset-items-scraptik-tiktok-api", "x-openai-isConsequential": false, "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.", "tags": [ "Run Actor" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/inputSchema" } } } }, "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Enter your Apify token here" } ], "responses": { "200": { "description": "OK" } } } }, "/acts/scraptik~tiktok-api/runs": { "post": { "operationId": "runs-sync-scraptik-tiktok-api", "x-openai-isConsequential": false, "summary": "Executes an Actor and returns information about the initiated run in response.", "tags": [ "Run Actor" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/inputSchema" } } } }, "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Enter your Apify token here" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/runsResponseSchema" } } } } } } }, "/acts/scraptik~tiktok-api/run-sync": { "post": { "operationId": "run-sync-scraptik-tiktok-api", "x-openai-isConsequential": false, "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.", "tags": [ "Run Actor" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/inputSchema" } } } }, "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Enter your Apify token here" } ], "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "inputSchema": { "type": "object", "properties": { "profile_username": { "title": "username", "type": "string", "description": "Enter one TikTok username (without the @ symbol). Example: 'katyperry'", "default": "" }, "profile_userId": { "title": "user_id", "type": "string", "description": "User ID used for identifying a TikTok account. Example: 131256363632148480", "default": "" }, "profile_secUserId": { "title": "sec_user_id", "type": "string", "description": "Secondary user ID used by TikTok for user identification. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM", "default": "" }, "usernameToId_username": { "title": "username", "type": "string", "description": "Get the user ID from the username. You'll use this ID for most requests. Example: 'katyperry'", "default": "" }, "followers_userId": { "title": "user_id", "type": "string", "description": "User ID to fetch followers for. Example: 131256363632148480", "default": "" }, "followers_secUserId": { "title": "sec_user_id", "type": "string", "description": "Secondary user ID used by TikTok for user identification. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM", "default": "" }, "followers_count": { "title": "count", "type": "integer", "description": "Number of followers to retrieve. Default is 10.", "default": 10 }, "followers_maxTime": { "title": "max_time", "type": "integer", "description": "Pagination cursor. Use the 'min_time' value from the previous response to fetch more results.", "default": 0 }, "following_userId": { "title": "user_id", "type": "string", "description": "User ID to fetch followings for. Example: 131256363632148480", "default": "" }, "following_secUserId": { "title": "sec_user_id", "type": "string", "description": "Optional secondary user ID. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM", "default": "" }, "following_count": { "title": "count", "type": "integer", "description": "Number of followings to retrieve. Default is 10.", "default": 10 }, "following_maxTime": { "title": "max_time", "type": "integer", "description": "Pagination cursor. Use the 'min_time' value from the previous response to fetch more results.", "default": 0 }, "post_awemeId": { "title": "aweme_id", "type": "string", "description": "The ID of the TikTok video post to retrieve. Example: 6811123699203329285", "default": "" }, "userPosts_userId": { "title": "user_id", "type": "string", "description": "User ID whose posts should be retrieved. Example: 6546356850533602319", "default": "" }, "userPosts_secUserId": { "title": "sec_user_id", "type": "string", "description": "Optional secondary user ID. Example: MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM", "default": "" }, "userPosts_count": { "title": "count", "type": "integer", "description": "Number of posts to retrieve. Default is 10.", "default": 10 }, "userPosts_maxCursor": { "title": "max_cursor", "type": "string", "description": "Pagination cursor for fetching next set of posts.", "default": "0" }, "music_id": { "title": "music_id", "type": "string", "description": "The ID of the TikTok music track to retrieve. Example: 6873491642666469377", "default": "" }, "musicPosts_musicId": { "title": "music_id", "type": "string", "description": "ID of the music to fetch associated video posts. Example: 7047667719411370758", "default": "" }, "musicPosts_count": { "title": "count", "type": "integer", "description": "Number of posts to retrieve. Default is 18.", "default": 18 }, "musicPosts_cursor": { "title": "cursor", "type": "integer", "description": "Pagination cursor for loading additional results.", "default": 0 }, "challengePosts_cid": { "title": "cid", "type": "string", "description": "Hashtag/Challenge ID used to fetch associated posts. Example: 1592380847102982", "default": "" }, "challengePosts_count": { "title": "count", "type": "integer", "description": "Number of challenge posts to fetch. Default is 20.", "default": 20 }, "challengePosts_cursor": { "title": "cursor", "type": "integer", "description": "Pagination cursor to retrieve more results for a challenge.", "default": 0 }, "commentReplies_commentId": { "title": "comment_id", "type": "string", "description": "ID of the parent comment to fetch replies for. Example: 6999860547420766982", "default": "" }, "commentReplies_awemeId": { "title": "aweme_id", "type": "string", "description": "ID of the TikTok post containing the comment. Example: 6996617408010112262", "default": "" }, "commentReplies_count": { "title": "count", "type": "integer", "description": "Number of replies to fetch. Default is 10.", "default": 10 }, "commentReplies_cursor": { "title": "cursor", "type": "integer", "description": "Pagination cursor to retrieve more comment replies.", "default": 0 }, "listComments_awemeId": { "title": "aweme_id", "type": "string", "description": "ID of the TikTok post to fetch top-level comments for. Example: 6944028931875949829", "default": "" }, "listComments_count": { "title": "count", "type": "integer", "description": "Number of top-level comments to fetch. Default is 10.", "default": 10 }, "listComments_cursor": { "title": "cursor", "type": "integer", "description": "Pagination cursor to retrieve more top-level comments.", "default": 0 }, "userLikes_userId": { "title": "user_id", "type": "string", "description": "User ID whose liked posts should be retrieved. Example: 6546356850533602319", "default": "" }, "userLikes_count": { "title": "count", "type": "integer", "description": "Number of liked posts to retrieve. Default is 10.", "default": 10 }, "userLikes_maxCursor": { "title": "max_cursor", "type": "string", "description": "Pagination cursor for fetching additional liked posts.", "default": "0" }, "searchUsers_keyword": { "title": "keyword", "type": "string", "description": "Search for users by keyword. Example: 'japan'", "default": "" }, "searchUsers_count": { "title": "count", "type": "integer", "description": "Number of users to retrieve. Default is 20.", "default": 20 }, "searchUsers_cursor": { "title": "cursor", "type": "integer", "description": "Pagination cursor to retrieve more users.", "default": 0 }, "searchPosts_keyword": { "title": "keyword", "type": "string", "description": "Search for posts by keyword. Example: 'nike'", "default": "" }, "searchPosts_count": { "title": "count", "type": "integer", "description": "Number of posts to retrieve. Default is 10.", "default": 10 }, "searchPosts_offset": { "title": "offset", "type": "integer", "description": "Offset for pagination. Default is 0.", "default": 0 }, "searchPosts_useFilters": { "title": "use_filters", "type": "boolean", "description": "Whether to use filters. Default is false. 0 is false, 1 is true.", "default": false }, "searchPosts_publishTime": { "title": "publish_time", "type": "integer", "description": "Publish time for filtering posts. Default is 0. 0 = All Time, 1 = Yesterday, 7 = This Week, 30 = This Month, 90 = Last 3 Months, 180 = Last 6 Months", "default": 0 }, "searchPosts_sortType": { "title": "sort_type", "type": "integer", "description": "Sort type for filtering posts. Default is 0. 0 = Relevance, 1 = Most Liked, 3 = Date", "default": 0 }, "searchSounds_keyword": { "title": "keyword", "type": "string", "description": "Search for sounds by keyword. Example: 'japan'", "default": "" }, "searchSounds_count": { "title": "count", "type": "integer", "description": "Number of sounds to retrieve. Default is 10.", "default": 10 }, "searchSounds_cursor": { "title": "cursor", "type": "integer", "description": "Pagination cursor to retrieve more sounds.", "default": 0 }, "searchSounds_useFilters": { "title": "use_filters", "type": "boolean", "description": "Whether to use filters. Default is false. 0 is no, 1 is yes.", "default": false }, "searchSounds_filterBy": { "title": "filter_by", "type": "integer", "description": "Filter by. Default is 0. 0 = All, 1 = Title, 2 = Creators", "default": 0 }, "searchSounds_sortType": { "title": "sort_type", "type": "integer", "description": "Sort type for filtering sounds. Default is 0. 0 = Relevance, 1 = Most used, 2 = Most recent, 3 = Shortest, 4 = Longest", "default": 0 }, "searchHashtags_keyword": { "title": "keyword", "type": "string", "description": "Search for hashtags by keyword. Example: 'japan'", "default": "" }, "searchHashtags_count": { "title": "count", "type": "integer", "description": "Number of hashtags to retrieve. Default is 20.", "default": 20 }, "searchHashtags_cursor": { "title": "cursor", "type": "integer", "description": "Pagination cursor to retrieve more hashtags.", "default": 0 }, "searchLives_keyword": { "title": "keyword", "type": "string", "description": "Search for lives by keyword. Example: 'tiktok'", "default": "" }, "searchLives_count": { "title": "count", "type": "integer", "description": "Number of lives to retrieve. Default is 20.", "default": 20 }, "searchLives_offset": { "title": "offset", "type": "integer", "description": "Offset for pagination. Default is 0.", "default": 0 }, "discoverMusic_run": { "title": "run discover music", "type": "boolean", "description": "Check to run the Discover Music endpoint.", "default": false }, "discoverMusic_count": { "title": "count", "type": "integer", "description": "Number of songs to retrieve. Default is 10.", "default": 10 }, "discoverMusic_cursor": { "title": "cursor", "type": "integer", "description": "Pagination cursor to retrieve more songs.", "default": 0 }, "trendingCreators_run": { "title": "run trending creators", "type": "boolean", "description": "Check to run the Trending Creators endpoint.", "default": false }, "trendingCreators_region": { "title": "region", "type": "string", "description": "Get the trending creators.", "default": "US" }, "videoWithoutWatermark_awemeId": { "title": "aweme_id", "type": "string", "description": "Get the video without watermark. Example: 6811123699203329285", "default": "" } } }, "runsResponseSchema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "actId": { "type": "string" }, "userId": { "type": "string" }, "startedAt": { "type": "string", "format": "date-time", "example": "2025-01-08T00:00:00.000Z" }, "finishedAt": { "type": "string", "format": "date-time", "example": "2025-01-08T00:00:00.000Z" }, "status": { "type": "string", "example": "READY" }, "meta": { "type": "object", "properties": { "origin": { "type": "string", "example": "API" }, "userAgent": { "type": "string" } } }, "stats": { "type": "object", "properties": { "inputBodyLen": { "type": "integer", "example": 2000 }, "rebootCount": { "type": "integer", "example": 0 }, "restartCount": { "type": "integer", "example": 0 }, "resurrectCount": { "type": "integer", "example": 0 }, "computeUnits": { "type": "integer", "example": 0 } } }, "options": { "type": "object", "properties": { "build": { "type": "string", "example": "latest" }, "timeoutSecs": { "type": "integer", "example": 300 }, "memoryMbytes": { "type": "integer", "example": 1024 }, "diskMbytes": { "type": "integer", "example": 2048 } } }, "buildId": { "type": "string" }, "defaultKeyValueStoreId": { "type": "string" }, "defaultDatasetId": { "type": "string" }, "defaultRequestQueueId": { "type": "string" }, "buildNumber": { "type": "string", "example": "1.0.0" }, "containerUrl": { "type": "string" }, "usage": { "type": "object", "properties": { "ACTOR_COMPUTE_UNITS": { "type": "integer", "example": 0 }, "DATASET_READS": { "type": "integer", "example": 0 }, "DATASET_WRITES": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_READS": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_WRITES": { "type": "integer", "example": 1 }, "KEY_VALUE_STORE_LISTS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_READS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_WRITES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_INTERNAL_GBYTES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_EXTERNAL_GBYTES": { "type": "integer", "example": 0 }, "PROXY_RESIDENTIAL_TRANSFER_GBYTES": { "type": "integer", "example": 0 }, "PROXY_SERPS": { "type": "integer", "example": 0 } } }, "usageTotalUsd": { "type": "number", "example": 0.00005 }, "usageUsd": { "type": "object", "properties": { "ACTOR_COMPUTE_UNITS": { "type": "integer", "example": 0 }, "DATASET_READS": { "type": "integer", "example": 0 }, "DATASET_WRITES": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_READS": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_WRITES": { "type": "number", "example": 0.00005 }, "KEY_VALUE_STORE_LISTS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_READS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_WRITES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_INTERNAL_GBYTES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_EXTERNAL_GBYTES": { "type": "integer", "example": 0 }, "PROXY_RESIDENTIAL_TRANSFER_GBYTES": { "type": "integer", "example": 0 }, "PROXY_SERPS": { "type": "integer", "example": 0 } } } } } } } } }}
TikTok API (pay per event) OpenAPI definition
OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for TikTok API (pay per event) from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients: