{
  "openapi": "3.0.1",
  "info": {
    "title": "Youtube Scraper Pro",
    "description": "The most advanced YouTube scraper on the market. Extract videos, Shorts, Live streams, comments, and even dislike counts from any country. Includes AI-ready JSON output and subtitle downloads.",
    "version": "1.0",
    "x-build-id": "ZXZ2DPSTqUl6nhFzM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapity~youtube-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapity-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/scrapity~youtube-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-scrapity-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/scrapity~youtube-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-scrapity-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 Queries",
            "type": "array",
            "description": "Enter search terms just like you would in YouTube's search bar. Each query will be searched separately.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum videos per search",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit the number of regular videos to crawl per search query. If scraping a channel, acts as a limit for regular videos.",
            "default": 50
          },
          "maxResultsShorts": {
            "title": "Maximum shorts per search",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Limit the number of YouTube Shorts videos to crawl. Set to 0 to skip shorts entirely.",
            "default": 0
          },
          "maxResultsStreams": {
            "title": "Maximum streams per search",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Limit the number of Live Streams to crawl. Set to 0 to skip streams entirely.",
            "default": 0
          },
          "startUrls": {
            "title": "YouTube URLs",
            "type": "array",
            "description": "Direct links to YouTube videos, channels, playlists, or search results. Supports all YouTube URL formats.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "downloadSubtitles": {
            "title": "Download subtitles",
            "type": "boolean",
            "description": "Enable downloading of video transcripts/subtitles when available.",
            "default": false
          },
          "saveSubtitlesToKVS": {
            "title": "Save subtitles to Key-Value Store",
            "type": "boolean",
            "description": "Store large subtitle files in the Key-Value Store instead of the dataset. Useful for long videos with large transcripts.",
            "default": false
          },
          "subtitlesLanguage": {
            "title": "Subtitles language",
            "enum": [
              "any",
              "en",
              "de",
              "es",
              "fr",
              "it",
              "ja",
              "ko",
              "nl",
              "pt",
              "ru",
              "zh",
              "ar",
              "hi"
            ],
            "type": "string",
            "description": "Select the language for subtitles/transcripts.",
            "default": "en"
          },
          "preferAutoGeneratedSubtitles": {
            "title": "Prefer auto-generated subtitles",
            "type": "boolean",
            "description": "When enabled, prefer YouTube's auto-generated captions over manually uploaded subtitles.",
            "default": false
          },
          "subtitlesFormat": {
            "title": "Subtitles format",
            "enum": [
              "plaintext",
              "srt",
              "vtt",
              "json"
            ],
            "type": "string",
            "description": "Output format for downloaded subtitles.",
            "default": "plaintext"
          },
          "sortingOrder": {
            "title": "Sorting order",
            "enum": [
              "relevance",
              "rating",
              "upload_date",
              "view_count"
            ],
            "type": "string",
            "description": "How to sort YouTube search results.",
            "default": "relevance"
          },
          "dateFilter": {
            "title": "Upload date",
            "enum": [
              "",
              "hour",
              "today",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Filter videos by when they were uploaded.",
            "default": ""
          },
          "videoType": {
            "title": "Video type",
            "enum": [
              "",
              "video",
              "movie"
            ],
            "type": "string",
            "description": "Filter by content type - regular videos or full movies.",
            "default": ""
          },
          "durationFilter": {
            "title": "Duration",
            "enum": [
              "",
              "short",
              "medium",
              "long"
            ],
            "type": "string",
            "description": "Filter videos by length.",
            "default": ""
          },
          "minViews": {
            "title": "Minimum views",
            "minimum": 0,
            "type": "integer",
            "description": "Only include videos with at least this many views. Set to 0 for no filter.",
            "default": 0
          },
          "featureHD": {
            "title": "HD",
            "type": "boolean",
            "description": "Only show HD quality videos.",
            "default": false
          },
          "featureSubtitles": {
            "title": "Subtitles/CC",
            "type": "boolean",
            "description": "Only show videos with closed captions.",
            "default": false
          },
          "featureCreativeCommons": {
            "title": "Creative Commons",
            "type": "boolean",
            "description": "Only show Creative Commons licensed videos.",
            "default": false
          },
          "feature3D": {
            "title": "3D",
            "type": "boolean",
            "description": "Only show 3D videos.",
            "default": false
          },
          "featureLive": {
            "title": "Live",
            "type": "boolean",
            "description": "Only show live broadcasts.",
            "default": false
          },
          "feature4K": {
            "title": "4K",
            "type": "boolean",
            "description": "Only show 4K UHD quality videos.",
            "default": false
          },
          "feature360": {
            "title": "360°",
            "type": "boolean",
            "description": "Only show 360 degree videos.",
            "default": false
          },
          "featureHDR": {
            "title": "HDR",
            "type": "boolean",
            "description": "Only show HDR videos.",
            "default": false
          },
          "featureVR180": {
            "title": "VR180",
            "type": "boolean",
            "description": "Only show VR180 videos.",
            "default": false
          },
          "oldestPostDate": {
            "title": "Scrape videos published after",
            "type": "string",
            "description": "When scraping channels, only get videos uploaded after this date. Use YYYY-MM-DD format (e.g., 2024-01-01) or relative format (e.g., '30 days', '6 months', '1 year')."
          },
          "sortChannelBy": {
            "title": "Sort channel videos by",
            "enum": [
              "newest",
              "popular",
              "oldest"
            ],
            "type": "string",
            "description": "How to sort videos when scraping a channel page.",
            "default": "newest"
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Get region-specific results. Use ISO 3166-1 alpha-2 codes (e.g., US, UK, DE, JP, BR)."
          },
          "language": {
            "title": "Interface language",
            "type": "string",
            "description": "YouTube interface language. Use ISO 639-1 codes (e.g., en, es, fr, de, ja)."
          },
          "enrichData": {
            "title": "Enrich with engagement data",
            "type": "boolean",
            "description": "Visit each video page to get likes, comments, subscribers, and full descriptions. Slower but provides complete data.",
            "default": true
          },
          "fetchDislikes": {
            "title": "Fetch dislike counts",
            "type": "boolean",
            "description": "Get estimated dislikes via Return YouTube Dislike API. Adds a small delay but provides valuable engagement metrics.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Use Apify Proxy or custom proxies to avoid rate limiting and access region-specific content.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}