{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Shorts Scraper",
    "description": "Scrape YouTube Shorts from channels, search queries, and direct URLs. Extract video metadata, engagement metrics, subtitles, translations, and detailed channel information.",
    "version": "0.0",
    "x-build-id": "1WvflTtFuGtqNnE0N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/upadhyay.labs~youtube-shorts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-upadhyay.labs-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/upadhyay.labs~youtube-shorts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-upadhyay.labs-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/upadhyay.labs~youtube-shorts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-upadhyay.labs-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": {
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "YouTube channel handles, @handles, channel URLs or /shorts URLs. Examples: \"nasa\", \"@nasa\", \"https://www.youtube.com/@nasa\".",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Plain-text keywords to search Shorts for. Alternative or addition to channels.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Direct Shorts URLs",
            "type": "array",
            "description": "Direct https://www.youtube.com/shorts/VIDEO_ID links to scrape individually, bypassing channel discovery.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResultsShorts": {
            "title": "Max Shorts per channel / query",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of Shorts to collect from each channel or search query. Even the largest channels rarely exceed a few thousand Shorts, so this is capped at 20,000 to keep the field meaningful.",
            "default": 25
          },
          "maxItems": {
            "title": "Max total Shorts",
            "minimum": 0,
            "type": "integer",
            "description": "Global cap across the entire run. 0 = unlimited (bounded only by maxResultsShorts per source).",
            "default": 0
          },
          "oldestPostDate": {
            "title": "Oldest post date",
            "type": "string",
            "description": "Stop paginating a source once Shorts older than this date are reached. Accepts ISO dates (\"2024-01-01\") or relative values (\"7 days\"). When set, sortChannelShortsBy is automatically set to NEWEST."
          },
          "sortChannelShortsBy": {
            "title": "Sort channel Shorts by",
            "enum": [
              "NEWEST",
              "POPULAR",
              "OLDEST"
            ],
            "type": "string",
            "description": "Order in which Shorts are returned from channel pages. NEWEST = most recent first (default), POPULAR = most viewed first, OLDEST = oldest first. Ignored for search queries.",
            "default": "NEWEST"
          },
          "extendedChannelDetails": {
            "title": "Fetch extended channel details",
            "type": "boolean",
            "description": "Adds subscriber count, channel description, join date, location, total views/videos, avatar/banner. Makes one extra request per unique channel.",
            "default": true
          },
          "extendedVideoDetails": {
            "title": "Fetch extended per-video details",
            "type": "boolean",
            "description": "Visits each Short's watch page for exact like count, comment count, description, subtitle tracks, and collaborators. Approximately 2× slower but much richer data.",
            "default": true
          },
          "subtitleLanguages": {
            "title": "Subtitle languages (SRT download)",
            "type": "array",
            "description": "BCP-47 language codes for which to attempt full SRT subtitle text. Other tracks appear in the output with URL-only (srt: null). Only applies when extendedVideoDetails is true. Note: YouTube currently restricts automated caption/transcript retrieval on some videos (a platform-wide PoToken requirement, not specific to this Actor) -- when that happens srt stays null for the configured language too, but the subtitle track's URL is always still returned. Default: [\"en\"].",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "translationLanguage": {
            "title": "Translation language",
            "type": "string",
            "description": "BCP-47 language code (e.g. \"es\", \"fr\"). When set, re-fetches the watch page with ?hl=<lang> and records translatedTitle / translatedText when YouTube returns a real translation (i.e. when the localized values differ from the originals). Both fields are null when no translation exists. One extra request per video. Only applies when extendedVideoDetails is true.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies strongly recommended – YouTube blocks datacenter IPs quickly.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of times to retry a failed request before recording it as an error.",
            "default": 6
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Higher = faster, but YouTube throttles aggressive concurrency even through residential proxies. 15 is a safe default with real throughput headroom; avoid going past ~20 without also widening your proxy pool.",
            "default": 15
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}