{
  "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": "DLcm90ZT4216scZbF"
  },
  "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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🔗 TikTok profile URLs or usernames",
            "type": "array",
            "description": "One or more TikTok profiles. Each line can be a profile URL (https://www.tiktok.com/@nike), a video URL of the profile, a username with or without @ (nike, @nike) or a numeric user ID. Use Bulk edit to paste a whole list.",
            "items": {
              "type": "string"
            }
          },
          "profileScrapeSections": {
            "title": "🔧 Profile sections to scrape",
            "minItems": 1,
            "type": "array",
            "description": "Which parts of each profile to collect. Videos = the profile's own posts, Reposts = videos the account reposted, Stories = the currently active story, Playlists = every video inside the profile's playlists.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts",
                "stories",
                "playlists"
              ],
              "enumTitles": [
                "Videos",
                "Reposts",
                "Stories",
                "Playlists"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "profileSorting": {
            "title": "🔃 Profile video sorting",
            "enum": [
              "latest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Latest = newest videos first, Oldest = oldest videos first, Popular = most popular videos first. Date filters work best with Latest and Oldest. Popular is limited by TikTok to roughly the 400-500 most popular videos of a profile. Applies to the Videos section only.",
            "default": "latest"
          },
          "resultsPerPage": {
            "title": "🔢 Max posts per profile",
            "minimum": 1,
            "type": "integer",
            "description": "How many posts to collect from every profile (per selected section). Free plan users get up to 10 results per run in total (posts, followers and comments together); paid Apify plans have no limit.",
            "default": 10
          },
          "oldestPostDateUnified": {
            "title": "📅 Posts published on or after",
            "type": "string",
            "description": "Only posts uploaded on or after this date are collected. Pick a date (YYYY-MM-DD) or a relative value: 1 day = today only, 2 days = yesterday and today, and so on."
          },
          "newestPostDate": {
            "title": "📅 Posts published on or before",
            "type": "string",
            "description": "Only posts uploaded on or before this date (YYYY-MM-DD) are collected."
          },
          "leastDiggs": {
            "title": "🎯 Minimum hearts",
            "minimum": 1,
            "type": "integer",
            "description": "Only posts with at least this many hearts (likes)."
          },
          "mostDiggs": {
            "title": "🎯 Hearts below",
            "minimum": 1,
            "type": "integer",
            "description": "Only posts with fewer hearts (likes) than this number."
          },
          "leastPlays": {
            "title": "🎯 Minimum views",
            "minimum": 1,
            "type": "integer",
            "description": "Only posts with at least this many views."
          },
          "mostPlays": {
            "title": "🎯 Views below",
            "minimum": 1,
            "type": "integer",
            "description": "Only posts with fewer views than this number."
          },
          "postTypes": {
            "title": "🎯 Post type",
            "enum": [
              "all",
              "videos",
              "slideshows"
            ],
            "type": "string",
            "description": "Collect all posts, only videos, or only photo slideshows.",
            "default": "all"
          },
          "filterHashtags": {
            "title": "🔎 Only posts with these hashtags",
            "type": "array",
            "description": "Keep posts that carry ANY of these hashtags (with or without #). Leave empty to keep all.",
            "items": {
              "type": "string"
            }
          },
          "filterKeywords": {
            "title": "🔎 Only posts whose caption contains",
            "type": "array",
            "description": "Keep posts whose caption contains ANY of these words (not case-sensitive). Leave empty to keep all.",
            "items": {
              "type": "string"
            }
          },
          "excludePinnedPosts": {
            "title": "✅ Exclude pinned posts",
            "type": "boolean",
            "description": "Skip the posts the creator pinned to the top of the profile.",
            "default": false
          },
          "maxFollowersPerProfile": {
            "title": "🔢 Followers per profile",
            "minimum": 0,
            "type": "integer",
            "description": "Number of follower accounts to collect from each profile. They are saved in the separate Followers output; the link is in authorMeta.followDatasetUrl. 0 = off.",
            "default": 0
          },
          "maxFollowingPerProfile": {
            "title": "🔢 Following per profile",
            "minimum": 0,
            "type": "integer",
            "description": "Number of followed accounts to collect from each profile, saved in the Followers output with type \"following\". 0 = off.",
            "default": 0
          },
          "commentsPerPost": {
            "title": "🔢 Comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum comments (replies included) to collect from every post. They are saved in the separate Comments output; the link is in commentsDatasetUrl. The real number can be lower for posts with thousands of comments. 0 = off.",
            "default": 0
          },
          "topLevelCommentsPerPost": {
            "title": "🔢 Top-level comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum top-level (non-reply) comments per post. 0 = no separate cap.",
            "default": 0
          },
          "maxRepliesPerComment": {
            "title": "🔢 Replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum replies to collect under each top-level comment. Collecting every reply is not guaranteed. 0 = no replies.",
            "default": 0
          },
          "shouldDownloadVideos": {
            "title": "✅ Download videos",
            "type": "boolean",
            "description": "Save every video file to the key-value store; videoMeta.downloadAddr then points to the stored file.",
            "default": false
          },
          "shouldDownloadCovers": {
            "title": "✅ Download cover images",
            "type": "boolean",
            "description": "Save every post's cover image (thumbnail).",
            "default": false
          },
          "shouldDownloadSlideshowImages": {
            "title": "✅ Download slideshow images",
            "type": "boolean",
            "description": "Save every image of photo slideshow posts.",
            "default": false
          },
          "shouldDownloadAvatars": {
            "title": "✅ Download profile avatars",
            "type": "boolean",
            "description": "Save the author's profile picture.",
            "default": false
          },
          "shouldDownloadMusic": {
            "title": "✅ Download music",
            "type": "boolean",
            "description": "Save the sound used in each post.",
            "default": false
          },
          "downloadSubtitlesOptions": {
            "title": "🔧 Subtitles and transcription",
            "enum": [
              "NEVER_DOWNLOAD_SUBTITLES",
              "DOWNLOAD_SUBTITLES",
              "DOWNLOAD_AND_TRANSCRIBE_VIDEOS_WITHOUT_SUBTITLES",
              "TRANSCRIBE_ALL_VIDEOS"
            ],
            "type": "string",
            "description": "Download the subtitles TikTok provides and/or create a speech-to-text transcript of the video. Transcription needs the video file and takes extra time per video.",
            "default": "NEVER_DOWNLOAD_SUBTITLES"
          },
          "transcriptionModel": {
            "title": "🔧 Transcription quality",
            "enum": [
              "tiny",
              "base",
              "small",
              "medium",
              "large-v3"
            ],
            "type": "string",
            "description": "Speech-to-text model size. Bigger models are more accurate but slower.",
            "default": "base"
          },
          "transcriptionLanguage": {
            "title": "🌍 Transcription language",
            "type": "string",
            "description": "Optional two-letter language code (for example en, es, de). Leave empty to detect the language automatically."
          },
          "videoKvStoreIdOrName": {
            "title": "📦 Storage name for media files",
            "type": "string",
            "description": "Name or ID of the key-value store that receives downloaded files. A named store keeps files until you delete it; leave empty to use the run's default store (removed after the data retention period). Letters, digits and hyphens only."
          },
          "includeProfileRecord": {
            "title": "✅ Add a profile summary row",
            "type": "boolean",
            "description": "Also save one summary row per profile (author data and statistics only, no post fields).",
            "default": false
          },
          "customMapFunction": {
            "title": "🔧 Custom map function",
            "type": "string",
            "description": "Optional Python that reshapes every record before it is saved: either one expression over record (for example {\"id\": record[\"id\"], \"views\": record[\"views\"]}) or a full def map_function(record): ... that returns the new record. Returning None drops the record. Keep the original value types of the fields you keep (for example id stays text), otherwise the record cannot be saved. Not meant for filtering."
          },
          "concurrency": {
            "title": "⚡ Parallel profiles",
            "minimum": 1,
            "type": "integer",
            "description": "How many profiles and requests run at the same time.",
            "default": 4
          },
          "max_retries": {
            "title": "🔁 Retries per request",
            "minimum": 1,
            "type": "integer",
            "description": "How many times a failed request is retried before it is given up.",
            "default": 3
          },
          "request_delay": {
            "title": "⏳ Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Optional pause before each request. 0 = as fast as possible.",
            "default": 0
          },
          "until": {
            "title": "📅 Newer than (alias)",
            "type": "string",
            "description": "Returns posts newer than this date (YYYY-MM-DD). Used only when Posts published on or after is empty."
          },
          "since": {
            "title": "📅 Older than (alias)",
            "type": "string",
            "description": "Returns posts older than this date (YYYY-MM-DD). Used only when Posts published on or before is empty."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "By default the Actor starts without a proxy. If TikTok blocks the requests it switches to a datacenter proxy, then to a residential proxy, and keeps the residential proxy for the rest of the run. Pick a proxy here to start with it instead.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}