{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper",
    "description": "TikTok posts without an API key: views, likes, comments, shares, saves, caption, hashtags, sound and author. Optional MP4, cover, avatar and subtitle downloads, since TikTok's own links expire. Works from post URLs, hashtags and related videos. Example: hashtag 'cooking', 20 videos.",
    "version": "1.0",
    "x-build-id": "bMECsTnzda3arU7Fq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/badr_xba~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-badr_xba-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/badr_xba~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-badr_xba-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/badr_xba~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-badr_xba-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": {
          "postURLs": {
            "title": "Post URLs",
            "type": "array",
            "description": "TikTok post addresses, one per line: https://www.tiktok.com/@nasa/video/1234567890. A bare video ID or a vm.tiktok.com short link works too. This is the fastest and most reliable input — every field comes from the post's own page.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags to follow, with or without the #: cooking, travel, smallbusiness. You get the hashtag's own figures (views, number of videos) plus the posts published under it.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "TikTok accounts, as nasa, @nasa or a full profile URL. Account figures — followers, likes, number of videos, bio — always come back. Their video lists need the RESIDENTIAL proxy group; see the README.",
            "items": {
              "type": "string"
            }
          },
          "resultsPerPage": {
            "title": "Videos per hashtag or profile",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many posts to collect under each hashtag and for each profile. Post URLs you list yourself are never limited by this.",
            "default": 20
          },
          "maxItems": {
            "title": "Maximum posts in total",
            "minimum": 0,
            "type": "integer",
            "description": "A ceiling for the whole run, across every input. Leave at 0 for no ceiling.",
            "default": 0
          },
          "scrapeHashtagVideos": {
            "title": "Collect the videos under each hashtag",
            "type": "boolean",
            "description": "On, each hashtag also returns its posts. Off, you only get the hashtag's counters, which is much faster and cheaper.",
            "default": true
          },
          "scrapeProfileVideos": {
            "title": "Collect the videos of each profile",
            "type": "boolean",
            "description": "On, each profile also returns its posts. This is the one part of the Actor that TikTok reserves for residential addresses: without that proxy group it is tried once and reported, never retried at your expense. Account figures come back either way.",
            "default": true
          },
          "scrapeRelatedVideos": {
            "title": "Collect videos related to each post URL",
            "type": "boolean",
            "description": "Adds the posts TikTok recommends next to each post URL you listed — about fifteen per post. A cheap way to widen a sample around a topic, or to find more of a creator's work without a residential proxy.",
            "default": false
          },
          "oldestPostDate": {
            "title": "Published after",
            "type": "string",
            "description": "Keep only posts published after this date. A date such as 2026-01-31, or a phrase such as 7 days."
          },
          "newestPostDate": {
            "title": "Published before",
            "type": "string",
            "description": "Keep only posts published before this date."
          },
          "minPlayCount": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts watched fewer times than this."
          },
          "minDiggCount": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop posts with fewer likes than this."
          },
          "shouldDownloadVideos": {
            "title": "Download the video files",
            "type": "boolean",
            "description": "Saves each MP4 in the run's storage and adds its address to the row. TikTok's own media links expire within days, so downloading is the only way to keep them. Expect a much longer, heavier run.",
            "default": false
          },
          "shouldDownloadCovers": {
            "title": "Download the cover images",
            "type": "boolean",
            "description": "Saves the thumbnail of each post.",
            "default": false
          },
          "shouldDownloadAvatars": {
            "title": "Download the author avatars",
            "type": "boolean",
            "description": "Saves the profile picture of each author, once per account.",
            "default": false
          },
          "shouldDownloadMusicCovers": {
            "title": "Download the music covers",
            "type": "boolean",
            "description": "Saves the artwork of the sound used by each post.",
            "default": false
          },
          "shouldDownloadSubtitles": {
            "title": "Download the subtitles",
            "type": "boolean",
            "description": "Saves the subtitle tracks TikTok publishes for a post, when it has any.",
            "default": false
          },
          "shouldDownloadSlideshowImages": {
            "title": "Download slideshow images",
            "type": "boolean",
            "description": "Photo posts carry images instead of a video: this saves them, up to twenty per post.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "TikTok is strict about addresses. Datacenter proxies are enough for post URLs, hashtags and account figures. Profile video lists need the RESIDENTIAL group.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}