{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel, Video & Comment Export - Official API",
    "description": "Export YouTube channel info, channel or playlist videos, video details and (opt-in) comments through the official YouTube Data API v3 with your own free API key. Quota-aware: stops before your daily units run out. Comments without author names or ids. $0.0008 per item plus $0.01 per run.",
    "version": "1.1",
    "x-build-id": "LXkbC42SEKHmadl6t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/digivibetech~youtube-data-api-export/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-digivibetech-youtube-data-api-export",
        "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/digivibetech~youtube-data-api-export/runs": {
      "post": {
        "operationId": "runs-sync-digivibetech-youtube-data-api-export",
        "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/digivibetech~youtube-data-api-export/run-sync": {
      "post": {
        "operationId": "run-sync-digivibetech-youtube-data-api-export",
        "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": {
          "apiKey": {
            "title": "YouTube Data API v3 key (your own, free)",
            "type": "string",
            "description": "Your own Google API key with 'YouTube Data API v3' enabled (Google Cloud Console -> APIs & Services -> Credentials). Stored encrypted by Apify, sent only to www.googleapis.com in the X-Goog-Api-Key header, never logged. Leave empty to get 3 free illustrative sample rows."
          },
          "mode": {
            "title": "What to export",
            "enum": [
              "channelInfo",
              "channelVideos",
              "playlistVideos",
              "videoDetails",
              "comments"
            ],
            "type": "string",
            "description": "Each item exported (channel, video or comment) is one 'item-exported' event.",
            "default": "channelInfo"
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Channel ids (UC...), @handles or channel URLs (/channel/UC..., /@handle, /user/name). Used by 'Channel info' and 'Channel videos'. Custom /c/ URLs are not supported (they need a 100-unit search call).",
            "items": {
              "type": "string"
            }
          },
          "playlists": {
            "title": "Playlists",
            "type": "array",
            "description": "Playlist ids (PL...) or playlist URLs. Used by 'Playlist videos'.",
            "items": {
              "type": "string"
            }
          },
          "videos": {
            "title": "Videos",
            "type": "array",
            "description": "Video ids or URLs (watch, youtu.be, shorts, live, embed). Used by 'Video details' and 'Comments'.",
            "items": {
              "type": "string"
            }
          },
          "allowComments": {
            "title": "Allow comment export",
            "type": "boolean",
            "description": "Comment export is off by default. Turn on to use the Comments mode. Comment rows contain text, likes, dates and reply counts only: never the author's name, channel id, channel URL or profile image.",
            "default": false
          },
          "publishedAfter": {
            "title": "Only videos published on or after",
            "type": "string",
            "description": "Channel/playlist modes: skip older videos (YYYY-MM-DD). Optional."
          },
          "commentOrder": {
            "title": "Comment order",
            "enum": [
              "relevance",
              "time"
            ],
            "type": "string",
            "description": "Order of top-level comments.",
            "default": "relevance"
          },
          "maxItems": {
            "title": "Max items per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety cap on exported items (channels, videos or comments). The small default keeps a first test run to about one cent.",
            "default": 20
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel or playlist",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Newest uploads first for channels; playlist order for playlists.",
            "default": 50
          },
          "maxCommentsPerVideo": {
            "title": "Max comments per video",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Comments mode: top-level comments (and replies, if on) per video.",
            "default": 100
          },
          "quotaBudgetUnits": {
            "title": "Quota budget for this run (units)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops before it would use more YouTube Data API units than this. A default key has 10,000 units per day; every call this actor makes costs 1 unit (up to 50 channels/videos or 100 comments). Search (100 units) is never used.",
            "default": 2000
          },
          "maxChargeUsd": {
            "title": "Max charge for this run (USD, optional)",
            "minimum": 0,
            "type": "number",
            "description": "Extra cap on top of Apify's own max cost per run."
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Comments mode: also export replies (one extra quota unit per 100 replies). Same no-author rule.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}