{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper — Videos, Channels, Shorts & Search (Fast)",
    "description": "Scrape YouTube videos, Shorts, channels, playlists & searches: views, likes, comments count, dates, tags, subscribers. No browser, $2/1k, fast mode $0.5/1k.",
    "version": "1.0",
    "x-build-id": "yrdfa2dSyiSZfHqn0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vladased~youtube-scraper-fast/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vladased-youtube-scraper-fast",
        "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/vladased~youtube-scraper-fast/runs": {
      "post": {
        "operationId": "runs-sync-vladased-youtube-scraper-fast",
        "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/vladased~youtube-scraper-fast/run-sync": {
      "post": {
        "operationId": "run-sync-vladased-youtube-scraper-fast",
        "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 URLs",
            "type": "array",
            "description": "Any mix of videos, Shorts, channels (@handle or URL), playlists and search-results URLs (max 200). Channels give newest uploads first. Also accepts {url} objects and the field names 'urls', 'videoUrls', 'channelUrls' used by other YouTube actors.",
            "default": [
              "https://www.youtube.com/@mkbhd"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Scrape the video results of each YouTube search.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search returns",
            "enum": [
              "videos",
              "shorts"
            ],
            "type": "string",
            "description": "Searches return regular videos (default) or Shorts only.",
            "default": "videos"
          },
          "maxResults": {
            "title": "Max videos per channel / playlist / search",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap per source (0–5,000). For channels this counts regular videos; 0 with a channel = channel profile only (no videos).",
            "default": 10
          },
          "maxResultsShorts": {
            "title": "Max Shorts per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Also scrape this many of each channel's Shorts (0 = none).",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Max live streams per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Also scrape this many of each channel's past live streams (0 = none).",
            "default": 0
          },
          "detail": {
            "title": "Detail level",
            "enum": [
              "full",
              "fast"
            ],
            "type": "string",
            "description": "Fast mode reads channel/search/playlist pages only: ~4× cheaper and much faster for bulk view-count tracking. Single video URLs always get full detail.",
            "default": "full"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only videos published on/after this date: YYYY-MM-DD or a relative age like '7 days', '3 months'. Free (no add-on fee). Also accepts 'oldestPostDate'."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Only videos published on/before this date (YYYY-MM-DD or '1 year')."
          },
          "includeChannelInfo": {
            "title": "Add channel stats to each video",
            "type": "boolean",
            "description": "Subscribers, total views, video count, country, joined date, links. Fetched once per channel, no extra charge. Default: on in full mode, off in fast mode (keeps bulk view tracking fast)."
          },
          "includeCommentCount": {
            "title": "Add comments count (full mode)",
            "type": "boolean",
            "description": "The comments count as YouTube shows it (e.g. 2.4K → 2400). One extra small request per video, no extra charge.",
            "default": true
          },
          "includeTranscript": {
            "title": "Add transcript",
            "type": "boolean",
            "description": "Full detail only: adds the video's captions as plain text (+ language, auto-generated flag). Billed per video only when captions exist.",
            "default": false
          },
          "transcriptLanguages": {
            "title": "Transcript languages",
            "type": "array",
            "description": "Preferred caption languages in order, e.g. 'en', 'es'. Empty = the video's default.",
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Search: sort by",
            "enum": [
              "relevance",
              "date",
              "views",
              "rating"
            ],
            "type": "string",
            "description": "Order of search results.",
            "default": "relevance"
          },
          "searchUploadDate": {
            "title": "Search: upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Left on 'any', it is set from 'Published after' automatically.",
            "default": "any"
          },
          "searchDuration": {
            "title": "Search: duration",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Video length filter for searches.",
            "default": "any"
          },
          "searchFeatures": {
            "title": "Search features",
            "type": "array",
            "description": "Only search results with these features (YouTube's own filters).",
            "items": {
              "type": "string",
              "enum": [
                "hd",
                "subtitles",
                "creative_commons",
                "3d",
                "live",
                "purchased",
                "4k",
                "360",
                "location",
                "hdr",
                "vr180"
              ],
              "enumTitles": [
                "HD",
                "Subtitles/CC",
                "Creative Commons",
                "3D",
                "Live",
                "Purchased",
                "4K",
                "360°",
                "Location",
                "HDR",
                "VR180"
              ]
            }
          },
          "onlyNewVideos": {
            "title": "Only new videos (for schedules)",
            "type": "boolean",
            "description": "Remember delivered videos and skip them on later runs with the same input: schedule daily and pay only for new uploads.",
            "default": false
          },
          "stateKey": {
            "title": "Memory name",
            "type": "string",
            "description": "Optional: share one 'only new' memory across different inputs."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: we go direct, then datacenter, then residential only if YouTube pushes back.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}