{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Shorts Scraper for Trends & Channels",
    "description": "Scrape YouTube Shorts from channels or direct URLs and extract titles, views, likes, comments, hashtags, descriptions, transcripts, and automation-ready trend signals.",
    "version": "1.5",
    "x-build-id": "7ivPE41h6JeHS7r5f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/runtime~youtube-shorts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-runtime-youtube-shorts-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/runtime~youtube-shorts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-runtime-youtube-shorts-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/runtime~youtube-shorts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-runtime-youtube-shorts-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": {
          "channel": {
            "title": "Channel URL (Single)",
            "type": "string",
            "description": "A single YouTube channel URL (e.g., \"https://www.youtube.com/@Dior\") or a direct short URL (e.g., \"https://www.youtube.com/shorts/u6ErkF-9HKc\"). The actor appends \"/shorts\" for channel URLs when needed. Use 'channels' for multiple channels.",
            "default": "https://www.youtube.com/@Dior/shorts"
          },
          "channels": {
            "title": "Channel URLs (Multiple)",
            "type": "array",
            "description": "Array of YouTube channel URLs to scrape. Each channel will be processed sequentially. If provided, 'channel' parameter is ignored. Format: [\"https://www.youtube.com/@Channel1\", \"https://www.youtube.com/@Channel2\"]",
            "items": {
              "type": "string"
            }
          },
          "get_details": {
            "title": "Scrape Video Details",
            "type": "boolean",
            "description": "When enabled, opens each video page to collect descriptions, likes and comments. Disable for faster, more reliable monitoring runs.",
            "default": false
          },
          "include_channel_details": {
            "title": "Include Channel Details",
            "type": "boolean",
            "description": "When enabled, captures the About tab once (description, links, joined date, stats) and attaches it to every item.",
            "default": false
          },
          "max_videos": {
            "title": "Maximum Videos",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The maximum number of videos to load per channel.",
            "default": 20
          },
          "webhook_url": {
            "title": "Make.com Webhook URL",
            "type": "string",
            "description": "Optional webhook URL to send results to Make.com in real-time. Leave empty to use default Apify dataset."
          },
          "batch_size": {
            "title": "Batch Size for Make.com",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of videos to process in each batch (useful for Make.com rate limiting). Default: 10",
            "default": 10
          },
          "delay_between_batches": {
            "title": "Delay Between Batches (ms)",
            "minimum": 50,
            "maximum": 5000,
            "type": "integer",
            "description": "Delay in milliseconds between processing batches (helps with Make.com rate limits). Default: 1000",
            "default": 1000
          },
          "video_timeout_secs": {
            "title": "Video Page Timeout (secs)",
            "minimum": 5,
            "maximum": 45,
            "type": "integer",
            "description": "Maximum seconds to wait when loading an individual video page. Default: 15 (min 5 / max 45).",
            "default": 15
          },
          "max_request_retries": {
            "title": "Channel Page Retries",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Advanced: retries for the channel listing page. Default is 1 to handle transient YouTube navigation timeouts without producing failed dataset items.",
            "default": 1
          },
          "oldest_post_date": {
            "title": "Oldest Post Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Filter videos by oldest upload date (YYYY-MM-DD format). Only videos uploaded on or after this date will be included."
          },
          "newest_post_date": {
            "title": "Newest Post Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Filter videos by newest upload date (YYYY-MM-DD format). Only videos uploaded on or before this date will be included."
          },
          "max_comments_per_video": {
            "title": "Max Comments Per Video",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of comments to extract per video. Default: 10, Max: 100. Higher values take more time.",
            "default": 10
          },
          "extract_duration": {
            "title": "Extract Video Duration",
            "type": "boolean",
            "description": "When enabled, extracts video duration in seconds and ISO format (e.g., 00:00:26).",
            "default": true
          },
          "calculate_engagement": {
            "title": "Calculate Engagement Rate",
            "type": "boolean",
            "description": "When enabled, calculates engagement metrics (rate, score, category) based on likes, comments, and views.",
            "default": true
          },
          "extract_transcript": {
            "title": "Extract Video Transcript",
            "type": "boolean",
            "description": "When enabled, extracts video transcript/subtitles if available. Opens transcript panel and extracts text content with language detection.",
            "default": false
          },
          "request_handler_timeout_secs": {
            "title": "Request Handler Timeout (secs)",
            "minimum": 60,
            "maximum": 3600,
            "type": "integer",
            "description": "Advanced: maximum seconds for processing one channel request. Keep high for larger runs.",
            "default": 240
          },
          "navigation_timeout_secs": {
            "title": "Navigation Timeout (secs)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Advanced: maximum seconds for page navigation before retry/fallback. Fast mode defaults to 60; detail mode automatically uses at least 120 seconds for reliability.",
            "default": 60
          },
          "time_buffer_secs": {
            "title": "Timeout Safety Buffer (secs)",
            "minimum": 15,
            "maximum": 300,
            "type": "integer",
            "description": "Advanced: stop processing this many seconds before the Actor timeout to save partial results instead of timing out.",
            "default": 30
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Enable Apify Proxy. Recommended for cloud runs; disable for local smoke tests without an Apify proxy.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Advanced Apify Proxy or custom proxy settings.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}