{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Profile Videos API Scraper & Search Keywords",
    "description": "Scrapes videos from any public TikTok profile via API, capturing video URLs, captions, hashtags, metrics, thumbnails, sounds, and publish dates. Ideal for influencer analysis, trend research, competitor tracking, and automated large-scale TikTok video data extraction",
    "version": "0.1",
    "x-build-id": "3XdzgTHcH92k0glzt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapio~tiktok-profile-videos-api-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapio-tiktok-profile-videos-api-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/scrapio~tiktok-profile-videos-api-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapio-tiktok-profile-videos-api-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/scrapio~tiktok-profile-videos-api-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapio-tiktok-profile-videos-api-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "👤 Creator profiles",
            "type": "array",
            "description": "TikTok profile URLs (https://www.tiktok.com/@username) or bare usernames (mrbeast). One entry per line.",
            "items": {
              "type": "string"
            }
          },
          "maxVideos": {
            "title": "🎞️ Videos to examine per creator",
            "minimum": 0,
            "type": "integer",
            "description": "How many videos are read from the profile feed per creator. 0 = no cap (whole feed). Keyword filters below can reduce the number of rows actually returned, so this is a scan budget, not a guaranteed row count.",
            "default": 10
          },
          "fetchSearchKeywords": {
            "title": "🔑 Collect TikTok's suggested search terms",
            "type": "boolean",
            "description": "Reads suggestedWords[] and diversificationLabels[] from each video page. Measured coverage: 28/40 videos (70%) carry search terms; the rest return null, never a faked empty list. TikTok's public video page carries no keyword id, scene or search volume, so none is emitted.",
            "default": true
          },
          "keywordFilter": {
            "title": "🎯 Keep only videos matching these keywords",
            "type": "array",
            "description": "Case-insensitive substring match against the video's search keywords. A video is kept if ANY entry matches (e.g. 'fortnite' matches 'FORTNITE gameplay'). Leave empty to keep everything. Applies within this run only — it is not a cross-run diff.",
            "items": {
              "type": "string"
            }
          },
          "categoryFilter": {
            "title": "🏷️ Keep only these TikTok content categories",
            "type": "array",
            "description": "Case-insensitive substring match against TikTok's own diversificationLabels, e.g. 'Food & Drink', 'Lifestyle', 'Gaming'. A second targeting axis, independent of the keyword filter. Leave empty to keep everything.",
            "items": {
              "type": "string"
            }
          },
          "onlyVideosWithKeywords": {
            "title": "🚫 Drop videos that have no search terms",
            "type": "boolean",
            "description": "About 30% of videos genuinely carry no suggestedWords. Default OFF so you still see those rows (with null keyword fields) instead of silently losing a third of the feed.",
            "default": false
          },
          "sortOrder": {
            "title": "🔃 Row order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "newest = rows in feed order, newest first. oldest = the scanned window is reversed and emitted oldest-first (with 'Videos to examine per creator' set to 0 this is the creator's true first video first). TikTok's own sort parameter is a no-op, so the reversal is done locally.",
            "default": "newest"
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "No proxy by default. If TikTok's WAF blocks the exit, the run escalates none → datacenter → residential automatically based on the response body shape. Residential is the most reliable choice for large scans."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}