{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Playlist Scraper: Export CSV, Length & Deleted Videos",
    "description": "Export every video of any YouTube playlist to CSV, Excel or JSON: titles, channels, views, dates, durations. No 200-video limit. Playlist length at 1.25x-2x, all playlists of a channel, playlist search, names of deleted videos and change alerts. No API key.",
    "version": "0.1",
    "x-build-id": "Kucu3dkKHIKYnW9Pc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~youtube-playlist-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-youtube-playlist-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/s_actors~youtube-playlist-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-youtube-playlist-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/s_actors~youtube-playlist-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-youtube-playlist-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": {
          "playlists": {
            "title": "📃 Playlists or channels",
            "type": "array",
            "description": "One per line: playlist links (youtube.com/playlist?list=...), video links from a playlist (watch?v=...&list=...), playlist IDs (PL..., UU..., OL...) or channels (youtube.com/@handle, /channel/UC..., @handle): a channel gives all its public playlists.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔍 Find playlists by keyword",
            "type": "array",
            "description": "Optional. YouTube playlist search, e.g. \"python course\" or \"lofi study music\": the top playlists of each query are scraped.",
            "items": {
              "type": "string"
            }
          },
          "resultType": {
            "title": "📊 Results",
            "enum": [
              "videos",
              "playlists"
            ],
            "type": "string",
            "description": "Videos = the full video list (export to CSV / Excel). Playlists = one row per playlist: total length and length at 1.25x, 1.5x, 1.75x and 2x, videos, unavailable videos, views, last update, most viewed video.",
            "default": "videos"
          },
          "maxVideosPerPlaylist": {
            "title": "🎬 Max videos per playlist",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "0 = all videos. Playlists longer than 200 videos are read in full (the YouTube web page stops at 200).",
            "default": 0
          },
          "maxPlaylistsPerChannel": {
            "title": "📺 Max playlists per channel",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "For channel inputs: how many of the channel's playlists, in the order of its Playlists tab.",
            "default": 100
          },
          "maxPlaylistsPerSearch": {
            "title": "🔎 Max playlists per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "For search queries: how many playlists from the top of the results.",
            "default": 20
          },
          "includeUnavailable": {
            "title": "👻 Include unavailable videos",
            "type": "boolean",
            "description": "Show the videos YouTube hides (\"Unavailable videos are hidden\"): region-blocked ones with full data, deleted and private ones with status unavailable.",
            "default": true
          },
          "recoverDeletedTitles": {
            "title": "🕵️ Find titles of deleted videos",
            "type": "boolean",
            "description": "For each deleted or private video: its title and channel from this Actor's earlier runs, else from archived copies on the Wayback Machine (web.archive.org, usually 2-40 s per video). Charged only when a title is found.",
            "default": false
          },
          "findReplacements": {
            "title": "🔁 Find replacements for deleted videos",
            "type": "boolean",
            "description": "With Find titles of deleted videos: search YouTube for each recovered title and return the best match (a re-upload, the official video or another upload of the same song or clip) with a match score. Free.",
            "default": true
          },
          "maxRecoveries": {
            "title": "Max archive lookups per run",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Limit of deleted videos looked up in the Wayback Machine in one run.",
            "default": 200
          },
          "onlyChanges": {
            "title": "🔔 Only changes",
            "type": "boolean",
            "description": "For scheduled runs: the first run returns every video and remembers the playlists; later runs return only videos that were added, removed (with their last title) or became unavailable (with the title they had).",
            "default": false
          },
          "monitorName": {
            "title": "🏷️ Monitor name",
            "type": "string",
            "description": "Name of the memory used by Only changes. Use a different name for each task.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "⚡ Parallel requests",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many requests to YouTube run at the same time.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Requests go direct first and switch to Apify datacenter proxies when YouTube refuses them. The default works for most runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Log every failed request attempt.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}