{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Scraper: Search, Channels, Playlists, $2/1K",
    "description": "Scrape YouTube videos from searches, channels, playlists, hashtags or URLs: views, likes, comment count, exact date, duration, description, tags, chapters, subtitle languages and channel stats. YouTube search filters. No login, no API key, no quota. $2 per 1,000 videos.",
    "version": "0.1",
    "x-build-id": "SlkKIwEJmoEB3FDQV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/transparent_meteorite~youtube-video-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-transparent_meteorite-youtube-video-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/transparent_meteorite~youtube-video-scraper/runs": {
      "post": {
        "operationId": "runs-sync-transparent_meteorite-youtube-video-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/transparent_meteorite~youtube-video-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-transparent_meteorite-youtube-video-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": {
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Anything you would type in the YouTube search box. One search per line. Use #hashtag for hashtag pages.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Video, Shorts, channel (@handle, /channel/UC..., /c/, /user/), playlist, search results or hashtag URLs. Bare video IDs and @handles work too.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max videos per search / channel / playlist",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Regular videos per source. Set 0 to skip regular videos.",
            "default": 10
          },
          "maxResultsShorts": {
            "title": "Max Shorts per source",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Shorts per search or channel. 0 = skip Shorts.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Max live streams per source",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Live and upcoming streams per search or channel (past streams count as regular videos in search). 0 = skip.",
            "default": 0
          },
          "scrapeDetails": {
            "title": "Scrape full video details",
            "type": "boolean",
            "description": "Opens each video page for likes, comment count, exact publish date, full description, tags, category, chapters and subtitle languages. Off = faster listing data only (views, duration, relative date).",
            "default": true
          },
          "sortingOrder": {
            "title": "Search sort",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Same as YouTube search 'Sort by'.",
            "default": "relevance"
          },
          "dateFilter": {
            "title": "Upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only videos uploaded in this period."
          },
          "videoType": {
            "title": "Result type",
            "enum": [
              "video",
              "movie"
            ],
            "type": "string",
            "description": "Which result type a search returns: videos, shorts, live streams or all of them.",
            "default": "video"
          },
          "lengthFilter": {
            "title": "Length",
            "enum": [
              "under4",
              "between420",
              "over20"
            ],
            "type": "string",
            "description": "Video length filter."
          },
          "isHD": {
            "title": "HD",
            "type": "boolean",
            "description": "Keep only videos YouTube marks as HD (720p or higher).",
            "default": false
          },
          "is4K": {
            "title": "4K",
            "type": "boolean",
            "description": "Keep only videos YouTube marks as 4K resolution.",
            "default": false
          },
          "hasSubtitles": {
            "title": "Subtitles/CC",
            "type": "boolean",
            "description": "Only videos with subtitles.",
            "default": false
          },
          "hasCC": {
            "title": "Creative Commons",
            "type": "boolean",
            "description": "Only Creative Commons videos.",
            "default": false
          },
          "isLive": {
            "title": "Live",
            "type": "boolean",
            "description": "Keep only live or recently live streams in search results.",
            "default": false
          },
          "is3D": {
            "title": "3D",
            "type": "boolean",
            "description": "Keep only videos YouTube marks as 3D.",
            "default": false
          },
          "is360": {
            "title": "360°",
            "type": "boolean",
            "description": "Keep only 360-degree videos in search results.",
            "default": false
          },
          "isVR180": {
            "title": "VR180",
            "type": "boolean",
            "description": "Keep only VR180 videos in search results.",
            "default": false
          },
          "isHDR": {
            "title": "HDR",
            "type": "boolean",
            "description": "Keep only videos YouTube marks as HDR.",
            "default": false
          },
          "hasLocation": {
            "title": "Location",
            "type": "boolean",
            "description": "Only videos with a location.",
            "default": false
          },
          "isBought": {
            "title": "Purchased",
            "type": "boolean",
            "description": "Only purchased videos.",
            "default": false
          },
          "sortVideosBy": {
            "title": "Sort channel videos by",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "Order of videos taken from channel tabs, same as the Latest / Popular / Oldest chips on YouTube.",
            "default": "NEWEST"
          },
          "oldestPostDate": {
            "title": "Only videos newer than",
            "type": "string",
            "description": "A date (2025-01-31) or a relative period (7 days, 2 weeks, 3 months, 1 year). Older videos are skipped and not charged."
          },
          "newestPostDate": {
            "title": "Newest upload date",
            "type": "string",
            "description": "Optional. Skip videos uploaded after this date (YYYY-MM-DD includes that whole day). With \"oldest\" this is an exact from-to window."
          },
          "downloadSubtitles": {
            "title": "Download subtitles",
            "type": "boolean",
            "description": "Adds the subtitles of each video (needs \"Scrape full details\"). No extra charge per video.",
            "default": false
          },
          "subtitlesLanguage": {
            "title": "Subtitles language",
            "type": "string",
            "description": "Language code such as en, de, pt-BR, or \"any\". If that language is missing, the original-language track is returned and its code is shown.",
            "default": "en"
          },
          "subtitlesFormat": {
            "title": "Subtitles format",
            "enum": [
              "srt",
              "vtt",
              "plaintext",
              "xml"
            ],
            "type": "string",
            "description": "Format of the subtitles text.",
            "default": "srt"
          },
          "preferAutoGeneratedSubtitles": {
            "title": "Prefer auto-generated subtitles",
            "type": "boolean",
            "description": "Pick YouTube's auto-generated track over a creator-uploaded one.",
            "default": false
          },
          "saveSubsToKVS": {
            "title": "Also save subtitles as files",
            "type": "boolean",
            "description": "Saves each subtitle text to the run's key-value store too (key in subtitlesKvsKey).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel video pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many video pages to load at once.",
            "default": 5
          },
          "monitorMode": {
            "title": "Monitor mode: only new videos",
            "type": "boolean",
            "description": "Remembers videos delivered by earlier runs (in a named key-value store) and only returns and charges new ones. Ideal for schedules.",
            "default": false
          },
          "stateStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Use a different name per schedule if you monitor different things.",
            "default": "youtube-video-scraper-seen"
          },
          "autoProxyFallback": {
            "title": "Switch to residential proxy when blocked",
            "type": "boolean",
            "description": "On by default: if you left the proxy off and YouTube starts rate-limiting the IP, the run switches itself to Apify residential proxy instead of returning nothing. Turn off to never use a proxy you did not choose.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for normal runs: public YouTube pages load fine without a proxy. Set one only for very large runs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}