{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Live Chat Scraper",
    "description": "YouTube Live Chat Scraper SD - YouTube Live Chat Scraper is a video data tool that extracts YouTube live chat messages from live streams and stream replays: messages, authors, badges, Super Chats with amounts and currency, memberships and moderation events, with timestamps, no login.",
    "version": "1.0",
    "x-build-id": "fQlV3hc0xyEbzeo3A"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~youtube-live-chat-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-youtube-live-chat-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/neuro-scraper~youtube-live-chat-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-youtube-live-chat-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/neuro-scraper~youtube-live-chat-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-youtube-live-chat-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": {
          "videoUrls": {
            "title": "Live stream or replay URLs",
            "type": "array",
            "description": "YouTube live streams (live now) or ended streams with a chat replay, as URLs or video ids, one per line.",
            "items": {
              "type": "string"
            }
          },
          "channelRefs": {
            "title": "Channels",
            "type": "array",
            "description": "Channels as @handle or channel URL: their live stream (if live now) and recent stream replays are found automatically.",
            "items": {
              "type": "string"
            }
          },
          "channelDiscoveryMode": {
            "title": "Which streams of a channel",
            "enum": [
              "current_live_then_replays",
              "current_live_only",
              "replays_only"
            ],
            "type": "string",
            "description": "For channels: which streams to read.",
            "default": "current_live_then_replays"
          },
          "videosPerChannel": {
            "title": "Max streams per channel",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "For channels: how many streams to read (live now first, then the newest replays).",
            "default": 1
          },
          "lookbackDays": {
            "title": "Only streams from the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "For channels: skip replays older than this many days. 0 = no limit.",
            "default": 0
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "replay",
              "live"
            ],
            "type": "string",
            "description": "Auto reads the live chat of a stream that is live now and the chat replay of an ended stream.",
            "default": "auto"
          },
          "maxMessagesPerVideo": {
            "title": "Max messages per video",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many chat events to return per stream. Replays are read page after page from the start; live chats are read as they arrive.",
            "default": 200
          },
          "maxTimePerVideoSecs": {
            "title": "Live capture time per stream (seconds)",
            "minimum": 5,
            "maximum": 36000,
            "type": "integer",
            "description": "Live streams only: how long to keep collecting new messages.",
            "default": 60
          },
          "startOffsetSecs": {
            "title": "Replay start (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Replays only: start reading at this second of the stream.",
            "default": 0
          },
          "endOffsetSecs": {
            "title": "Replay end (seconds, 0 = end of stream)",
            "minimum": 0,
            "type": "integer",
            "description": "Replays only: stop at this second of the stream.",
            "default": 0
          },
          "includeNormalMessages": {
            "title": "Normal messages",
            "type": "boolean",
            "description": "Include ordinary chat messages.",
            "default": true
          },
          "includeSuperChats": {
            "title": "Super Chats and Super Stickers",
            "type": "boolean",
            "description": "Include paid messages and stickers with amount and currency.",
            "default": true
          },
          "includeMembershipEvents": {
            "title": "Membership events",
            "type": "boolean",
            "description": "Include new members, milestones and gifted memberships.",
            "default": true
          },
          "includeModerationEvents": {
            "title": "Moderation events",
            "type": "boolean",
            "description": "Include deleted / removed messages (as YouTube shows them in the chat).",
            "default": false
          },
          "maxTotalItems": {
            "title": "Max rows in total (0 = no total limit)",
            "minimum": 0,
            "type": "integer",
            "description": "Stops the whole run after this many dataset rows.",
            "default": 0
          },
          "messageTypes": {
            "title": "Message types",
            "enum": [
              "all",
              "paid",
              "text"
            ],
            "type": "string",
            "description": "Quick choice of event types: all = the include options below decide; paid = Super Chats, Super Stickers and memberships only; text = ordinary messages only.",
            "default": "all"
          },
          "includeUpcomingLives": {
            "title": "Include upcoming streams",
            "type": "boolean",
            "description": "For channels: also read the waiting-room chat of scheduled streams that have not started yet.",
            "default": false
          },
          "stopWhenStreamEnds": {
            "title": "Stop when the stream ends",
            "type": "boolean",
            "description": "Live streams: stop reading when YouTube ends the live chat. Off = reconnect (up to twice) when a stream ends before the capture time, e.g. after a short drop.",
            "default": true
          },
          "pollIntervalMs": {
            "title": "Live poll interval (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Live streams: time between two chat requests. 0 = the interval YouTube asks for (1-10 s).",
            "default": 0
          },
          "minDelayMs": {
            "title": "Minimum delay between requests (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum time between two requests of one connection (at least 200 ms).",
            "default": 0
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time to wait for one YouTube request.",
            "default": 30
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for YouTube's texts (en, es, de ...).",
            "default": "en"
          },
          "regionCode": {
            "title": "Region",
            "type": "string",
            "description": "Optional two-letter country code (US, GB, IN ...) for YouTube's regional settings."
          },
          "maxConcurrency": {
            "title": "Parallel streams",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many streams are read at the same time, each on its own connection.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies in the United States (the default) give the most reliable results: visitors from some countries (e.g. the EU) first get a consent page.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}