{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Profile Scraper",
    "description": "Scrape any TikTok profile: videos, reposts, stories and playlists with views, likes, comments, shares, music, hashtags and author stats. Optional followers, comments, transcripts and media downloads. Clean JSON, live results, no login needed.",
    "version": "1.0",
    "x-build-id": "MiT0pyqkb1hV5vAAr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insights_data~tiktok-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insights_data-tiktok-profile-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/insights_data~tiktok-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-insights_data-tiktok-profile-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/insights_data~tiktok-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-insights_data-tiktok-profile-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",
        "required": [
          "profiles"
        ],
        "properties": {
          "profiles": {
            "title": "🧑‍🎤 TikTok profiles",
            "minItems": 1,
            "type": "array",
            "description": "One profile per line: a username (nike), an @handle, a numeric user ID or a profile link such as https://www.tiktok.com/@nike. Add as many as you like.",
            "items": {
              "type": "string"
            }
          },
          "resultsPerPage": {
            "title": "📊 Max posts per profile",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum posts collected for each profile and each chosen part of it. A small profile may end before this number; the log says why.",
            "default": 10
          },
          "profileScrapeSections": {
            "title": "🗂️ What to collect",
            "type": "array",
            "description": "Videos are the normal posts. Reposts are videos the profile shared from others. Stories need an active story. Playlists collects the videos inside the profile's playlists.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts",
                "stories",
                "playlists"
              ],
              "enumTitles": [
                "Videos",
                "Reposts",
                "Stories",
                "Playlists"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "profileSorting": {
            "title": "↕️ Sort posts by",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Latest or Oldest go through the whole profile. Most popular is limited by TikTok to roughly the top 400 to 500 videos and ignores the date filters. Sorting applies to Videos only.",
            "default": "latest"
          },
          "oldestPostDateUnified": {
            "title": "🗓️ Posted after",
            "type": "string",
            "description": "Only keep posts published on or after this day. Pick a date or a period back from today, such as 3 days, 1 week or 2 months. Works with Latest and Oldest sorting."
          },
          "newestPostDate": {
            "title": "📆 Posted before",
            "type": "string",
            "description": "Only keep posts published on or before this day. Pick a date or a period back from today."
          },
          "leastDiggs": {
            "title": "❤️ Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep posts with at least this many likes. 0 means no minimum.",
            "default": 0
          },
          "mostDiggs": {
            "title": "💔 Maximum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep posts with fewer likes than this. 0 means no maximum.",
            "default": 0
          },
          "leastPlays": {
            "title": "🔥 Minimum plays",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep posts with at least this many plays. 0 means no minimum.",
            "default": 0
          },
          "mostPlays": {
            "title": "🧊 Maximum plays",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep posts with fewer plays than this. 0 means no maximum.",
            "default": 0
          },
          "postTypes": {
            "title": "🎞️ Post type",
            "enum": [
              "all",
              "videos",
              "slideshows"
            ],
            "type": "string",
            "description": "Keep every post, only videos, or only photo slideshows.",
            "default": "all"
          },
          "filterHashtags": {
            "title": "#️⃣ Hashtags to keep",
            "type": "array",
            "description": "Keep only posts that carry at least one of these hashtags (with or without the #). Leave empty for all posts.",
            "items": {
              "type": "string"
            }
          },
          "filterKeywords": {
            "title": "🔎 Words in the caption",
            "type": "array",
            "description": "Keep only posts whose caption contains at least one of these words. Leave empty for all posts.",
            "items": {
              "type": "string"
            }
          },
          "excludePinnedPosts": {
            "title": "📌 Skip pinned posts",
            "type": "boolean",
            "description": "Leave out the posts the profile pinned to the top.",
            "default": false
          },
          "maxFollowersPerProfile": {
            "title": "🫂 Followers per profile",
            "minimum": 0,
            "type": "integer",
            "description": "How many followers to collect for each profile. They go to the Followers table. 0 means none. Many profiles hide this list.",
            "default": 0
          },
          "maxFollowingPerProfile": {
            "title": "➡️ Following per profile",
            "minimum": 0,
            "type": "integer",
            "description": "How many accounts each profile follows to collect. They go to the Followers table. 0 means none.",
            "default": 0
          },
          "commentsPerPost": {
            "title": "💬 Comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum comments (replies included) collected for each post. They go to the Comments table. 0 means none.",
            "default": 0
          },
          "topLevelCommentsPerPost": {
            "title": "🗨️ Top-level comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum main comments (without replies) collected for each post. 0 means no separate limit.",
            "default": 0
          },
          "maxRepliesPerComment": {
            "title": "↩️ Replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum replies collected under each main comment. 0 means no replies.",
            "default": 0
          },
          "shouldDownloadVideos": {
            "title": "🎬 Download videos",
            "type": "boolean",
            "description": "Save each video file to the run's storage and add its link to the post.",
            "default": false
          },
          "shouldDownloadCovers": {
            "title": "🖼️ Download covers",
            "type": "boolean",
            "description": "Save each post's cover image.",
            "default": false
          },
          "shouldDownloadSlideshowImages": {
            "title": "🎠 Download slideshow images",
            "type": "boolean",
            "description": "Save every image of photo slideshow posts.",
            "default": false
          },
          "shouldDownloadAvatars": {
            "title": "🙂 Download profile pictures",
            "type": "boolean",
            "description": "Save each creator's profile picture.",
            "default": false
          },
          "shouldDownloadMusic": {
            "title": "🎶 Download sounds",
            "type": "boolean",
            "description": "Save the sound used in each post.",
            "default": false
          },
          "downloadSubtitlesOptions": {
            "title": "📝 Subtitles and transcripts",
            "enum": [
              "NEVER_DOWNLOAD_SUBTITLES",
              "DOWNLOAD_SUBTITLES",
              "DOWNLOAD_AND_TRANSCRIBE_VIDEOS_WITHOUT_SUBTITLES",
              "TRANSCRIBE_ALL_VIDEOS"
            ],
            "type": "string",
            "description": "Download the posts' own subtitles, and optionally turn the speech of videos into text. Transcribing downloads the video and is slower.",
            "default": "NEVER_DOWNLOAD_SUBTITLES"
          },
          "transcriptionModel": {
            "title": "🧠 Transcription quality",
            "enum": [
              "tiny",
              "base",
              "small",
              "medium",
              "large-v3"
            ],
            "type": "string",
            "description": "Bigger models are more accurate but slower. Only used when transcribing.",
            "default": "base"
          },
          "transcriptionLanguage": {
            "title": "🗣️ Speech language",
            "type": "string",
            "description": "Two-letter language code of the speech, such as en or es. Leave empty to detect it automatically."
          },
          "videoKvStoreIdOrName": {
            "title": "🗄️ Storage for files",
            "type": "string",
            "description": "Name or ID of a key-value store to keep downloaded files in. Leave empty to use the run's own storage."
          },
          "skipKnownPosts": {
            "title": "🧹 Skip posts from an earlier run",
            "type": "string",
            "description": "Pick the dataset of an earlier run. Posts already in it are not saved or billed again."
          },
          "customMapFunction": {
            "title": "🧪 Custom map function",
            "type": "string",
            "description": "Optional Python to change or drop posts. Either one expression over `record`, such as record if record['playCount'] > 1000 else None, or a function def map_function(record): that returns the post or None to drop it."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Leave on the default to let the actor pick the connection it needs. Choose a proxy only if you want to start from your own.",
            "default": {}
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}