{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Profile Videos Scraper - All Posts & Stats",
    "description": "Get every public video from TikTok profiles by username, URL or user id: views, likes, saves, captions, music, hashtags, subtitle and download links. Date, likes and keyword filters, reposts, liked videos, new-video monitoring and a stats row per profile. No login.",
    "version": "0.4",
    "x-build-id": "KYjc1NxXET8kyDeRi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~tiktok-profile-videos-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-tiktok-profile-videos-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/khadinakbar~tiktok-profile-videos-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-tiktok-profile-videos-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/khadinakbar~tiktok-profile-videos-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-tiktok-profile-videos-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": {
          "profileHandles": {
            "title": "TikTok usernames or profile URLs",
            "type": "array",
            "description": "Creators to scrape. Accepts nike, @nike or https://www.tiktok.com/@nike. One row per video is returned, plus one stats row per profile. Not for keywords, hashtags or single video links.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames (alias)",
            "type": "array",
            "description": "Same as the field above: TikTok usernames such as nike or @nike. Use either field or both; duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Profile URLs",
            "type": "array",
            "description": "TikTok profile URLs such as https://www.tiktok.com/@nike, when you already have links. Video links are not accepted.",
            "items": {
              "type": "object"
            }
          },
          "userIds": {
            "title": "TikTok user ids",
            "type": "array",
            "description": "Numeric TikTok user ids (for example 127905465618821121) or secure ids starting with MS4wLjAB. Useful when a creator changes their username. A numeric id costs one extra profile lookup before the videos are read.",
            "items": {
              "type": "string"
            }
          },
          "sections": {
            "title": "What to scrape",
            "type": "array",
            "description": "videos = the creator's own posts (default). reposts = videos the creator reposted. liked = videos the creator liked (only when their liked list is public; most creators hide it, and then the profile row says so). Every saved video row is charged the same.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "reposts",
                "liked"
              ],
              "enumTitles": [
                "Own videos",
                "Reposts",
                "Liked videos (when public)"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "maxVideosPerProfile": {
            "title": "Max videos per profile",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most videos saved per profile and per section. 1 to 10000. Defaults to 50; prefill 10 for a quick test. This is the main cost guard.",
            "default": 50
          },
          "maxTotalVideos": {
            "title": "Max videos per run",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Cap for the whole run across all profiles and sections. 1 to 50000. Defaults to 10000. Free Apify plans get up to 10 videos per run.",
            "default": 10000
          },
          "includeProfileStats": {
            "title": "Profile stats row",
            "type": "boolean",
            "description": "Adds one row per profile: followers, total likes, video count, posts per week, most active weekday and hour, median and average views, engagement rate and best video. Rows for missing, private or failed profiles are always added and are free.",
            "default": true
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "latest",
              "popular"
            ],
            "type": "string",
            "description": "latest = newest first (default). popular = most viewed first. Only-new mode always uses latest.",
            "default": "latest"
          },
          "postedAfter": {
            "title": "Posted after (date)",
            "type": "string",
            "description": "Only videos posted on or after this date, format YYYY-MM-DD (for example 2026-10-01). Older videos are skipped and not charged."
          },
          "postedBefore": {
            "title": "Posted before (date)",
            "type": "string",
            "description": "Only videos posted on or before this date (whole day counts), format YYYY-MM-DD."
          },
          "minLikes": {
            "title": "Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Skip videos with fewer likes. Filters read at most twice the asked number of videos per profile, so a strict filter can return fewer rows."
          },
          "minPlays": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Skip videos with fewer views."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Skip videos with fewer comments."
          },
          "captionIncludes": {
            "title": "Caption must contain (any)",
            "type": "array",
            "description": "Keep only videos whose caption or hashtags contain at least one of these words (not case sensitive), for example giveaway or #ad.",
            "items": {
              "type": "string"
            }
          },
          "captionExcludes": {
            "title": "Caption must not contain",
            "type": "array",
            "description": "Skip videos whose caption or hashtags contain any of these words.",
            "items": {
              "type": "string"
            }
          },
          "skipPinned": {
            "title": "Skip pinned videos",
            "type": "boolean",
            "description": "Leave out the videos pinned at the top of the profile (often old hits).",
            "default": false
          },
          "contentType": {
            "title": "Videos or photo posts",
            "enum": [
              "all",
              "videos",
              "photos"
            ],
            "type": "string",
            "description": "all (default), videos only, or photo posts (slideshows) only.",
            "default": "all"
          },
          "onlyNewVideos": {
            "title": "Only new videos since last run",
            "type": "boolean",
            "description": "Monitoring mode for schedules: each profile returns only videos newer than the newest one seen on your previous run, so repeat runs pay only for new posts. The first run returns the latest videos as normal.",
            "default": false
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter country code used for the request, for example US, GB or FR. Defaults to US. Not a language filter.",
            "default": "US"
          },
          "maxPagesPerProfile": {
            "title": "Max pages per profile (optional)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap on feed pages read per profile and section (about 10 videos per page). Leave empty to size it from the video limits."
          },
          "trim": {
            "title": "Smaller answers",
            "type": "boolean",
            "description": "Ask the data route for smaller answers where supported. Output fields stay the same. Defaults to true.",
            "default": true
          },
          "includeRawData": {
            "title": "Include raw data",
            "type": "boolean",
            "description": "Attach the original answer to each row for debugging. Large; not recommended for AI agents. Defaults to false.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}