{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Playlist Scraper - Videos, Durations & Views",
    "description": "Extract videos from any public YouTube playlist: title, video ID, watch URL, channel, duration in seconds, view count, upload age and playlist position, plus a summary row per playlist. Up to 200 videos - YouTube's own logged-out limit. Independent tool, not affiliated with Google LLC.",
    "version": "0.1",
    "x-build-id": "ggy1Y6yCREnoB0wMe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~youtube-playlist-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~youtube-playlist-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~youtube-playlist-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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": {
          "playlistUrls": {
            "title": "Playlist URLs or IDs",
            "type": "array",
            "description": "The playlists to extract. Accepts a full YouTube playlist URL, any watch URL carrying `list=`, or a bare playlist ID (`PL...`, `UU...`, `OLAK...`). One per row.",
            "items": {
              "type": "string"
            }
          },
          "urlsFromFile": {
            "title": "Import playlists from a file",
            "type": "string",
            "description": "Bulk import. Paste a block of playlist URLs or IDs (one per line), **or** paste a single link to a `.txt` / `.csv` / Google Sheet / Google Drive / Apify key-value-store file holding them. Blank lines, `#` comments, quotes and extra CSV columns are ignored."
          },
          "maxVideosPerPlaylist": {
            "title": "Max videos per playlist",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to read from each playlist, newest position first. YouTube's own hard limit for a playlist is 5,000 items, and this Actor can now reach all of them - the old 200-video cap is gone.",
            "default": 200
          },
          "containsText": {
            "title": "Title contains",
            "type": "string",
            "description": "Keep only videos whose title contains this text (case-insensitive). Filtered rows are **never charged**."
          },
          "minDurationSeconds": {
            "title": "Minimum duration",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos at least this long, in seconds. `0` disables it. Useful for dropping Shorts (under 60 s).",
            "default": 0
          },
          "maxDurationSeconds": {
            "title": "Maximum duration",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only videos no longer than this, in seconds. `0` disables it.",
            "default": 0
          },
          "includeVideos": {
            "title": "Include the videos",
            "type": "boolean",
            "description": "On by default: one row per video, in playlist order.",
            "default": true
          },
          "includePlaylistSummary": {
            "title": "Include a playlist summary row",
            "type": "boolean",
            "description": "Adds one `playlist` row per playlist: title, description, owner, total video and view counts, and the thumbnail. Charged as `playlist`.",
            "default": true
          },
          "outputFields": {
            "title": "Output fields",
            "uniqueItems": true,
            "type": "array",
            "description": "Trim the export to just these columns. Leave empty for every field.",
            "items": {
              "type": "string",
              "enum": [
                "type",
                "playlistId",
                "playlistTitle",
                "playlistUrl",
                "playlistOwner",
                "playlistOwnerId",
                "position",
                "videoId",
                "title",
                "videoUrl",
                "channel",
                "durationText",
                "durationSeconds",
                "viewsText",
                "viewCount",
                "publishedText",
                "thumbnail",
                "description",
                "videoCountText",
                "videoCount",
                "videosReturned",
                "scrapedAt"
              ],
              "enumTitles": [
                "Record type - playlistVideo or playlist (type)",
                "Playlist ID (playlistId)",
                "Playlist title (playlistTitle)",
                "Playlist URL (playlistUrl)",
                "Channel that owns the playlist (playlistOwner)",
                "Owner channel ID (playlistOwnerId)",
                "Position in the playlist, 1 = first (position)",
                "Video ID (videoId)",
                "Video title (title)",
                "Watch URL (videoUrl)",
                "Channel that uploaded the video (channel)",
                "Duration as shown, e.g. 2:32 (durationText)",
                "Duration in seconds (durationSeconds)",
                "View count as shown (viewsText)",
                "View count as a number (viewCount)",
                "Published, as shown e.g. 2 days ago (publishedText)",
                "Thumbnail URL (thumbnail)",
                "Playlist description (description)",
                "Videos in the playlist, as shown (videoCountText)",
                "Videos in the playlist, as a number (videoCount)",
                "Videos this run returned for the playlist (videosReturned)",
                "When this row was collected (scrapedAt)"
              ]
            }
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "YouTube interface language, e.g. `en`, `es`, `de`. Affects the \"2 days ago\" and view-count wording.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country YouTube should serve, e.g. `US`, `GB`, `IN`.",
            "default": "US"
          },
          "monitorMode": {
            "title": "Monitor mode - only new videos",
            "type": "boolean",
            "description": "Remembers videos between runs and emits only ones it has not seen. Pair with an Apify Schedule to watch a playlist for additions.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store holding the remembered videos. Use a different name per tracked playlist set.",
            "default": "youtube-playlist-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many playlists to read in parallel.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is used by default. Datacenter proxy is enough for YouTube playlists.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}