{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper: Videos, Shorts, Channels & Search",
    "description": "Scrape YouTube videos, Shorts, channels, playlists and search results. Get views, exact likes, comment counts, upload dates, hashtags and subscriber stats. A YouTube Data API alternative: no API key, no quota, no login.",
    "version": "0.1",
    "x-build-id": "MSt41vUOLz7wzQ8Nn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api_creators~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api_creators-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/api_creators~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api_creators-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/api_creators~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api_creators-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": {
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Terms to search on YouTube, exactly as you would type them in the search bar.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max videos per search term / channel / playlist",
            "minimum": 0,
            "maximum": 999999,
            "type": "integer",
            "description": "Regular videos to collect per search term. For channel URLs it limits the Videos tab; for playlists it limits the playlist. 0 skips regular videos in search.",
            "default": 0
          },
          "maxResultsShorts": {
            "title": "Max Shorts per search term / channel",
            "minimum": 0,
            "maximum": 999999,
            "type": "integer",
            "description": "Shorts to collect per search term, and from a channel's Shorts tab.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Max streams per search term / channel",
            "minimum": 0,
            "maximum": 999999,
            "type": "integer",
            "description": "Live and past streams to collect per search term, and from a channel's Live tab.",
            "default": 0
          },
          "startUrls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Video (watch, youtu.be, /shorts/, /live/), channel (@handle, /channel/, /c/, /user/, optionally /videos, /shorts or /streams), playlist or search-results URLs.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sortingOrder": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Applies to search terms."
          },
          "dateFilter": {
            "title": "Upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Applies to search terms."
          },
          "videoType": {
            "title": "Result type",
            "enum": [
              "video",
              "movie"
            ],
            "type": "string",
            "description": "Applies to search terms."
          },
          "lengthFilter": {
            "title": "Duration",
            "enum": [
              "under4",
              "between420",
              "plus20"
            ],
            "type": "string",
            "description": "Applies to search terms."
          },
          "isHD": {
            "title": "HD",
            "type": "boolean",
            "description": "Only search results with the HD feature."
          },
          "hasSubtitles": {
            "title": "Subtitles/CC",
            "type": "boolean",
            "description": "Only search results with the Subtitles/CC feature."
          },
          "hasCC": {
            "title": "Creative Commons",
            "type": "boolean",
            "description": "Only search results with the Creative Commons feature."
          },
          "is3D": {
            "title": "3D",
            "type": "boolean",
            "description": "Only search results with the 3D feature."
          },
          "isLive": {
            "title": "Live",
            "type": "boolean",
            "description": "Only search results with the Live feature."
          },
          "isBought": {
            "title": "Purchased",
            "type": "boolean",
            "description": "Only search results with the Purchased feature."
          },
          "is4K": {
            "title": "4K",
            "type": "boolean",
            "description": "Only search results with the 4K feature."
          },
          "is360": {
            "title": "360°",
            "type": "boolean",
            "description": "Only search results with the 360° feature."
          },
          "hasLocation": {
            "title": "Has location",
            "type": "boolean",
            "description": "Only search results with the Location feature."
          },
          "isHDR": {
            "title": "HDR",
            "type": "boolean",
            "description": "Only search results with the HDR feature."
          },
          "isVR180": {
            "title": "VR180",
            "type": "boolean",
            "description": "Only search results with the VR180 feature."
          },
          "oldestPostDate": {
            "title": "Only videos published on or after",
            "type": "string",
            "description": "Absolute date (YYYY-MM-DD) or relative like \"7 days\" (\"1 day\" = today only). Applies to channel URLs and switches channel sorting to newest first."
          },
          "sortVideosBy": {
            "title": "Channel sort",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "Same as the Latest / Popular / Oldest buttons on a channel's Videos, Shorts and Live tabs."
          },
          "maxComments": {
            "title": "Comments per video",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Add up to this many top-level comments (max 1,000) to each video as a comments array. 0 = no comments. Each comment is charged as a separate low-cost event. For bigger comment jobs use YouTube Comments Scraper.",
            "default": 0
          },
          "commentsSortBy": {
            "title": "Comment order",
            "enum": [
              "TOP_COMMENTS",
              "NEWEST_FIRST"
            ],
            "type": "string",
            "description": "Same as YouTube's comment sort menu.",
            "default": "TOP_COMMENTS"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also add replies to each comment (they don't count toward the comments-per-video limit).",
            "default": false
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit replies collected for each comment.",
            "default": 20
          },
          "fastMode": {
            "title": "Fast mode (half price, fewer fields)",
            "type": "boolean",
            "description": "Skip the watch-page request. You still get title, views, exact likes, date, duration, description, keywords and full channel info, but not commentsCount, collaborators, location, members-only/monetization flags or exact description link targets.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Parallel requests. Higher is faster; lower is gentler.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Your own proxy for video details (optional)",
            "type": "object",
            "description": "Leave empty to use the built-in residential proxy (included in the price). Custom proxy URLs entered here replace it."
          },
          "lightProxyConfiguration": {
            "title": "Proxy for everything else",
            "type": "object",
            "description": "Search, channel, playlist and engagement requests (and video details when not bot-checked) go through this cheaper proxy. Datacenter works for these.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}