{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper: Videos, Profiles, Comments, Search & Trends",
    "description": "Scrape TikTok profiles, videos, reposts, followers, comments and replies, search (videos, photos, users, lives, music), hashtags, sounds, places and Creator trends. Real-time, no login, clean JSON. Pay only for results.",
    "version": "1.0",
    "x-build-id": "3YzynS7LN8c95rFuU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapysocial~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapysocial-tiktok-scraper",
        "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/scrapysocial~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapysocial-tiktok-scraper",
        "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/scrapysocial~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapysocial-tiktok-scraper",
        "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",
        "required": [
          "endpoint"
        ],
        "properties": {
          "endpoint": {
            "title": "What to scrape",
            "enum": [
              "user-info",
              "user-posts",
              "user-reposts",
              "user-followers",
              "user-followings",
              "user-similar",
              "user-playlists",
              "user-collections",
              "user-stories",
              "post-detail",
              "post-comments",
              "post-comment-replies",
              "search-top",
              "search-videos",
              "search-photos",
              "search-users",
              "search-lives",
              "search-autocomplete",
              "search-related-keywords",
              "search-music",
              "hashtag-search",
              "hashtag-info",
              "hashtag-posts",
              "music-info",
              "music-posts",
              "place-info",
              "place-search",
              "place-posts",
              "user-live",
              "trending-topics",
              "trending-topic-detail",
              "trending-videos",
              "trending-creators"
            ],
            "type": "string",
            "description": "Pick the TikTok data you want. Then fill only the fields that endpoint uses (each field says which endpoints use it). Full list with descriptions: see the README tab.",
            "default": "search-videos"
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "TikTok handle without @ (e.g. `akuratco`). Send this **or** `secUid`.<br><br><b>Used by:</b> Get user info, Get user posts, Get user reposts, Get user followers, Get user followings, Get similar users +4 more. <b>Required by:</b> Get user live room. <b>Example:</b> <code>akuratco</code>"
          },
          "secUid": {
            "title": "Sec uid",
            "type": "string",
            "description": "TikTok secure user id (`MS4wLjABAAAA…`). Optional — leave empty and send `username`; it is looked up automatically. Sending it skips one lookup (faster).<br><br><b>Used by:</b> Get user info, Get user posts, Get user reposts, Get user followers, Get user followings, Get similar users +3 more."
          },
          "count": {
            "title": "Count",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Results per page.<br><br><b>Used by:</b> Get user posts, Get user reposts, Get user followers, Get user followings, Get similar users, Get user playlists +18 more. <b>Example:</b> <code>12</code>"
          },
          "cursor": {
            "title": "Cursor",
            "type": "string",
            "description": "Pagination cursor. Use `cursor` from the previous response; omit for the first page.<br><br><b>Used by:</b> Get user posts, Get user reposts, Get user playlists, Get user collections, Get user stories, Get post comments +11 more. <b>Example:</b> <code>0</code>"
          },
          "minCursor": {
            "title": "Min cursor",
            "type": "string",
            "description": "Pagination cursor. Use `minCursor` from the previous response; omit for the first page.<br><br><b>Used by:</b> Get user followers, Get user followings. <b>Example:</b> <code>0</code>"
          },
          "userId": {
            "title": "User ID",
            "type": "string",
            "description": "Numeric TikTok user id (`id` in **User Info**). Optional — leave empty and send `username` or `secUid`; it is looked up automatically.<br><br><b>Used by:</b> Get similar users, Get user stories."
          },
          "postId": {
            "title": "Post ID",
            "type": "string",
            "description": "Video / photo post id (the number in `tiktok.com/@user/video/<postId>`).<br><br><b>Used by:</b> Get post detail, Get post comments, Get comment replies. <b>Required by:</b> Get post detail, Get post comments, Get comment replies. <b>Example:</b> <code>7704895406249053448</code>"
          },
          "commentId": {
            "title": "Comment ID",
            "type": "string",
            "description": "Comment id (`comments[].id` from **Get post comments**).<br><br><b>Used by:</b> Get comment replies. <b>Required by:</b> Get comment replies. <b>Example:</b> <code>7704905156580066055</code>"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Place search keyword (city, venue, address fragment).<br><br><b>Used by:</b> Search top results, Search videos, Search photo posts, Search users, Search live streams, Search autocomplete +4 more. <b>Required by:</b> Search top results, Search videos, Search photo posts, Search users, Search live streams, Search autocomplete …. <b>Example:</b> <code>street food</code>"
          },
          "searchId": {
            "title": "Search ID",
            "type": "string",
            "description": "`searchId` returned by the previous page. Optional — send it together with `cursor` for consistent pagination; leave empty on the first page.<br><br><b>Used by:</b> Search top results, Search videos, Search photo posts, Search users."
          },
          "hashtag": {
            "title": "Hashtag",
            "type": "string",
            "description": "Hashtag name without # (e.g. `fyp`). Send this **or** `hashtagId`.<br><br><b>Used by:</b> Get hashtag info, Get hashtag posts. <b>Example:</b> <code>fyppp</code>"
          },
          "hashtagId": {
            "title": "Hashtag ID",
            "type": "string",
            "description": "Numeric hashtag id (`id` from **Get hashtag info**). Optional — leave empty and send `hashtag`.<br><br><b>Used by:</b> Get hashtag posts."
          },
          "musicId": {
            "title": "Music ID",
            "type": "string",
            "description": "TikTok sound id — the number at the end of a sound URL (`tiktok.com/music/Glow-7467591415728801793`) or `music.id` of any post.<br><br><b>Used by:</b> Get music info, Get music posts. <b>Required by:</b> Get music info, Get music posts. <b>Example:</b> <code>7467591415728801793</code>"
          },
          "placeId": {
            "title": "Place ID",
            "type": "string",
            "description": "TikTok place (POI) id — numeric string from a place URL or from `place.id` on a post.<br><br><b>Used by:</b> Get place info, Get place posts. <b>Required by:</b> Get place info, Get place posts. <b>Example:</b> <code>21568226335370744</code>"
          },
          "page": {
            "title": "Page",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Page number, starting at 0. Keep increasing while `hasMore` is true.<br><br><b>Used by:</b> Search places, Get trending videos, Get trending creators. <b>Example:</b> <code>1</code>"
          },
          "region": {
            "title": "Region",
            "enum": [
              "All",
              "US",
              "JP",
              "GB",
              "DE",
              "MX",
              "CA",
              "FR",
              "KR",
              "ID",
              "BR",
              "PH",
              "AU",
              "IT",
              "ES"
            ],
            "type": "string",
            "description": "Region of the topic (`region` used in **Get trending topics**, a country code).<br><br><b>Used by:</b> Get trending topics, Get trending topic detail, Get trending videos, Get trending creators."
          },
          "category": {
            "title": "Category",
            "enum": [
              "All",
              "Entertainment",
              "Beauty_Style",
              "Performance",
              "Sport & Outdoor",
              "Society",
              "Lifestyle",
              "Auto_Vehicle",
              "Talents",
              "Nature",
              "Culture_Education_Technology",
              "Family_Relationship",
              "Supernatural_Horror"
            ],
            "type": "string",
            "description": "Category of the topic.<br><br><b>Used by:</b> Get trending topics, Get trending topic detail, Get trending videos, Get trending creators."
          },
          "topicId": {
            "title": "Topic ID",
            "type": "string",
            "description": "Topic `id` from **Get trending topics**.<br><br><b>Used by:</b> Get trending topic detail. <b>Required by:</b> Get trending topic detail."
          },
          "version": {
            "title": "Version",
            "type": "string",
            "description": "`version` returned by **Get trending topics** (snapshot id). Optional.<br><br><b>Used by:</b> Get trending topic detail."
          },
          "maxItems": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop paginating a query after this many results. Each saved result is one billable \"result-item\" event.",
            "default": 100
          },
          "maxPages": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on API pages fetched per query (a page is usually 10–50 results).",
            "default": 10
          },
          "batch": {
            "title": "Batch (many queries in one run)",
            "type": "array",
            "description": "Optional JSON array. Each object is one query for the selected endpoint; its keys override the form fields above. Example: <code>[{\"username\":\"khaby.lame\"},{\"username\":\"mrbeast\"}]</code>"
          },
          "splitItems": {
            "title": "One row per result",
            "type": "boolean",
            "description": "On (recommended): every post/user/comment is its own dataset row. Off: one row per API page (the list stays nested). Billing is per result either way.",
            "default": true
          },
          "concurrency": {
            "title": "Parallel queries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many batch queries run at the same time.",
            "default": 3
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}