{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper & API Alternative - Videos, Shorts | $1/1k",
    "description": "YouTube scraper and Data API alternative with no API key or quota: keyword search with filters, channel videos, Shorts and live streams, playlists and single videos. Exact views, likes, comment count, duration, upload date, hashtags and channel subscribers. $1 per 1,000 results.",
    "version": "0.1",
    "x-build-id": "xaW3wKVCa5PhHSPeg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/glasswing~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-glasswing-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/glasswing~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-glasswing-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/glasswing~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-glasswing-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": {
          "startUrls": {
            "title": "YouTube URLs, handles or IDs",
            "uniqueItems": true,
            "type": "array",
            "description": "One per line. Accepted: video links (watch?v=, youtu.be, /shorts/, /live/), channel links (@handle, /channel/UC..., /c/, /user/, optionally ending in /videos, /shorts, /streams or /about), bare @handles, video IDs, channel IDs (UC...), playlist links or IDs (PL...), and youtube.com/results?search_query=... pages (their own filters are kept). m.youtube.com and music.youtube.com links work too. If you call the Actor with search terms only, the built-in example channel is skipped automatically.",
            "default": [
              "https://www.youtube.com/@TED"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on YouTube, one per line, exactly as you would type them in the YouTube search box. Each term returns up to 'Max results per search, channel or playlist' rows. The options under 'Search filters' apply to these terms. A call that sends only search terms does not also scrape the built-in example channel.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum results (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows have been saved in total. Each saved row with status `ok` is one billable result ($1 per 1,000); rows with status `not_found` or `error` are free. Keep it small for test runs.",
            "default": 20
          },
          "maxResultsPerSource": {
            "title": "Max results per search, channel or playlist",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap for each search term, each channel and each playlist (up to 5,000). YouTube pages through about 20 results per request, and a single keyword search stops after a few hundred results.",
            "default": 10
          },
          "includeVideoDetails": {
            "title": "Include video details",
            "type": "boolean",
            "description": "For every video and Short found in a search, channel or playlist, also open the video to add the exact view count, like count, comment count, upload date, full description, hashtags and the channel's subscriber count. One extra request per video; the price per result stays the same. Switch it off for faster list-only runs (rounded view counts, relative upload time).",
            "default": true
          },
          "includeChannelInfo": {
            "title": "Add one channel profile row per channel",
            "type": "boolean",
            "description": "For each channel you give, also save one row with the channel's About data: description, subscribers, total videos, total views, join date, country, the links the creator lists, avatar and banner. The profile row is one result.",
            "default": false
          },
          "channelTab": {
            "title": "Channel tab",
            "enum": [
              "videos",
              "shorts",
              "streams",
              "about"
            ],
            "type": "string",
            "description": "Which list to read from a channel link that does not already end in /videos, /shorts, /streams or /about. 'about' returns only the channel profile row.",
            "default": "videos"
          },
          "channelSort": {
            "title": "Channel sort order",
            "enum": [
              "newest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "Order of a channel's videos, Shorts or streams, the same chips YouTube shows on the channel page.",
            "default": "newest"
          },
          "oldestPostDate": {
            "title": "Only items published since",
            "type": "string",
            "description": "Channel runs only: skip videos, Shorts and streams published before this date, given as a date (2026-01-31) or relative (30 days, 2 weeks, 6 months). Leave empty for no date limit. Channel lists show YouTube's relative upload time (\"3 weeks ago\"), so a few rows from just before the date can stay in; filter on publishedAt for an exact cut. Shorts lists carry no upload time and are not filtered. With Latest order the channel's list stops at the first older item."
          },
          "maxShorts": {
            "title": "Max Shorts per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Channel runs only: also read this many Shorts from each channel's Shorts tab, in addition to the tab chosen above. When 'Channel tab' is Shorts, this replaces 'Max results per search, channel or playlist' for it. Leave empty or 0 for today's behaviour."
          },
          "maxStreams": {
            "title": "Max live streams per channel",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Channel runs only: also read this many items from each channel's Live tab (past, current and scheduled streams), in addition to the tab chosen above. When 'Channel tab' is Live, this replaces 'Max results per search, channel or playlist' for it. Leave empty or 0 for today's behaviour."
          },
          "searchType": {
            "title": "Search result type",
            "enum": [
              "video",
              "shorts",
              "channel",
              "playlist",
              "movie",
              "all"
            ],
            "type": "string",
            "description": "What a search returns. 'all' mixes videos, Shorts, channels and playlists as YouTube shows them. The search filters apply to Search terms and to youtube.com/results links that carry no filter of their own.",
            "default": "video"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only videos uploaded within this period (YouTube's own filter).",
            "default": "any"
          },
          "videoDuration": {
            "title": "Video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "YouTube's length filter: under 4 minutes, 4 to 20 minutes, or over 20 minutes.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort search results by",
            "enum": [
              "relevance",
              "views"
            ],
            "type": "string",
            "description": "Relevance (YouTube's default) or view count.",
            "default": "relevance"
          },
          "searchFeatures": {
            "title": "Features",
            "uniqueItems": true,
            "type": "array",
            "description": "YouTube's feature filters: only results that have all the chosen features. Applies to Search terms and to youtube.com/results links without a filter of their own.",
            "items": {
              "type": "string",
              "enum": [
                "live",
                "4k",
                "hd",
                "subtitles",
                "creativeCommons",
                "360",
                "vr180",
                "hdr",
                "location"
              ],
              "enumTitles": [
                "Live",
                "4K",
                "HD",
                "Subtitles/CC",
                "Creative Commons",
                "360°",
                "VR180",
                "HDR",
                "Location"
              ]
            }
          },
          "query": {
            "title": "Search term (single, optional)",
            "type": "string",
            "description": "Same as one entry in 'Search terms', for API callers and AI agents that send a single string. Sent on its own, it skips the built-in example channel."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (datacenter, the default group) is on by default: YouTube starts refusing one server's requests after a few hundred video pages in a row, and spreading them over datacenter IPs keeps large runs clean. Residential proxies are not needed. Switch it off for small runs if you prefer.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}