{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper",
    "description": "Scrape TikTok videos, profiles and comments from creators, hashtags, search keywords, video links and sounds in one run: views, likes, shares, captions, hashtags, author and sound details, with date filters. No login.",
    "version": "0.1",
    "x-build-id": "4vItyijlbFAjKyECE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automly~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automly-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/automly~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automly-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/automly~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automly-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",
        "properties": {
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "TikTok usernames or profile links, e.g. khaby.lame, @khaby.lame or https://www.tiktok.com/@khaby.lame. You get each creator's latest videos.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags, with or without #, e.g. cooking or #booktok. You get videos TikTok shows for each hashtag.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search on TikTok, e.g. iphone review. You get the videos (or profiles, see Search results) TikTok shows for each keyword, in TikTok's order.",
            "items": {
              "type": "string"
            }
          },
          "postURLs": {
            "title": "Video links",
            "type": "array",
            "description": "Links to TikTok videos or photo posts, e.g. https://www.tiktok.com/@scout2015/video/6718335390845095173. Short links (vm.tiktok.com/...) and numeric video IDs work too.",
            "items": {
              "type": "string"
            }
          },
          "musicURLs": {
            "title": "Sound links",
            "type": "array",
            "description": "Links to TikTok sounds or their numeric IDs, e.g. https://www.tiktok.com/music/original-sound-6745161928949106690. You get videos that use each sound.",
            "items": {
              "type": "string"
            }
          },
          "profileScrapeSections": {
            "title": "Profile sections",
            "type": "array",
            "description": "Which lists to read from each profile: their videos, the videos they reposted, and their stories that are live now. Each section gets up to Videos per input.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts",
                "stories"
              ],
              "enumTitles": [
                "Videos",
                "Reposts",
                "Stories"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "profileSorting": {
            "title": "Profile video order",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Which of each creator's videos come first: latest, most popular or oldest.",
            "default": "latest"
          },
          "maxFollowersPerProfile": {
            "title": "Followers per profile",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "How many of each creator's followers to get, newest first, e.g. 100. Each follower is a profile row. 0 means none.",
            "default": 0
          },
          "maxFollowingPerProfile": {
            "title": "Following per profile",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "How many of the accounts each creator follows to get, e.g. 100. Each one is a profile row. 0 means none.",
            "default": 0
          },
          "resultsPerPage": {
            "title": "Videos per input",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many videos to get for each profile, hashtag, keyword and sound, e.g. 20. With Search results set to Profiles, how many profiles per keyword.",
            "default": 20
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "The most rows this run saves in total, across all inputs, e.g. 500. Videos, profiles and comments all count. Set 0 for no limit.",
            "default": 1000
          },
          "oldestPostDateUnified": {
            "title": "Videos published after",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2})?(\\.\\d+)?(Z|[+-]\\d{2}:?\\d{2})?)?$|^[+-]?\\s*\\d+\\s*(minute|hour|day|week|month|year)s?$",
            "type": "string",
            "description": "Only videos published on or after this date, e.g. 2026-09-01, or within a recent period, e.g. 7 days. Times are UTC. Does not apply to video links."
          },
          "newestPostDate": {
            "title": "Videos published before",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2})?(\\.\\d+)?(Z|[+-]\\d{2}:?\\d{2})?)?$",
            "type": "string",
            "description": "Only videos published on or before this date, e.g. 2026-09-30 (the whole day counts). Times are UTC. Does not apply to video links."
          },
          "excludePinnedPosts": {
            "title": "Skip pinned videos",
            "type": "boolean",
            "description": "Skip the videos creators pinned to the top of their profile.",
            "default": false
          },
          "leastDiggs": {
            "title": "At least Likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at least this many likes, e.g. 1000. Does not apply to video links."
          },
          "mostDiggs": {
            "title": "At most Likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at most this many likes, e.g. 1000. Does not apply to video links."
          },
          "leastShares": {
            "title": "At least Shares",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at least this many shares, e.g. 50. Does not apply to video links."
          },
          "mostShares": {
            "title": "At most Shares",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at most this many shares, e.g. 50. Does not apply to video links."
          },
          "leastComments": {
            "title": "At least Comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at least this many comments, e.g. 20. Does not apply to video links."
          },
          "mostComments": {
            "title": "At most Comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at most this many comments, e.g. 20. Does not apply to video links."
          },
          "leastPlays": {
            "title": "At least Views",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at least this many views, e.g. 10000. Does not apply to video links."
          },
          "mostPlays": {
            "title": "At most Views",
            "minimum": 0,
            "type": "integer",
            "description": "Only videos with at most this many views, e.g. 10000. Does not apply to video links."
          },
          "searchSection": {
            "title": "Search results",
            "enum": [
              "",
              "/video",
              "/user"
            ],
            "type": "string",
            "description": "Which search tab to read: Top (what TikTok shows first), Videos, or Profiles.",
            "default": ""
          },
          "videoSearchDateFilter": {
            "title": "Search results posted within",
            "enum": [
              "ALL_TIME",
              "PAST_24_HOURS",
              "PAST_WEEK",
              "PAST_MONTH",
              "LAST_3_MONTHS",
              "LAST_6_MONTHS"
            ],
            "type": "string",
            "description": "Only search results posted within this period, e.g. Past week. Results keep TikTok's order.",
            "default": "ALL_TIME"
          },
          "scrapeRelatedSearchWords": {
            "title": "Related search words",
            "type": "boolean",
            "description": "Add the searches TikTok suggests next to each keyword (\"Others searched for\") to its results.",
            "default": false
          },
          "scrapeRelatedVideos": {
            "title": "Related videos",
            "type": "boolean",
            "description": "For each video link, also get up to 15 videos TikTok recommends next to it.",
            "default": false
          },
          "includeAuthorData": {
            "title": "Author data",
            "type": "boolean",
            "description": "Add the creator's details to every video (authorMeta): followers, following, total likes, video count, bio, avatar, verified badge.",
            "default": true
          },
          "includeMusicData": {
            "title": "Sound data",
            "type": "boolean",
            "description": "Add the sound's details to every video (musicMeta): name, author, original or not, album, audio link, cover.",
            "default": true
          },
          "includeProfileDetails": {
            "title": "Profile rows",
            "type": "boolean",
            "description": "Add one row per creator in Profiles with their profile: bio, bio link, followers, following, total likes, video count, verified badge. Each counts as a profile result.",
            "default": false
          },
          "commentsPerPost": {
            "title": "Comments per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "How many comments to get from every video saved, e.g. 50. Each comment is its own row. 0 means no comments.",
            "default": 0
          },
          "maxRepliesPerComment": {
            "title": "Replies per comment",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "How many replies to get under each comment, e.g. 10. 0 means no replies.",
            "default": 0
          },
          "shouldDownloadVideos": {
            "title": "Save videos",
            "type": "boolean",
            "description": "Save each video file (without the TikTok watermark) to the run's storage and add its link to the row (videoMeta.downloadAddr).",
            "default": false
          },
          "shouldDownloadCovers": {
            "title": "Save covers",
            "type": "boolean",
            "description": "Save each video's cover image and add its link (videoMeta.storedCoverUrl).",
            "default": false
          },
          "shouldDownloadAvatars": {
            "title": "Save avatars",
            "type": "boolean",
            "description": "Save each creator's profile picture once and add its link (authorMeta.storedAvatarUrl). Needs Author data on.",
            "default": false
          },
          "shouldDownloadMusicCovers": {
            "title": "Save sound covers",
            "type": "boolean",
            "description": "Save each sound's cover image once and add its link (musicMeta.storedCoverUrl). Needs Sound data on.",
            "default": false
          },
          "downloadSubtitlesOptions": {
            "title": "Subtitles",
            "enum": [
              "NEVER_DOWNLOAD_SUBTITLES",
              "DOWNLOAD_SUBTITLES"
            ],
            "type": "string",
            "description": "Videos with captions always list their caption tracks (videoMeta.subtitleLinks). Choose Links and full text to also get each track's text (WebVTT) in subtitles.",
            "default": "NEVER_DOWNLOAD_SUBTITLES"
          },
          "maxDownloadSizeMb": {
            "title": "Max size of saved files (MB)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most the saved files may take up in one run, all together, e.g. 500. When it is reached, rows keep coming without files. A single video over 100 MB is not saved.",
            "default": 500
          },
          "language": {
            "title": "Language",
            "pattern": "^[a-zA-Z]{2}(-[a-zA-Z]{2})?$",
            "type": "string",
            "description": "Two-letter language code for the results, e.g. en, es, fr, de or ja.",
            "default": "en"
          },
          "proxyCountryCode": {
            "title": "Country",
            "enum": [
              "None",
              "AF",
              "AL",
              "DZ",
              "AS",
              "AD",
              "AO",
              "AI",
              "AG",
              "AR",
              "AM",
              "AU",
              "AT",
              "AZ",
              "BS",
              "BH",
              "BB",
              "BY",
              "BE",
              "BZ",
              "BJ",
              "BM",
              "BT",
              "BO",
              "BA",
              "BW",
              "BR",
              "VG",
              "BN",
              "BG",
              "BF",
              "BI",
              "KH",
              "CM",
              "CA",
              "CV",
              "KY",
              "TD",
              "CL",
              "CO",
              "CK",
              "CR",
              "HR",
              "CY",
              "CZ",
              "CD",
              "DK",
              "DJ",
              "DO",
              "EC",
              "EG",
              "SV",
              "EE",
              "ET",
              "FK",
              "FJ",
              "FI",
              "FR",
              "PF",
              "GA",
              "GE",
              "DE",
              "GH",
              "GI",
              "GR",
              "GL",
              "GD",
              "GP",
              "GT",
              "GN",
              "GW",
              "GY",
              "HN",
              "HU",
              "IS",
              "ID",
              "IQ",
              "IE",
              "IM",
              "IL",
              "IT",
              "CI",
              "JM",
              "JP",
              "JE",
              "KZ",
              "KE",
              "XK",
              "KW",
              "LA",
              "LV",
              "LB",
              "LS",
              "LR",
              "LY",
              "LT",
              "LU",
              "MO",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MH",
              "MQ",
              "MR",
              "MU",
              "MX",
              "MD",
              "MC",
              "MN",
              "ME",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NR",
              "NP",
              "NL",
              "NZ",
              "NI",
              "NG",
              "MK",
              "NO",
              "OM",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PL",
              "PT",
              "PR",
              "QA",
              "CG",
              "RO",
              "RU",
              "RW",
              "RE",
              "KN",
              "LC",
              "MF",
              "PM",
              "VC",
              "SM",
              "SA",
              "SN",
              "RS",
              "SL",
              "SG",
              "SX",
              "SK",
              "SB",
              "SO",
              "ZA",
              "KR",
              "ES",
              "LK",
              "SR",
              "SZ",
              "SE",
              "CH",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TG",
              "TO",
              "TT",
              "TN",
              "TR",
              "TC",
              "TV",
              "VI",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UY",
              "VE",
              "VN",
              "WF",
              "YE",
              "ZM",
              "ZW",
              "AX"
            ],
            "type": "string",
            "description": "Read TikTok as people in this country see it: hashtags, searches and some videos differ by country. None uses the default.",
            "default": "None"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The default works for most runs.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}