{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Scraper",
    "description": "A youtube comments scraper and more: collect public videos, shorts, playlists, community posts, comments and replies from YouTube channels and links. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "SE8pr96TeAEt07B4X"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/icoe-man~youtube-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-icoe-man-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/icoe-man~youtube-scraper/runs": {
      "post": {
        "operationId": "runs-sync-icoe-man-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/icoe-man~youtube-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-icoe-man-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to collect",
            "enum": [
              "channel-videos",
              "channel-shorts",
              "channel-playlists",
              "channel-communityposts",
              "video-get",
              "communitypost-get",
              "playlist-videos",
              "video-comments",
              "comment-replies",
              "creator-emails"
            ],
            "type": "string",
            "description": "Choose one type of result per run, then fill in the fields for that choice.",
            "default": "channel-videos"
          },
          "channels": {
            "title": "Channels",
            "maxItems": 100,
            "type": "array",
            "description": "Enter a YouTube handle like @NASA, a channel link like https://www.youtube.com/@NASA, or a channel ID that starts with UC.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "newest",
              "popular"
            ],
            "type": "string",
            "description": "For Channel videos and Channel shorts, 'newest' (the default) puts the latest uploads first. Choose 'popular' to see the most viewed uploads first. Leave Uploads from blank if you choose 'popular'."
          },
          "postedAfter": {
            "title": "Uploads from",
            "type": "string",
            "description": "Enter a date like 2026-11-01 (UTC) to collect uploads from that day onward. Leave blank to include any date. This filter works in Channel videos and Channel shorts with 'newest' only. You may get fewer results than you asked for, and the run stops if three pages in a row have no matches."
          },
          "videoUrls": {
            "title": "Video links",
            "maxItems": 100,
            "type": "array",
            "description": "Paste full YouTube video links like https://www.youtube.com/watch?v=LHUvedAssyE. You can also paste Shorts or youtu.be links.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Community post links",
            "maxItems": 100,
            "type": "array",
            "description": "Paste full YouTube community post links like https://www.youtube.com/post/Ugkx0X33g-nAj6FyciU8R9pJUCrPERrtPBJE",
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "Playlist links",
            "maxItems": 100,
            "type": "array",
            "description": "Paste full YouTube playlist links like https://www.youtube.com/playlist?list=PL2aBZuCeDwlRaF6AIey7ulmW1X0SHI1mQ",
            "items": {
              "type": "string"
            }
          },
          "commentOrder": {
            "title": "Comment order",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "'top' (the default) puts top comments first. Choose 'newest' to start with the latest comments and reach further back on videos with lots of comments."
          },
          "repliesTokens": {
            "title": "Replies tokens",
            "maxItems": 100,
            "type": "array",
            "description": "Copy the repliesToken code from a comment with replies in your Video comments results, then paste it here.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Result limit per target",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Set the most results to collect from each target, up to the mode's maximum. Leave this blank to use the mode's default limit. The limit you set doesn't apply to these modes, which return one result per target: Video, Community post and Creator emails."
          },
          "freshness": {
            "title": "Data freshness",
            "enum": [
              "standard",
              "live"
            ],
            "type": "string",
            "description": "Standard can return results faster when recently collected data is available. Choose Live to collect fresh data on every run.",
            "default": "standard"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}