{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Live Scraper — Status, Room Search & Top Gifters",
    "description": "TikTok LIVE scraper: is-live check by username, live-room metadata with viewer count and stream URLs, live rooms found by keyword or category, top gifters, and an only-newly-live watchlist. No cookies, no login. MCP-ready.",
    "version": "0.2",
    "x-build-id": "hOR6eIJcB7zOxUQo8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~tiktok-live-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-tiktok-live-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-live-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-tiktok-live-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-live-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-tiktok-live-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": {
          "usernames": {
            "title": "TikTok usernames (live-status mode)",
            "type": "array",
            "description": "List of TikTok @handles to check live status for (e.g. ['stoolpresidente', 'khaby.lame']). Bare handles or full profile URLs both accepted. Returns one record per handle with isLive, roomId, title, viewerCount, startedAt, streamUrls. Use this for is-live monitoring of known creators. NOT for one-off live-room URL inspection (use 'liveRoomUrls') or chat capture (use 'chatFeedUsername').",
            "items": {
              "type": "string"
            }
          },
          "liveRoomUrls": {
            "title": "Live room URLs or room IDs (room-details mode)",
            "type": "array",
            "description": "List of TikTok live room URLs like 'https://www.tiktok.com/@user/live' or bare numeric roomIds. Returns the full live-room object (title, viewers, streamData, hashTag, paidEvent flag). Use this when you have direct room URLs from elsewhere; for username-only is-live checks use 'usernames'.",
            "items": {
              "type": "string"
            }
          },
          "chatFeedUsername": {
            "title": "Username for real-time chat + gifts capture (chat-feed mode)",
            "type": "string",
            "description": "Paused for creators who are live right now: TikTok chat needs a paid signing service that is not enabled, so a live creator ends the run with a clear message and no chat fee. An offline creator ends with no rows and no fee. Single TikTok @handle whose live chat/gifts/joins/likes will be captured for 'chatCaptureSeconds' seconds via WebSocket (no cookies). The creator must be live when the run starts; an offline creator ends the run with no rows and no chat fee. One event per comment/gift/member-join/like is pushed to the dataset. Charged at $0.0002 per event. NOT for is-live polling (use 'usernames')."
          },
          "chatCaptureSeconds": {
            "title": "Chat capture duration (seconds)",
            "minimum": 10,
            "maximum": 1800,
            "type": "integer",
            "description": "Paused for creators who are live right now: TikTok chat needs a paid signing service that is not enabled, so a live creator ends the run with a clear message and no chat fee. An offline creator ends with no rows and no fee. How long to listen on the live chat WebSocket before closing. Defaults to 60 seconds. Range 10-1800. Only used when 'chatFeedUsername' is set. Longer captures cost more (one PPE event per chat/gift/join/like message). Run also stops early if the creator ends the stream.",
            "default": 60
          },
          "chatEventTypes": {
            "title": "Chat event types to capture",
            "type": "array",
            "description": "Paused for creators who are live right now: TikTok chat needs a paid signing service that is not enabled, so a live creator ends the run with a clear message and no chat fee. An offline creator ends with no rows and no fee. Which WebSocket event classes to push. Defaults to ['chat','gift'] (the high-signal ones). Add 'member' for join notifications and 'like' for like bursts (verbose). 'social' = follows/shares.",
            "items": {
              "type": "string"
            },
            "default": [
              "chat",
              "gift"
            ]
          },
          "discoverCategory": {
            "title": "Discover currently-live by category (discover mode)",
            "enum": [
              "",
              "gaming",
              "lifestyle",
              "music",
              "fashion",
              "food",
              "sports",
              "education",
              "entertainment",
              "beauty",
              "comedy"
            ],
            "type": "string",
            "description": "Category slug to list currently-broadcasting rooms whose own TikTok category tag matches (e.g. 'gaming', 'music'). Many rooms carry no tag; for broader results use 'liveSearchKeyword'. Leave blank when not in discover mode.",
            "default": ""
          },
          "liveSearchKeyword": {
            "title": "Live search keyword (search mode)",
            "maxLength": 100,
            "type": "string",
            "description": "Free-text phrase to find live rooms TikTok ranks for it right now, e.g. 'cooking' or 'makeup tutorial'. Returns room, creator handle, title, viewer count and live link. Uses 'discoverRegion' and 'maxDiscoverResults'. Max 100 characters. Leave blank when not in search mode. Use it on its own: a run with this field plus usernames, liveRoomUrls or discoverCategory is rejected as invalid input."
          },
          "discoverRegion": {
            "title": "Discover region (ISO country)",
            "type": "string",
            "description": "Two-letter ISO country code for discover and keyword-search modes (e.g. 'US', 'GB', 'JP'). Defaults to 'US'.",
            "default": "US"
          },
          "maxDiscoverResults": {
            "title": "Max discover / search results",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap on rooms returned by discover and keyword-search modes. Default 50, range 1-200.",
            "default": 50
          },
          "maxResults": {
            "title": "Max results (status/room modes)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on records pushed by live-status + room-details modes (does NOT cap chat-feed events — use 'chatCaptureSeconds'). Default 100, range 1-1000.",
            "default": 100
          },
          "includeTopGifters": {
            "title": "Include top gifters (status / room modes)",
            "type": "boolean",
            "description": "Add the room's top gifters (rank, handle, nickname, coins, followers) to every live-status or room-details row where the creator is live. Included in the live result price.",
            "default": false
          },
          "maxTopGifters": {
            "title": "Max top gifters per live room",
            "minimum": 1,
            "maximum": 99,
            "type": "integer",
            "description": "How many top gifters to keep per live room when 'includeTopGifters' is on. Default 10, range 1-99.",
            "default": 10
          },
          "onlyNewlyLive": {
            "title": "Only newly live (watchlist alert)",
            "type": "boolean",
            "description": "For the 'usernames' list: return a row only for creators who just went live since your last run with this option on, and skip creators who are offline or were already live. Skipped creators are not charged. The first run returns everyone live now. The Actor remembers state in a key-value store named 'tiktok-live-watchlist' in your account. Schedule it every 5-10 minutes for go-live alerts.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}