{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper: Videos, Shorts, Comments & Transcripts",
    "description": "Scrape YouTube videos, Shorts, comments, replies, Community posts and available automatic transcripts. [0.35$ per 1,000 video results]. Platform usage included. Export CSV, Excel or JSON without code.",
    "version": "0.2",
    "x-build-id": "m2dkUc97tw1C5gebM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lofomachines~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lofomachines-youtube-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/lofomachines~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lofomachines-youtube-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/lofomachines~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lofomachines-youtube-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": {
          "startUrls": {
            "title": "YouTube links",
            "type": "array",
            "description": "Paste video, Short, channel or playlist links. You can combine these with search keywords. Leave empty when searching only by keyword.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "Keywords to search",
            "type": "array",
            "description": "Enter one search phrase per line, such as espresso machine review. Each phrase is searched separately. The prefilled coffee example collects up to 10 results; replace or clear it for your own search.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "country": {
            "title": "Search country",
            "enum": [
              "AE",
              "AR",
              "AT",
              "AU",
              "BE",
              "BG",
              "BO",
              "BR",
              "CA",
              "CH",
              "CL",
              "CO",
              "CR",
              "CY",
              "CZ",
              "DE",
              "DK",
              "DO",
              "DZ",
              "EC",
              "EE",
              "EG",
              "ES",
              "FI",
              "FR",
              "GB",
              "GE",
              "GH",
              "GR",
              "GT",
              "HK",
              "HN",
              "HR",
              "HU",
              "ID",
              "IE",
              "IL",
              "IN",
              "IQ",
              "IS",
              "IT",
              "JM",
              "JO",
              "JP",
              "KE",
              "KR",
              "KW",
              "KZ",
              "LB",
              "LI",
              "LK",
              "LT",
              "LU",
              "LV",
              "LY",
              "MA",
              "ME",
              "MK",
              "MT",
              "MX",
              "MY",
              "NG",
              "NI",
              "NL",
              "NO",
              "NP",
              "NZ",
              "OM",
              "PA",
              "PE",
              "PH",
              "PK",
              "PL",
              "PR",
              "PT",
              "PY",
              "QA",
              "RO",
              "RS",
              "RU",
              "SA",
              "SE",
              "SG",
              "SI",
              "SK",
              "SN",
              "SV",
              "TH",
              "TN",
              "TR",
              "TW",
              "TZ",
              "UA",
              "UG",
              "US",
              "UY",
              "VE",
              "VN",
              "YE",
              "ZA",
              "ZW"
            ],
            "type": "string",
            "description": "Choose the YouTube search region. This influences results; it does not restrict videos to creators in that country or change the proxy location.",
            "default": "US"
          },
          "language": {
            "title": "Search language",
            "enum": [
              "ar",
              "bg",
              "bn",
              "ca",
              "cs",
              "da",
              "de",
              "el",
              "en",
              "en-GB",
              "es",
              "es-419",
              "et",
              "fa",
              "fi",
              "fil",
              "fr",
              "fr-CA",
              "gu",
              "he",
              "hi",
              "hr",
              "hu",
              "id",
              "is",
              "it",
              "ja",
              "kn",
              "ko",
              "lt",
              "lv",
              "ml",
              "mr",
              "ms",
              "nl",
              "no",
              "pl",
              "pt",
              "pt-PT",
              "ro",
              "ru",
              "sk",
              "sl",
              "sr",
              "sv",
              "sw",
              "ta",
              "te",
              "th",
              "tr",
              "uk",
              "ur",
              "vi",
              "zh-CN",
              "zh-TW"
            ],
            "type": "string",
            "description": "Choose the YouTube search and metadata language. This is not a strict spoken-language filter and does not translate videos. Transcript language is selected separately.",
            "default": "en"
          },
          "searchSort": {
            "title": "Search result order",
            "enum": [
              "expanded",
              "relevance",
              "popular",
              "newest"
            ],
            "type": "string",
            "description": "Expanded discovery keeps the existing broad search. Relevance and Popular use one YouTube ranked stream. Newest sorts the collected sample by displayed publication age (ties keep their original order; unknown dates go last), not every matching YouTube video. For Newest choose 1–10,000 videos and use the upload-period filter to focus on recent content. Applies only to keyword searches.",
            "default": "expanded"
          },
          "maxVideos": {
            "title": "How many videos per source?",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum videos for each keyword or playlist, and separately for each selected channel section. Set 0 to continue until YouTube stops returning results. A channel with videos and Shorts selected can return up to twice this limit.",
            "default": 1000
          },
          "channelSections": {
            "title": "From channel links, collect",
            "uniqueItems": true,
            "type": "array",
            "description": "Choose the channel sections you need. Each selected video section has its own video limit. Community posts use the separate post limit below. Hidden or unavailable sections are reported in the run summary.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams",
                "posts"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams",
                "Community posts"
              ]
            },
            "default": [
              "videos",
              "shorts"
            ]
          },
          "includeComments": {
            "title": "Collect comments too",
            "type": "boolean",
            "description": "Also save public comments and replies from videos, Shorts and Community posts in the Comments dataset.",
            "default": false
          },
          "maxComments": {
            "title": "Comments per video or post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum comments and replies per video or Community post. Replies are included automatically, up to 100 replies per top-level comment. Use 0 for no total comment cap.",
            "default": 1000
          },
          "includeTranscripts": {
            "title": "Collect available transcripts",
            "type": "boolean",
            "description": "Save available automatic or manual captions as text with timestamps. Videos without accessible captions are reported in the results. This retrieves existing captions; it does not transcribe audio.",
            "default": false
          },
          "mode": {
            "title": "Video information",
            "enum": [
              "fast",
              "complete"
            ],
            "type": "string",
            "description": "Fast collects the information shown in search results and channel lists with fewer requests. Complete visits each video for richer metadata. Comments and transcripts are separate optional extras.",
            "default": "fast"
          },
          "transcriptLanguages": {
            "title": "Preferred transcript languages",
            "uniqueItems": true,
            "type": "array",
            "description": "Choose languages in preference order. If none matches, another available caption track is used. This does not translate the video. Leave empty to use an available track.",
            "items": {
              "type": "string",
              "enum": [
                "ab",
                "aa",
                "af",
                "ak",
                "tw",
                "sq",
                "en-US",
                "am",
                "ar",
                "an",
                "hy",
                "as",
                "av",
                "ae",
                "ay",
                "az",
                "bm",
                "bn",
                "ba",
                "eu",
                "be",
                "bh",
                "bi",
                "bs",
                "pt-BR",
                "br",
                "en-GB",
                "bg",
                "my",
                "yue",
                "ca",
                "ch",
                "ce",
                "zh",
                "cu",
                "cv",
                "kw",
                "co",
                "cr",
                "hr",
                "cs",
                "da",
                "dv",
                "nl",
                "dz",
                "en",
                "eo",
                "et",
                "ee",
                "fo",
                "fj",
                "tl",
                "fil",
                "fi",
                "fr",
                "ff",
                "gl",
                "lg",
                "ka",
                "de",
                "el",
                "gn",
                "gu",
                "ht",
                "ha",
                "he",
                "iw",
                "hz",
                "hi",
                "ho",
                "hu",
                "is",
                "io",
                "ig",
                "id",
                "in",
                "ia",
                "ie",
                "iu",
                "ik",
                "ga",
                "it",
                "ja",
                "jv",
                "jw",
                "kl",
                "kn",
                "kr",
                "ks",
                "kk",
                "km",
                "ki",
                "rw",
                "kv",
                "kg",
                "ko",
                "kj",
                "ku",
                "ky",
                "lo",
                "la",
                "es-419",
                "lv",
                "li",
                "ln",
                "lt",
                "lu",
                "lb",
                "mk",
                "mg",
                "ms",
                "ml",
                "mt",
                "gv",
                "mi",
                "mr",
                "mh",
                "mn",
                "na",
                "nv",
                "ng",
                "ne",
                "nd",
                "se",
                "no",
                "nb",
                "nn",
                "ny",
                "oc",
                "or",
                "oj",
                "om",
                "os",
                "pi",
                "ps",
                "fa",
                "pl",
                "pt",
                "pa",
                "qu",
                "mo",
                "ro",
                "rm",
                "rn",
                "ru",
                "sm",
                "sg",
                "sa",
                "sc",
                "gd",
                "sr",
                "sh",
                "sn",
                "ii",
                "zh-Hans",
                "sd",
                "si",
                "sk",
                "sl",
                "so",
                "nr",
                "st",
                "es",
                "su",
                "sw",
                "ss",
                "sv",
                "ty",
                "tg",
                "ta",
                "tt",
                "te",
                "th",
                "bo",
                "ti",
                "to",
                "zh-Hant",
                "ts",
                "tn",
                "tr",
                "tk",
                "uk",
                "ur",
                "ug",
                "uz",
                "ve",
                "vi",
                "vo",
                "wa",
                "cy",
                "fy",
                "wo",
                "xh",
                "ji",
                "yi",
                "yo",
                "za",
                "zu"
              ],
              "enumTitles": [
                "Abkhazian",
                "Afar",
                "Afrikaans",
                "Akan",
                "Akan",
                "Albanian",
                "American English",
                "Amharic",
                "Arabic",
                "Aragonese",
                "Armenian",
                "Assamese",
                "Avaric",
                "Avestan",
                "Aymara",
                "Azerbaijani",
                "Bambara",
                "Bangla",
                "Bashkir",
                "Basque",
                "Belarusian",
                "Bhojpuri",
                "Bislama",
                "Bosnian",
                "Brazilian Portuguese",
                "Breton",
                "British English",
                "Bulgarian",
                "Burmese",
                "Cantonese",
                "Catalan",
                "Chamorro",
                "Chechen",
                "Chinese",
                "Church Slavic",
                "Chuvash",
                "Cornish",
                "Corsican",
                "Cree",
                "Croatian",
                "Czech",
                "Danish",
                "Divehi",
                "Dutch",
                "Dzongkha",
                "English",
                "Esperanto",
                "Estonian",
                "Ewe",
                "Faroese",
                "Fijian",
                "Filipino",
                "Filipino",
                "Finnish",
                "French",
                "Fula",
                "Galician",
                "Ganda",
                "Georgian",
                "German",
                "Greek",
                "Guarani",
                "Gujarati",
                "Haitian Creole",
                "Hausa",
                "Hebrew",
                "Hebrew",
                "Herero",
                "Hindi",
                "Hiri Motu",
                "Hungarian",
                "Icelandic",
                "Ido",
                "Igbo",
                "Indonesian",
                "Indonesian",
                "Interlingua",
                "Interlingue",
                "Inuktitut",
                "Inupiaq",
                "Irish",
                "Italian",
                "Japanese",
                "Javanese",
                "Javanese",
                "Kalaallisut",
                "Kannada",
                "Kanuri",
                "Kashmiri",
                "Kazakh",
                "Khmer",
                "Kikuyu",
                "Kinyarwanda",
                "Komi",
                "Kongo",
                "Korean",
                "Kuanyama",
                "Kurdish",
                "Kyrgyz",
                "Lao",
                "Latin",
                "Latin American Spanish",
                "Latvian",
                "Limburgish",
                "Lingala",
                "Lithuanian",
                "Luba-Katanga",
                "Luxembourgish",
                "Macedonian",
                "Malagasy",
                "Malay",
                "Malayalam",
                "Maltese",
                "Manx",
                "Māori",
                "Marathi",
                "Marshallese",
                "Mongolian",
                "Nauru",
                "Navajo",
                "Ndonga",
                "Nepali",
                "North Ndebele",
                "Northern Sami",
                "Norwegian",
                "Norwegian Bokmål",
                "Norwegian Nynorsk",
                "Nyanja",
                "Occitan",
                "Odia",
                "Ojibwa",
                "Oromo",
                "Ossetic",
                "Pali",
                "Pashto",
                "Persian",
                "Polish",
                "Portuguese",
                "Punjabi",
                "Quechua",
                "Romanian",
                "Romanian",
                "Romansh",
                "Rundi",
                "Russian",
                "Samoan",
                "Sango",
                "Sanskrit",
                "Sardinian",
                "Scottish Gaelic",
                "Serbian",
                "Serbian (Latin)",
                "Shona",
                "Sichuan Yi",
                "Simplified Chinese",
                "Sindhi",
                "Sinhala",
                "Slovak",
                "Slovenian",
                "Somali",
                "South Ndebele",
                "Southern Sotho",
                "Spanish",
                "Sundanese",
                "Swahili",
                "Swati",
                "Swedish",
                "Tahitian",
                "Tajik",
                "Tamil",
                "Tatar",
                "Telugu",
                "Thai",
                "Tibetan",
                "Tigrinya",
                "Tongan",
                "Traditional Chinese",
                "Tsonga",
                "Tswana",
                "Turkish",
                "Turkmen",
                "Ukrainian",
                "Urdu",
                "Uyghur",
                "Uzbek",
                "Venda",
                "Vietnamese",
                "Volapük",
                "Walloon",
                "Welsh",
                "Western Frisian",
                "Wolof",
                "Xhosa",
                "Yiddish",
                "Yiddish",
                "Yoruba",
                "Zhuang",
                "Zulu"
              ]
            },
            "default": [
              "en"
            ]
          },
          "maxPosts": {
            "title": "Community posts per channel",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum public Community posts for each channel when Community posts is selected. Set 0 to continue until YouTube stops returning posts.",
            "default": 100
          },
          "searchDate": {
            "title": "Search upload period",
            "enum": [
              "all",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Filter keyword search results by YouTube upload period. Applies to search only; it is not an exact publication-date filter.",
            "default": "all"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}