{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper - Channels, Videos, Search, Shorts & Transcript",
    "description": "YouTube scraper without API key: search results, channel videos, Shorts, live streams, playlists and video details (views, likes, tags, date, subscribers). Optional transcripts. $0.0033 per result.",
    "version": "0.1",
    "x-build-id": "tQcx0n9KnLcE5h8EL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/admirala~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-admirala-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/admirala~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-admirala-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/admirala~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-admirala-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 queries",
            "type": "array",
            "description": "Keywords to search on YouTube, one per line. Each query returns up to 'Max results per search query' items. Example: [\"web scraping tutorial\", \"lofi hip hop\"].",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "video",
              "shorts",
              "channel"
            ],
            "type": "string",
            "description": "What the search returns: regular videos, Shorts, or channels (channel profile with subscribers, video count, country and links).",
            "default": "video"
          },
          "maxResultsPerQuery": {
            "title": "Max results per search query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of results per search query. You pay per result, so this caps the cost per query.",
            "default": 20
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "Search ordering, as offered by YouTube's own search filters.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "any",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "YouTube's upload-date search filter. For an exact cutoff use 'Published after' below.",
            "default": "any"
          },
          "duration": {
            "title": "Video length",
            "enum": [
              "any",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "YouTube's duration search filter (search only).",
            "default": "any"
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Channel URLs, @handles or channel IDs (UC...). For each channel you get one channel record (subscribers, video count, total views, country, links, description) plus its newest videos. Example: [\"@GoogleDevelopers\", \"https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw\"].",
            "items": {
              "type": "string"
            }
          },
          "channelVideos": {
            "title": "Channel videos tab",
            "type": "boolean",
            "description": "Scrape the channel's Videos tab (newest first).",
            "default": true
          },
          "channelShorts": {
            "title": "Channel Shorts tab",
            "type": "boolean",
            "description": "Also scrape the channel's Shorts tab.",
            "default": false
          },
          "channelStreams": {
            "title": "Channel live streams tab",
            "type": "boolean",
            "description": "Also scrape the channel's Live tab (current and past live streams).",
            "default": false
          },
          "maxResultsPerChannel": {
            "title": "Max videos per channel tab",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of videos per channel and per selected tab (videos / shorts / streams), newest first.",
            "default": 20
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only return videos published on or after this date: 'YYYY-MM-DD' or a relative period like '7 days', '3 months', '1 year'. Channel tabs stop paging as soon as older videos appear, so you do not pay for them. Leave empty for no cutoff."
          },
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Individual videos to get full details for: watch, youtu.be, shorts, live or embed URLs, or 11-character video IDs.",
            "items": {
              "type": "string"
            }
          },
          "playlists": {
            "title": "Playlists",
            "type": "array",
            "description": "Playlist URLs (with list=...) or playlist IDs. Returns the videos in playlist order.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerPlaylist": {
            "title": "Max videos per playlist",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of videos per playlist.",
            "default": 50
          },
          "videoDetails": {
            "title": "Full video details",
            "type": "boolean",
            "description": "true = exact publish date, likes, tags, category, full description and exact view count for every video (one small extra request per video, same price). false = only what the result list shows (faster): relative date like '2 days ago' and rounded views.",
            "default": true
          },
          "channelInfo": {
            "title": "Channel info",
            "type": "boolean",
            "description": "true = add the channel's subscriber count to every video and output one channel record per input channel.",
            "default": true
          },
          "includeTranscript": {
            "title": "Include transcript",
            "type": "boolean",
            "description": "Add the video's captions as text plus timestamped segments. Charged separately: $0.0049 per transcript delivered (videos without captions are not charged for the transcript).",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Transcript language(s)",
            "type": "string",
            "description": "Preferred caption language(s), comma-separated, e.g. 'en' or 'de,en'. If none is available the first available track is used.",
            "default": "en"
          },
          "allowResidentialProxy": {
            "title": "Allow residential proxy fallback",
            "type": "boolean",
            "description": "If YouTube blocks the direct and datacenter routes, retry through Apify residential proxy. Included in the price.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}