{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper",
    "description": "Scrape TikTok profiles, videos, hashtags, sounds, locations, search and comments. Get views, likes, shares, bookmarks, creator stats, video download URLs, music and captions as clean JSON. Pull followers, following and reposts too. No login. Ideal for influencer research and trend tracking.",
    "version": "1.0",
    "x-build-id": "ckueRfuOI4lRiCsWm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/silentflow~tiktok-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-silentflow-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/silentflow~tiktok-scraper/runs": {
      "post": {
        "operationId": "runs-sync-silentflow-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/silentflow~tiktok-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-silentflow-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": "Start URLs",
            "type": "array",
            "description": "TikTok user, video, photo, search, tag, music, or location URLs to scrape.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Search Keywords",
            "type": "array",
            "description": "Keywords to search on TikTok.",
            "items": {
              "type": "string"
            }
          },
          "dateRange": {
            "title": "Date Range",
            "enum": [
              "DEFAULT",
              "ALL_TIME",
              "YESTERDAY",
              "THIS_WEEK",
              "THIS_MONTH",
              "LAST_THREE_MONTHS",
              "LAST_SIX_MONTHS"
            ],
            "type": "string",
            "description": "Date filter for search results. Applies to keyword and search inputs only.",
            "default": "DEFAULT"
          },
          "location": {
            "title": "Region",
            "type": "string",
            "description": "Region to retrieve results from, as an ISO 3166-1 alpha-2 country code (e.g. US, GB, DE).",
            "default": "US"
          },
          "sortType": {
            "title": "Sort Type",
            "enum": [
              "RELEVANCE",
              "MOST_LIKED",
              "DATE_POSTED"
            ],
            "type": "string",
            "description": "Sort order for search results. Applies to keyword and search inputs only.",
            "default": "RELEVANCE"
          },
          "maxItems": {
            "title": "Max items",
            "type": "integer",
            "description": "Maximum number of items to output.",
            "default": 1000
          },
          "maxComments": {
            "title": "Max comments per post",
            "type": "integer",
            "description": "If > 0, also scrape up to this many comments for each video/photo URL.",
            "default": 0
          },
          "customMapFunction": {
            "title": "Custom map function",
            "type": "string",
            "description": "JavaScript function to transform each output item. Use to rename or add fields. Not for filtering."
          },
          "includeSearchKeywords": {
            "title": "Include Search Keywords",
            "type": "boolean",
            "description": "When enabled, adds the source search keyword to each item."
          },
          "maxFollowing": {
            "title": "Max following",
            "type": "integer",
            "description": "If greater than 0, also scrape up to this many accounts each profile follows.",
            "default": 0
          },
          "maxFollowers": {
            "title": "Max followers",
            "type": "integer",
            "description": "If greater than 0, also scrape up to this many of each profile's followers. TikTok limits follower visibility for some accounts.",
            "default": 0
          },
          "scrapeReposts": {
            "title": "Scrape reposts",
            "type": "boolean",
            "description": "Also scrape videos a profile has reposted."
          },
          "scrapeRelatedVideos": {
            "title": "Scrape related videos",
            "type": "boolean",
            "description": "For video URLs, also scrape related videos."
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Keep only posts on or after this date (YYYY-MM-DD). Applies to all surfaces."
          },
          "onlyPostsOlderThan": {
            "title": "Only posts older than",
            "type": "string",
            "description": "Keep only posts on or before this date (YYYY-MM-DD). Applies to all surfaces."
          },
          "minLikes": {
            "title": "Min likes",
            "type": "integer",
            "description": "Keep only posts with at least this many likes. Applies to all surfaces.",
            "default": 0
          },
          "maxLikes": {
            "title": "Max likes",
            "type": "integer",
            "description": "Keep only posts with at most this many likes (0 = no limit). Applies to all surfaces.",
            "default": 0
          },
          "excludePinnedPosts": {
            "title": "Exclude pinned posts",
            "type": "boolean",
            "description": "Skip posts a creator has pinned to the top of their profile."
          },
          "profileSorting": {
            "title": "Profile video order",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Order for a creator's videos: latest, most popular, or oldest.",
            "default": "latest"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}