{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper - Videos, Shorts, Channels & Search",
    "description": "Scrape YouTube videos, Shorts and live streams from search, channels, playlists and video links: exact views, likes, comments, publish date, length, description, hashtags, tags, category and channel stats. No login, fast, real-time API.",
    "version": "0.1",
    "x-build-id": "jWkDtbiVr1lE6clPy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automly~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automly-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/automly~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automly-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/automly~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automly-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": "Search YouTube just like in its search bar, one term per line.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "YouTube links",
            "type": "array",
            "description": "Videos, Shorts, channels, channel tabs, playlists or search pages, e.g. https://www.youtube.com/@MrBeast, https://www.youtube.com/@MrBeast/shorts, https://www.youtube.com/playlist?list=..., https://youtu.be/dQw4w9WgXcQ. A channel link gives its videos, Shorts and live streams up to the limits below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max videos per search term or channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Regular videos for each search term and each channel.",
            "default": 10
          },
          "maxResultsShorts": {
            "title": "Max Shorts per search term or channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Shorts for each search term and each channel.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Max live streams per search term or channel",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Live streams: live now for a search term, past and upcoming streams from a channel's Live tab.",
            "default": 0
          },
          "includeDetails": {
            "title": "Include video details",
            "type": "boolean",
            "description": "Exact views, likes and comments, publish date, length, full description, hashtags, tags, category and the channel's subscribers and stats for every video. Turn it off for a cheaper, faster list with what search, channel and playlist pages show (title, rounded views, age, length). Video links always come with details.",
            "default": true
          },
          "includeSubtitles": {
            "title": "Subtitle languages",
            "type": "boolean",
            "description": "Add the list of subtitle languages each video has (needs video details). Makes runs a little slower.",
            "default": false
          },
          "oldestPostDate": {
            "title": "Only videos published after",
            "type": "string",
            "description": "Leave out older videos: a date (2026-09-01) or an age (7 days, 2 weeks, 3 months). Channel lists sorted by newest stop at the first older video."
          },
          "sortVideosBy": {
            "title": "Channel sort order",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "Order of a channel's videos, Shorts and live streams, like the buttons on its page.",
            "default": "NEWEST"
          },
          "sortingOrder": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Search result order."
          },
          "dateFilter": {
            "title": "Upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only videos uploaded in this period."
          },
          "videoType": {
            "title": "Video type",
            "enum": [
              "video",
              "movie"
            ],
            "type": "string",
            "description": "Videos or movies."
          },
          "lengthFilter": {
            "title": "Length",
            "enum": [
              "under4",
              "between420",
              "plus20"
            ],
            "type": "string",
            "description": "Video length."
          },
          "isHD": {
            "title": "HD",
            "type": "boolean",
            "description": "Only HD videos."
          },
          "hasSubtitles": {
            "title": "Subtitles/CC",
            "type": "boolean",
            "description": "Only videos with subtitles."
          },
          "hasCC": {
            "title": "Creative Commons",
            "type": "boolean",
            "description": "Only Creative Commons videos."
          },
          "is3D": {
            "title": "3D",
            "type": "boolean",
            "description": "Only 3D videos."
          },
          "isLive": {
            "title": "Live",
            "type": "boolean",
            "description": "Only videos streaming live now."
          },
          "isBought": {
            "title": "Purchased",
            "type": "boolean",
            "description": "Only purchased videos."
          },
          "is4K": {
            "title": "4K",
            "type": "boolean",
            "description": "Only 4K videos."
          },
          "is360": {
            "title": "360°",
            "type": "boolean",
            "description": "Only 360° videos."
          },
          "hasLocation": {
            "title": "Location",
            "type": "boolean",
            "description": "Only videos with a location."
          },
          "isHDR": {
            "title": "HDR",
            "type": "boolean",
            "description": "Only HDR videos."
          },
          "isVR180": {
            "title": "VR180",
            "type": "boolean",
            "description": "Only VR180 videos."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The default works for most runs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}