{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Search Scraper",
    "description": "Scrape TikTok videos by keyword. Extract title, views, likes, author, hashtags, play URLs, thumbnails. Supports date range, region, sort order, min views/duration filters, strict keyword matching (Korean NFKC), residential proxy, and session caching.",
    "version": "0.0",
    "x-build-id": "FppXTCZqd1coCip71"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/paul_44~tiktok-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-paul_44-tiktok-search",
        "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/paul_44~tiktok-search/runs": {
      "post": {
        "operationId": "runs-sync-paul_44-tiktok-search",
        "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/paul_44~tiktok-search/run-sync": {
      "post": {
        "operationId": "run-sync-paul_44-tiktok-search",
        "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": {
          "keywords": {
            "title": "Keywords",
            "minItems": 0,
            "type": "array",
            "description": "Search keywords. Each keyword runs a separate search.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Single keyword (fallback)",
            "type": "string",
            "description": "Used only when 'keywords' list is empty."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of videos to return per keyword. Higher values increase run time and cost — start with 50 for exploration.",
            "default": 50
          },
          "dateRange": {
            "title": "Upload date",
            "enum": [
              "all",
              "today",
              "yesterday",
              "7days",
              "1month",
              "3months",
              "6months"
            ],
            "type": "string",
            "description": "Filter by upload date.",
            "default": "all"
          },
          "sortType": {
            "title": "Sort by",
            "enum": [
              "RELEVANCE",
              "MOST_LIKED",
              "LATEST"
            ],
            "type": "string",
            "description": "RELEVANCE = best match, MOST_LIKED = most likes, LATEST = newest first.",
            "default": "RELEVANCE"
          },
          "location": {
            "title": "Region",
            "enum": [
              "US",
              "GB",
              "KR",
              "JP",
              "DE",
              "FR",
              "ES",
              "IT",
              "BR",
              "MX",
              "ID",
              "VN",
              "PH",
              "TH",
              "TR",
              "IN",
              "RU",
              "CA",
              "AU"
            ],
            "type": "string",
            "description": "Country code for search results (ISO 3166-1 alpha-2).",
            "default": "US"
          },
          "minPlayCount": {
            "title": "Min views",
            "minimum": 0,
            "type": "integer",
            "description": "Exclude videos with fewer views than this. 0 = no filter. Low thresholds return more results but include low-quality content.",
            "default": 0
          },
          "strictKeywordMatch": {
            "title": "Strict keyword match",
            "type": "boolean",
            "description": "Filter out videos where the keyword does not appear in title, description, hashtags, or author name. OFF by default: all results are returned with keywordRelevance field (high/none). Turn ON to remove unrelated results.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy configuration. Default uses RESIDENTIAL proxies.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "mirrorVideos": {
            "title": "Stable video previews",
            "type": "boolean",
            "description": "Provide a stable preview URL that stays playable in Console after TikTok's original URL expires.",
            "default": true
          },
          "mirrorVideoBytes": {
            "title": "Preview clip size (bytes)",
            "minimum": 65536,
            "maximum": 10485760,
            "type": "integer",
            "description": "Bytes per preview clip. Default 262144 = 256 KB. Larger values play longer clips but use more storage and bandwidth.",
            "default": 262144
          },
          "minDurationSec": {
            "title": "Min video duration",
            "minimum": 0,
            "type": "number",
            "description": "Exclude videos shorter than this many seconds. 0 = no filter.",
            "default": 0
          },
          "maxConcurrentKeywords": {
            "title": "Parallel keywords",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Number of keywords to search in parallel. Higher = faster but memory usage scales linearly. Recommended: 1–4 at 2 GB memory, up to 16 at 8 GB+.",
            "default": 1
          },
          "useProxy": {
            "title": "Use residential proxy",
            "type": "boolean",
            "description": "Use Apify RESIDENTIAL proxy. Disable to save bandwidth (may get blocked).",
            "default": true
          },
          "includeSearchKeywords": {
            "title": "Include search keyword in results",
            "type": "boolean",
            "description": "Add searchKeyword field to each result item.",
            "default": false
          },
          "msToken": {
            "title": "msToken (optional)",
            "type": "string",
            "description": "TikTok auth token. Leave empty — the Actor handles this automatically (recommended)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}