{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper",
    "description": "TikTok scraper for every input in one run: paste video, profile, hashtag or search links, or type hashtags, profiles and keywords. One row per video with caption, creator, followers, plays, likes, comments, shares, saves, music, hashtags, post date and a video file link. No login.",
    "version": "0.1",
    "x-build-id": "ikapVpkF7Vl546Yna"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deepmine~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deepmine-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/deepmine~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deepmine-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/deepmine~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deepmine-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": {
          "startUrls": {
            "title": "🔗 TikTok links",
            "type": "array",
            "description": "Any TikTok link, one per line: a video, a short vm.tiktok.com or tiktok.com/t/ share link, a profile, a /tag/ hashtag page, a /search page or a /music/ sound. Each is read for what it is.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "hashtags": {
            "title": "#️⃣ Hashtags",
            "type": "array",
            "description": "Hashtags, one per line, with or without #, e.g. booktok. Each gets up to the videos per input.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "profiles": {
            "title": "👤 Profiles",
            "type": "array",
            "description": "TikTok usernames, with or without @, e.g. zachking. Each gives its newest videos, up to the videos per input.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "searchQueries": {
            "title": "🔍 Search keywords",
            "type": "array",
            "description": "Words to search TikTok videos for, one search per line, e.g. street food. TikTok ends a search after about 200 videos.",
            "items": {
              "type": "string",
              "pattern": "\\S"
            }
          },
          "resultsPerInput": {
            "title": "💯 Videos per input",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most videos from each profile, hashtag, search or link. You pay per video. A link to one video always gives that one video."
          },
          "postedAfter": {
            "title": "📅 Only videos posted after (profiles, searches)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}.*$|^\\d+\\s*(minute|hour|day|week|month)s?(\\s+ago)?$",
            "type": "string",
            "description": "Skip older videos from profiles and searches: a date (YYYY-MM-DD) or a period such as 7 days. Hashtag feeds aren't ordered by date, so they aren't filtered. Empty = all."
          },
          "postedBefore": {
            "title": "📅 Only videos posted before (profiles)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}.*$|^\\d+\\s*(minute|hour|day|week|month)s?(\\s+ago)?$",
            "type": "string",
            "description": "Skip profile videos posted after this date (YYYY-MM-DD; the whole day counts) or a period such as 30 days ago. Empty = all."
          },
          "sortOrder": {
            "title": "🔍 Search order",
            "enum": [
              "relevance",
              "mostRecent",
              "mostViews",
              "mostLikes"
            ],
            "type": "string",
            "description": "Relevance keeps TikTok's order. The others sort everything TikTok's search shows for a keyword (roughly 150-250 videos), then keep your videos per input: the run reads the whole search, but you pay only for the videos you get."
          },
          "datePosted": {
            "title": "🔍 Search posted within",
            "enum": [
              "allTime",
              "today",
              "thisWeek",
              "thisMonth",
              "3months",
              "6months"
            ],
            "type": "string",
            "description": "Keep only search results posted in this window (a month is 30 days). TikTok's results aren't sorted by date, so a short window can give fewer videos than you asked for."
          },
          "profileSorting": {
            "title": "👤 Profile video order",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "As the profile's tabs on TikTok. Popular is TikTok's own ranking: pinned videos, then mostly the most played. TikTok refuses Popular and Oldest on many datacenter IPs: if a profile fails with them, use a residential proxy.",
            "default": "latest"
          },
          "profileSections": {
            "title": "👤 Profile sections",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Reposts are other creators' videos the profile reposted (their rows name their own creator). Stories are the ones up right now. Videos per input counts all of them together.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts",
                "stories"
              ],
              "enumTitles": [
                "Own videos",
                "Reposts",
                "Stories (up now)"
              ]
            }
          },
          "excludePinnedPosts": {
            "title": "👤 Skip pinned videos",
            "type": "boolean",
            "description": "Leave out the videos a creator pinned to the top of the profile.",
            "default": false
          },
          "minLikes": {
            "title": "❤️ Min likes (profiles)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profile videos with at least this many likes. Others are free and don't count toward Videos per input. To find them the run reads up to 1,000 videos per profile (or 10 per video you ask for, if more). Empty = no minimum."
          },
          "maxLikes": {
            "title": "❤️ Max likes (profiles)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profile videos with at most this many likes. Empty = no maximum."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: Apify's datacenter proxy works for every input. Only Popular or Oldest profile order can need a residential proxy.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resultsPerPage": {
            "title": "Videos per input (other Actors' inputs)",
            "type": "integer",
            "description": "The same as resultsPerInput (resultsPerPage)."
          },
          "oldestPostDateUnified": {
            "title": "Posted after (other Actors' inputs)",
            "type": "string",
            "description": "The same as postedAfter, or a number of days: 1 is today, 2 yesterday and today (oldestPostDateUnified)."
          },
          "newestPostDate": {
            "title": "Posted before (other Actors' inputs)",
            "type": "string",
            "description": "The same as postedBefore (newestPostDate)."
          },
          "leastDiggs": {
            "title": "Min likes (other Actors' inputs)",
            "type": "integer",
            "description": "The same as minLikes (leastDiggs)."
          },
          "mostDiggs": {
            "title": "Fewer likes than (other Actors' inputs)",
            "type": "integer",
            "description": "Keep videos with fewer likes than this (mostDiggs)."
          },
          "videoSearchSorting": {
            "title": "Search order (other Actors' inputs)",
            "type": "string",
            "description": "MOST_RELEVANT, MOST_LIKED or LATEST: the same as sortOrder (videoSearchSorting)."
          },
          "videoSearchDateFilter": {
            "title": "Search posted within (other Actors' inputs)",
            "type": "string",
            "description": "ALL_TIME, PAST_24_HOURS, PAST_WEEK, PAST_MONTH, LAST_3_MONTHS or LAST_6_MONTHS: the same as datePosted (videoSearchDateFilter)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}