{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Fast Scraper - Videos, Channels & Comments",
    "description": "Fast YouTube data extraction: videos, channels, comments, playlists, and analytics data.",
    "version": "1.3",
    "x-build-id": "jgJ5vFMcyHFNOqh75"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/viralanalyzer~youtube-fast-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-viralanalyzer-youtube-fast-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/viralanalyzer~youtube-fast-scraper/runs": {
      "post": {
        "operationId": "runs-sync-viralanalyzer-youtube-fast-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/viralanalyzer~youtube-fast-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-viralanalyzer-youtube-fast-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": "Start URLs",
            "type": "array",
            "description": "List of YouTube URLs (Channel, Playlist, or Video) to scrape.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max Items",
            "type": "integer",
            "description": "Maximum number of videos to scrape.",
            "default": 50
          },
          "maxResults": {
            "title": "Max Results (alias of Max Items)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional alias for 'Max Items' (unified ViralAnalyzer vocabulary). If set, it overrides 'Max Items'. Leave empty to keep using 'Max Items'."
          },
          "seeds": {
            "title": "Seeds (alias of Start URLs)",
            "type": "array",
            "description": "Optional unified-vocabulary alias for inputs. Provide a list of plain YouTube URLs (channel, playlist, or video). When non-empty AND 'Seed Type' is 'url', these are mapped into 'Start URLs'. Leave empty to keep using 'Start URLs'.",
            "items": {
              "type": "string"
            }
          },
          "seedType": {
            "title": "Seed Type",
            "enum": [
              "url"
            ],
            "type": "string",
            "description": "Type of values provided in 'Seeds'. This actor discovers videos only from URLs (channel/playlist/video, including @handle channel URLs), so the only supported seed type is 'url'.",
            "default": "url"
          },
          "searchQuery": {
            "title": "Search Query (keyword search)",
            "type": "string",
            "description": "Optional. Find videos by topic instead of by URL. When set, the actor runs a YouTube keyword search (yt-dlp ytsearch) for this term and ignores 'Start URLs'/'Seeds'. Number of results = resolved Max Results / Max Items. Leave empty to scrape from URLs."
          },
          "sortBy": {
            "title": "Sort By (search results)",
            "enum": [
              "relevance",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Order for keyword-search results (only used when 'Search Query' is set). 'relevance' (default) uses YouTube relevance; 'date' uses the date-ordered search and is also re-sorted newest-first in the actor (YouTube's server-side date order is unreliable); 'views' has no native YouTube sort, so results are fetched then sorted by view count (descending) in the actor.",
            "default": "relevance"
          },
          "includeComments": {
            "title": "Include Comment Text",
            "type": "boolean",
            "description": "If true, each video gets an additive 'comments' array of { author, text, likes }, truncated to 'Comments Limit'. WARNING: comment fetching is slow and adds run time — keep this OFF unless you need the text. When false (default), only 'commentsCount' is returned and there is no extra cost.",
            "default": false
          },
          "commentsLimit": {
            "title": "Comments Limit (per video)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of top-level comments to return per video when 'Include Comment Text' is on. Capped at 100 to protect the run timeout.",
            "default": 20
          },
          "normalizeOutput": {
            "title": "Add normalized output block",
            "type": "boolean",
            "description": "If true, each item gets an additive '_normalized' block (platform, url, author, text, views, likes, comments, shares, publishedAtISO, lang, hashtags, engagementVelocity) for easy cross-platform aggregation. Existing fields are unchanged. Default false.",
            "default": false
          },
          "downloadSubtitles": {
            "title": "Download Subtitles/Transcripts",
            "type": "boolean",
            "description": "If true, will attempt to extract auto-generated captions.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. YouTube aggressively blocks datacenter IPs. Residential proxy is recommended.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}