{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Scraper (Video, Profile, Hashtag, Keyword, Sound & More)",
    "description": "Scrape TikTok videos, profiles, hashtags, keyword search, sound pages, and creator search. Returns engagement stats, music, location, hashtags, ad flags, and more. Optional add-ons: transcripts, no-watermark video download, comments, full author enrichment.",
    "version": "0.0",
    "x-build-id": "qCcxJwaoi7OK1kYPI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lurkapi~tiktok-scraper-all-in-one/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lurkapi-tiktok-scraper-all-in-one",
        "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/lurkapi~tiktok-scraper-all-in-one/runs": {
      "post": {
        "operationId": "runs-sync-lurkapi-tiktok-scraper-all-in-one",
        "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/lurkapi~tiktok-scraper-all-in-one/run-sync": {
      "post": {
        "operationId": "run-sync-lurkapi-tiktok-scraper-all-in-one",
        "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": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct TikTok video URLs. Any form works: www.tiktok.com/@user/video/123, vm.tiktok.com/abc, tiktok.com/t/abc, share-links from mobile, /photo/ URLs for slideshow posts.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "Profiles (username or URL)",
            "type": "array",
            "description": "TikTok usernames or profile URLs. With or without @. One per line.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtag names or URLs. Omit the leading #. One per line.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keyword search",
            "type": "array",
            "description": "Search terms. One per line. Optional 'Strict keyword match' below filters out off-topic results.",
            "items": {
              "type": "string"
            }
          },
          "sounds": {
            "title": "Sound / music URLs",
            "type": "array",
            "description": "TikTok music URLs (e.g. https://www.tiktok.com/music/Original-Sound-7556815852168759313). One per line.",
            "items": {
              "type": "string"
            }
          },
          "userSearchQueries": {
            "title": "User search queries",
            "type": "array",
            "description": "Search for creators by query (e.g. 'cooking influencer'). Returns one row per creator found.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on rows returned for each video URL, profile, hashtag, search query, or sound. Each video URL always returns 1. For profiles, this caps the number of videos returned (the profile metadata row is always included on top).",
            "default": 20
          },
          "mediaType": {
            "title": "Media type",
            "enum": [
              "both",
              "video",
              "photo"
            ],
            "type": "string",
            "description": "Filter videos vs photo/slideshow posts. Applies to hashtag, keyword, profile, and sound results.",
            "default": "both"
          },
          "dateFrom": {
            "title": "From date ($)",
            "type": "string",
            "description": "Only include posts created on or after this date. Leave blank for no lower bound. Billed at $0.001/row when set.",
            "default": ""
          },
          "dateTo": {
            "title": "To date ($)",
            "type": "string",
            "description": "Only include posts created on or before this date. Leave blank for no upper bound. Billed at $0.001/row when set.",
            "default": ""
          },
          "region": {
            "title": "Region",
            "enum": [
              "ALL",
              "US",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "ES",
              "IT",
              "BR",
              "MX",
              "JP",
              "KR",
              "ID",
              "MY",
              "PH",
              "SG",
              "TH",
              "VN"
            ],
            "type": "string",
            "description": "Region TikTok uses for algorithmic ranking and content visibility. Leave on ALL unless you need region-specific results (e.g. only UK TikTok). Non-ALL selections billed at $0.001/row.",
            "default": "ALL"
          },
          "sortBy": {
            "title": "Sort (when supported) ($)",
            "enum": [
              "relevance",
              "recent",
              "likes"
            ],
            "type": "string",
            "description": "Sort order for keyword search. Profile, video URL, and sound inputs ignore this. Non-default selections billed at $0.001/row.",
            "default": "relevance"
          },
          "strictKeywordMatch": {
            "title": "Strict keyword match ($)",
            "type": "boolean",
            "description": "For keyword search: drop results whose caption / hashtags don't contain the term as a substring (case-insensitive). TikTok's own results are loose; turn this on to enforce. Billed at $0.001/row when on.",
            "default": false
          },
          "includeAuthorEnrichment": {
            "title": "Full creator profile ($)",
            "type": "boolean",
            "description": "Adds the author's full profile (bio, follower count, links) to each row. Deduped per unique author across the run, so you only pay once per creator. Billed at $0.002/unique creator.",
            "default": false
          },
          "excludePinned": {
            "title": "Exclude pinned posts ($)",
            "type": "boolean",
            "description": "Drop pinned posts when scraping a profile. Billed at $0.001/row when on.",
            "default": false
          },
          "excludeReposts": {
            "title": "Exclude reposts ($)",
            "type": "boolean",
            "description": "Drop reposts when scraping a profile, keeping only the creator's original posts. Billed at $0.001/row when on.",
            "default": false
          },
          "includeComments": {
            "title": "Include comments ($)",
            "type": "boolean",
            "description": "Fetches top-level comments for each video. Billed at $0.0003 per comment returned.",
            "default": false
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on comments per video when Include comments is on.",
            "default": 50
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Include first-level replies under each top-level comment. Turn off to fetch only top-level comments (faster, fewer comments charged).",
            "default": true
          },
          "includeTranscripts": {
            "title": "Download captions ($)",
            "type": "boolean",
            "description": "Adds a 'transcript' field from TikTok's native captions when available. We pull TikTok's own caption files. Billed at $0.001 per transcript returned.",
            "default": false
          },
          "includeVideoDownload": {
            "title": "Video download ($)",
            "type": "boolean",
            "description": "Saves the no-watermark MP4 to your Apify key-value store. Adds savedVideoKey to the row. Billed per second of video duration.",
            "default": false
          },
          "includeSlideshowDownload": {
            "title": "Slideshow download ($)",
            "type": "boolean",
            "description": "Saves each image of a slideshow post to your Apify key-value store. Adds savedImageKeys to the row. Flat rate per slideshow post.",
            "default": false
          },
          "outputTitle": {
            "title": "Output: title",
            "type": "boolean",
            "description": "Video caption / post title.",
            "default": true
          },
          "outputDescription": {
            "title": "Output: hashtags and mentions",
            "type": "boolean",
            "description": "Parsed hashtags and @-mentions from the caption.",
            "default": true
          },
          "outputStats": {
            "title": "Output: engagement stats",
            "type": "boolean",
            "description": "Views, likes, comments, shares, saves.",
            "default": true
          },
          "outputMusic": {
            "title": "Output: music / sound info",
            "type": "boolean",
            "description": "Music title, author, ID, and whether it's an original sound.",
            "default": true
          },
          "outputAuthor": {
            "title": "Output: author basics",
            "type": "boolean",
            "description": "Author handle, display name, ID, verified flag, avatar.",
            "default": true
          },
          "outputPoi": {
            "title": "Output: place / POI",
            "type": "boolean",
            "description": "POI name, ID, lat/lng, and direct link to TikTok's place page.",
            "default": true
          },
          "outputAdFlags": {
            "title": "Output: ad / sponsored flags",
            "type": "boolean",
            "description": "Three booleans: isAd, isSponsored, isPaidPartnership. Kept separate so you can tell ad-manager ads apart from paid partnerships.",
            "default": true
          },
          "outputDuration": {
            "title": "Output: duration and dimensions",
            "type": "boolean",
            "description": "Duration, width, height.",
            "default": true
          },
          "outputCovers": {
            "title": "Output: cover images",
            "type": "boolean",
            "description": "Static and dynamic cover URLs.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}