{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Scraper Pro",
    "description": "Full‑fidelity YouTube data extractor for videos, Shorts, live streams, and channels. Built on Apify + Puppeteer for reliable, scalable web scraping that returns complete metadata, engagement stats, caption tracks for transcripts, hashtags/keywords, description links, and channel insights — fast.",
    "version": "3.1",
    "x-build-id": "NMRuXm6mw9VcKXYxZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~youtube-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-youtube-scraper-pro",
        "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/coregent~youtube-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-coregent-youtube-scraper-pro",
        "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/coregent~youtube-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-youtube-scraper-pro",
        "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": {
          "searchQueries": {
            "title": "Search, Channels, Playlists & Discovery",
            "type": "array",
            "description": "Discovery sources — each entry is auto-detected as one of: (1) a search keyword (e.g. \"ai automation tutorial\"); (2) a channel — URL, @handle, /channel/UC…, /c/…, /user/…, or a bare channel ID (UC…); (3) a playlist — URL (…?list=…) or a bare playlist ID (PL…, UU…); (4) a video URL or 11-char video ID — treated as a SEED (its owning channel is found and that channel's videos are returned, not just the one video); (5) a hashtag — #tag or a youtube.com/hashtag/<tag> URL. Each source is capped by \"Max videos per source\". To fetch a single video by itself, use the \"YouTube URLs or IDs\" field instead.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "startUrls": {
            "title": "YouTube URLs or IDs",
            "type": "array",
            "description": "Direct YouTube videos to scrape — one output record per entry, for that video only (no channel expansion, exempt from the Filters below). Accepts full URLs (https://www.youtube.com/watch?v=…, https://youtu.be/…, /shorts/…) or bare 11-character video IDs (e.g. dQw4w9WgXcQ). Channel/playlist/keyword entries here are skipped — put those in the Discovery field above.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResultsPerQuery": {
            "title": "Max videos per source",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum videos to take from EACH discovery source (keyword, hashtag, channel, playlist, or seed-video channel) before filtering. Does not apply to the YouTube URLs/IDs field (one video each).",
            "default": 10
          },
          "maxItems": {
            "title": "Max results (whole run)",
            "minimum": 0,
            "type": "integer",
            "description": "Global cap on the total number of results saved across the entire run — your spend ceiling. 0 means no global limit (each source is still capped by 'Max videos per source'). Applied after filtering and sorting.",
            "default": 0
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "all",
              "videos",
              "shorts",
              "live"
            ],
            "type": "string",
            "description": "Filter discovered results by content type. Shorts are detected by duration (≤ 60s); live from broadcast status. Does not affect videos listed in YouTube URLs/IDs.",
            "default": "all"
          },
          "videoDuration": {
            "title": "Duration",
            "enum": [
              "all",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Filter by video length: short (< 4 min), medium (4–20 min), long (> 20 min).",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "date",
              "views"
            ],
            "type": "string",
            "description": "Order of results. 'Relevance' keeps discovery order (keyword search relevance / channel newest-first). 'Date' and 'Views' sort the discovered set before the total cap is applied.",
            "default": "relevance"
          },
          "uploadDate": {
            "title": "Upload date filter",
            "enum": [
              "any",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Relative published-date filter, applied to ALL discovered sources. Combined with From/To Date below (the stricter bound wins).",
            "default": "any"
          },
          "titleFilter": {
            "title": "Title filter (optional)",
            "type": "string",
            "description": "Comma-separated keywords. Keep only results whose title contains at least one of them (OR logic, case-insensitive). Leave empty to disable.",
            "default": ""
          },
          "getTrending": {
            "title": "Include trending videos",
            "type": "boolean",
            "description": "Also add the region's trending (\"most popular\") videos as a source (via the official YouTube Data API). Requires an API key. Uses the Country setting; capped by YouTube. These rows are marked provenance.source = \"trending\".",
            "default": false
          },
          "dateFrom": {
            "title": "From Date",
            "type": "string",
            "description": "Only include videos published on or after this date (YYYY-MM-DD). Applies to ALL discovered sources. Leave empty to disable.",
            "default": ""
          },
          "dateTo": {
            "title": "To Date",
            "type": "string",
            "description": "Only include videos published on or before this date (YYYY-MM-DD). Applies to ALL discovered sources. Leave empty to disable.",
            "default": ""
          },
          "regionCode": {
            "title": "Country",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "IE",
              "NZ",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "PL",
              "SE",
              "TR",
              "RU",
              "UA",
              "IN",
              "ID",
              "JP",
              "KR",
              "VN",
              "TH",
              "PH",
              "MY",
              "SG",
              "HK",
              "TW",
              "BR",
              "MX",
              "AR",
              "CO",
              "CL",
              "NG",
              "ZA",
              "EG",
              "SA",
              "AE"
            ],
            "type": "string",
            "description": "Country for localization (ISO 3166-1 alpha-2). Also selects the category list used for the category name.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "de",
              "fr",
              "pt",
              "it",
              "nl",
              "pl",
              "sv",
              "tr",
              "ru",
              "uk",
              "ja",
              "ko",
              "zh",
              "hi",
              "id",
              "vi",
              "th",
              "ar"
            ],
            "type": "string",
            "description": "Preferred language (IETF BCP-47). Limited effect in API mode.",
            "default": "en"
          },
          "outputMode": {
            "title": "Output format",
            "enum": [
              "rich",
              "analyticsFlat"
            ],
            "type": "string",
            "description": "How each record is shaped. 'Rich' keeps nested objects (channel, features, provenance). 'Analytics-flat' flattens them into top-level columns (channel_name, features_isHD, …) and joins keyword/hashtag arrays — easier for Google Sheets, Excel, and BI tools.",
            "default": "rich"
          },
          "includeTranscript": {
            "title": "Include Transcript",
            "type": "boolean",
            "description": "Extract captions for each result and fill the `subtitles` array (otherwise it stays empty). Each entry has the caption text, a `type`, the `language`, and a link to the file in the run's key-value store. Adds ~1-2 seconds per video; about 60-80% of videos have captions available. Billed as a separate `transcript` pay-per-event charge, only for videos where a subtitle is actually delivered.",
            "default": false
          },
          "subtitleFormats": {
            "title": "Subtitle formats (select one or more)",
            "type": "array",
            "description": "Which subtitle format(s) to include in each `subtitles` entry — pick one or more. 'SRT' and 'VTT' keep timestamps (SubRip / WebVTT); 'Plain text' is the spoken text only; 'JSON' is an array of `{ start, dur, text }` segments. All are derived from one caption fetch (no extra API cost per format). Only used when Include Transcript is enabled.",
            "items": {
              "type": "string",
              "enum": [
                "srt",
                "vtt",
                "txt",
                "json"
              ],
              "enumTitles": [
                "SRT (timestamped)",
                "VTT (WebVTT)",
                "Plain text",
                "JSON (segments)"
              ]
            },
            "default": [
              "srt"
            ]
          },
          "transcriptLanguage": {
            "title": "Transcript Language",
            "enum": [
              "",
              "en",
              "es",
              "fr",
              "de",
              "pt",
              "ru",
              "ja",
              "ko",
              "zh",
              "zh-TW",
              "ar",
              "hi",
              "it",
              "nl",
              "tr",
              "pl",
              "sv",
              "id",
              "vi",
              "uk"
            ],
            "type": "string",
            "description": "Preferred caption language. Auto-detect uses the first available track. Only used when Include Transcript is enabled.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}