{
  "openapi": "3.0.1",
  "info": {
    "title": "Cheap YouTube Video Scraper — Search, Channels & Playlists",
    "description": "Low-cost YouTube scraper with the same input and output fields as the most popular one, so you can switch with no code changes. Search terms, channels, playlists, Shorts and videos: views, likes, comments, exact date, duration, description, hashtags and channel stats. $0.80 per 1,000 videos.",
    "version": "0.1",
    "x-build-id": "G6ZKZ6Af140LHliQP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/istmobot~youtube-scraper-cheap/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-istmobot-youtube-scraper-cheap",
        "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/istmobot~youtube-scraper-cheap/runs": {
      "post": {
        "operationId": "runs-sync-istmobot-youtube-scraper-cheap",
        "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/istmobot~youtube-scraper-cheap/run-sync": {
      "post": {
        "operationId": "run-sync-istmobot-youtube-scraper-cheap",
        "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. Ignored when Start URLs are given.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max videos per search term / channel / playlist",
            "minimum": 0,
            "type": "integer",
            "description": "Limit for each search term, playlist and search URL. For a channel it limits regular videos. 0 skips regular videos.",
            "default": 10
          },
          "maxResultsShorts": {
            "title": "Max Shorts per channel",
            "minimum": 0,
            "type": "integer",
            "description": "Shorts to scrape from each channel URL. 0 = none.",
            "default": 0
          },
          "maxResultStreams": {
            "title": "Max live streams per channel",
            "minimum": 0,
            "type": "integer",
            "description": "Live streams to scrape from each channel URL. 0 = none.",
            "default": 0
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "YouTube video, Shorts, channel (@handle, /channel/UC..., /c/, /user/, or a /videos, /shorts, /streams tab), playlist or search results URLs. When given, search terms are ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sortVideosBy": {
            "title": "Channel sorting",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "Order of channel videos: newest, most popular or oldest first (the buttons on top of a channel's Videos, Shorts and Live tabs)."
          },
          "oldestPostDate": {
            "title": "Only videos published after",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^(\\d+)\\s*(minute|hour|day|week|month|year)s?$",
            "type": "string",
            "description": "Skip videos older than this date (e.g. 2025-01-31) or this age (e.g. \"7 days\"; \"1 day\" = today only). On channels this forces newest first and stops at the first older video."
          },
          "sortingOrder": {
            "title": "Search sorting",
            "enum": [
              "relevance",
              "rating",
              "date",
              "views"
            ],
            "type": "string",
            "description": "YouTube search sort order."
          },
          "dateFilter": {
            "title": "Upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube search upload date filter."
          },
          "videoType": {
            "title": "Type",
            "enum": [
              "video",
              "movie"
            ],
            "type": "string",
            "description": "Videos or movies."
          },
          "lengthFilter": {
            "title": "Length",
            "enum": [
              "under4",
              "between420",
              "plus20"
            ],
            "type": "string",
            "description": "YouTube search duration filter."
          },
          "isHD": {
            "title": "HD",
            "type": "boolean",
            "description": "Will apply the HD filter for search"
          },
          "hasSubtitles": {
            "title": "Subtitles/CC",
            "type": "boolean",
            "description": "Will apply the Subtitles/CC filter for search"
          },
          "hasCC": {
            "title": "Creative Commons",
            "type": "boolean",
            "description": "Will apply the Creative Commons filter for search"
          },
          "is3D": {
            "title": "3D",
            "type": "boolean",
            "description": "Will apply the 3D filter for search"
          },
          "isLive": {
            "title": "Live",
            "type": "boolean",
            "description": "Will apply the Live filter for search"
          },
          "isBought": {
            "title": "Purchased",
            "type": "boolean",
            "description": "Will apply the Purchased filter for search"
          },
          "is4K": {
            "title": "4K",
            "type": "boolean",
            "description": "Will apply the 4K filter for search"
          },
          "is360": {
            "title": "360 degrees",
            "type": "boolean",
            "description": "Will apply the 360 degrees filter for search"
          },
          "hasLocation": {
            "title": "Location",
            "type": "boolean",
            "description": "Will apply the Location filter for search"
          },
          "isHDR": {
            "title": "HDR",
            "type": "boolean",
            "description": "Will apply the HDR filter for search"
          },
          "isVR180": {
            "title": "VR180",
            "type": "boolean",
            "description": "Will apply the VR180 filter for search"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "YouTube blocks datacenter IPs, so residential proxy is the default. The Actor switches to a fresh IP when a request is blocked.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}