{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Super Scraper - Profiles, Videos, Comments, Ads & Shop",
    "description": "Scrape every public TikTok surface in one run: accounts and their videos, keyword search, comments, video downloads, related videos, the Explore feed, hashtag reach, the TikTok Ad Library and TikTok Shop. One input, one merged dataset tagged by source.",
    "version": "0.1",
    "x-build-id": "Z1v2EJ1KueF4O3mnQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~tiktok-super/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-tiktok-super",
        "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/s-r~tiktok-super/runs": {
      "post": {
        "operationId": "runs-sync-s-r-tiktok-super",
        "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/s-r~tiktok-super/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-tiktok-super",
        "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": {
          "query": {
            "title": "Query",
            "type": "string",
            "description": "One term to fan out across every term-driven source at once: account handle, search keyword, advertiser name, shop keyword and hashtag. Leave empty to use the per-source fields below. Any per-source field you also fill overrides the query for that source.",
            "default": ""
          },
          "profiles": {
            "title": "Profiles",
            "type": "array",
            "description": "TikTok handles or profile links. Returns the account plus its recent videos.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keywords to search. Returns matching videos per keyword.",
            "items": {
              "type": "string"
            }
          },
          "comment_videos": {
            "title": "Comment videos",
            "type": "array",
            "description": "Video links or ids. Returns one row per comment (and reply, if enabled).",
            "items": {
              "type": "string"
            }
          },
          "download_videos": {
            "title": "Download videos",
            "type": "array",
            "description": "Video links or ids. Returns the media file/URL and quality ladder per video.",
            "items": {
              "type": "string"
            }
          },
          "advertisers": {
            "title": "Advertisers",
            "type": "array",
            "description": "Advertiser names to look up in the TikTok Ad Library. One row per ad.",
            "items": {
              "type": "string"
            }
          },
          "shop_keywords": {
            "title": "Shop keywords",
            "type": "array",
            "description": "Keywords to search TikTok Shop. One row per product.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags to look up. Returns reach figures (TikTok does not serve the tag's video list).",
            "items": {
              "type": "string"
            }
          },
          "related_to": {
            "title": "Related to",
            "type": "array",
            "description": "Seed video links or ids. Returns the videos TikTok lists as related to each, ~16 per seed.",
            "items": {
              "type": "string"
            }
          },
          "explore": {
            "title": "Explore",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "How many videos to pull from TikTok's public Explore feed. 0 disables it.",
            "default": 0
          },
          "explore_category": {
            "title": "Explore category",
            "type": "string",
            "description": "Optional Explore category id. Leave as 0 for the default mixed feed.",
            "default": "0"
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Limit the run to these sources: profile, search, comments, downloads, ads, shop. Leave empty to run every source that has input.",
            "items": {
              "type": "string"
            }
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter country code for the market (e.g. US, NL). Applied to every source that supports it.",
            "default": "US"
          },
          "max_per_source": {
            "title": "Max per source",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on rows fetched per sub-call (videos per account, comments per video, products per keyword, etc.).",
            "default": 50
          },
          "include_replies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "When reading comments, also fetch replies.",
            "default": false
          },
          "quality": {
            "title": "Quality",
            "type": "string",
            "description": "Preferred quality for video downloads (highest, 1080p, 720p, 540p or lowest). Leave empty for its default; unknown values map to highest."
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many sub-calls to run at once. Does not change the output.",
            "default": 3
          },
          "actor_ids": {
            "title": "Actor ids",
            "type": "object",
            "description": "Override the Actor per source, e.g. {\"profile\": \"s-r/tiktok-profile\"}. Actor IDs keep selecting the specified Actor on Apify. Public HTTP(S) endpoint overrides are also accepted."
          },
          "cursor": {
            "title": "Cursor",
            "type": "string",
            "description": "Continuation cursor from a previous response's next_cursor. Leave empty for a fresh run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}