{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Channel & Video Data Scraper",
    "description": "Channels, videos, Shorts, live streams, playlists, community posts, search results, comments and transcripts from YouTube, as clean JSON. Exact view and like counts. Pay per result; failures are free.",
    "version": "1.0",
    "x-build-id": "aoOLmIOr801DAbLY3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ttechx~youtube-channel-video-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ttechx-youtube-channel-video-data-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/ttechx~youtube-channel-video-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ttechx-youtube-channel-video-data-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/ttechx~youtube-channel-video-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ttechx-youtube-channel-video-data-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": {
          "startUrls": {
            "title": "YouTube links or ids",
            "type": "array",
            "description": "Channels (@handle, channel link or UC… id), videos, Shorts, playlists or community posts. One per line (a list separated by commas also works). The kind of each link is recognised by itself.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Words to search YouTube for, one search per line, e.g. minecraft. How many results each, and the filters, are set under Search options below.",
            "items": {
              "type": "string"
            }
          },
          "channelDetails": {
            "title": "Channel details",
            "type": "boolean",
            "description": "Subscribers, total views and videos, country, join date, links and more, one item per channel.",
            "default": true
          },
          "maxVideos": {
            "title": "Max videos per channel",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Videos from the channel's Videos tab.",
            "default": 10
          },
          "maxShorts": {
            "title": "Max Shorts per channel",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Shorts from the channel's Shorts tab.",
            "default": 0
          },
          "maxLiveStreams": {
            "title": "Max live streams per channel",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Past, live and upcoming streams.",
            "default": 0
          },
          "maxPlaylists": {
            "title": "Max playlists per channel",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "The playlists the channel made.",
            "default": 0
          },
          "maxPosts": {
            "title": "Max community posts per channel",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Posts from the channel's community tab.",
            "default": 0
          },
          "channelSortBy": {
            "title": "Sort videos, Shorts and live streams by",
            "enum": [
              "newest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "The order of the channel's lists.",
            "default": "newest"
          },
          "maxSearchResults": {
            "title": "Max results per search term",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Videos, Shorts, channels, playlists and movies.",
            "default": 20
          },
          "searchType": {
            "title": "Type",
            "enum": [
              "video",
              "shorts",
              "channel",
              "playlist",
              "movie"
            ],
            "type": "string",
            "description": "Only this kind of result. Empty: all kinds."
          },
          "uploadDate": {
            "title": "Upload date",
            "enum": [
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Empty: any time."
          },
          "duration": {
            "title": "Length",
            "enum": [
              "under3min",
              "3to20min",
              "over20min"
            ],
            "type": "string",
            "description": "Empty: any length."
          },
          "features": {
            "title": "Features",
            "type": "array",
            "description": "Only results with all of these features.",
            "items": {
              "type": "string",
              "enum": [
                "HD",
                "subtitles",
                "CCommons",
                "3D",
                "Live",
                "Purchased",
                "4K",
                "360",
                "Location",
                "HDR",
                "VR180"
              ],
              "enumTitles": [
                "HD",
                "Subtitles/CC",
                "Creative Commons",
                "3D",
                "Live",
                "Purchased",
                "4K",
                "360°",
                "Location",
                "HDR",
                "VR180"
              ]
            }
          },
          "searchSortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "popularity"
            ],
            "type": "string",
            "description": "The order of the search results.",
            "default": "relevance"
          },
          "maxPlaylistVideos": {
            "title": "Max videos per playlist",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Videos of each playlist in the links.",
            "default": 20
          },
          "videoDetails": {
            "title": "Full details for every video found",
            "type": "boolean",
            "description": "Exact likes and views, description, keywords, category, chapters, caption languages and more, in place of the short list entry. Videos and Shorts given as links always get full details.",
            "default": false
          },
          "transcripts": {
            "title": "Transcripts",
            "type": "boolean",
            "description": "The captions of each video as timed text and as one whole text, one item per video. Videos without captions are skipped, free.",
            "default": false
          },
          "transcriptLanguage": {
            "title": "Transcript language",
            "type": "string",
            "description": "A language code such as en, es or pt-BR. Empty: the video's own default track."
          },
          "maxComments": {
            "title": "Max comments per video or post",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Comments of each video, Short and community post. 0: no comments.",
            "default": 0
          },
          "commentsSortBy": {
            "title": "Sort comments by",
            "enum": [
              "top",
              "newest"
            ],
            "type": "string",
            "description": "The order of the comments.",
            "default": "top"
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Replies to the comments, counted in the comment limit.",
            "default": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of YouTube's texts, e.g. en, es, pt-BR. Counts and dates are only read from English: with another language they are left out.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code, e.g. US, GB, BD. Also picks the country of search results.",
            "default": "US"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}